Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Bug in minimax algorithm

$
0
0
Hi, I was coding for minimax algorithm and have an annoying bug in the program . When I call the IsGameOver(state) , I try to display the board state of the game . It seems that when I have a win , however , the evaluate function that I calculate gives me a loss or a draw . I seem to have done everything correct . I don't know where is the bug . I have a sample run of the code here:My link

Code:
Spoiler

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>