Closed loki12241224 closed 1 year ago
If the position is a draw then the think function won't be called because the game is already over
There is a board.MakeMove before the Draw check, though, so it should go off if the next move results in a draw, right? Same issue here.
My guess would be that the problem might have something to do with the MiniMax search? Maybe if a piece is taken the repetition table is cleared but not reinstantiated when the move is undone? Something like that?
This should be fixed in the latest version, sorry about that!
thank you so much, I kept wondering which commit would suddenly make my AI draw all the time - guess i should just use git pull
instead of git pull --rebase
next time
The newest update to the file seems to have fixed the issue.
`public Move Think(Board board, Timer timer) { isWhite = board.IsWhiteToMove; Tuple<Move, float> BestMove = MiniMax(board, 4, -100000, 100000, true); Console.WriteLine("ChosenMove: " + BestMove); Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-"); board.MakeMove(BestMove.Item1); if (board.IsDraw()) { System.Threading.Thread.Sleep(1000000); }
this never sleeps when a drawing position occurs. i cannot get IsDraw() to return true.