+ 3
How does Minmax algorithm works?
So related to the above algo if I have a current state as ["X","O",null, "O","X",null, "X",null,"O"] Now if I check the possible states for "X" they are ["X","O","X", "O","X",null, "X",null,"O"] ["X","O",null, "O","X","X", "X",null,"O"] ["X","O",null, "O","X",null, "X","X","O"] The first one completes the pattern in diagonal i.e. for "X" and wins the game ,so do I need to check for further states by subdividing the other two states?, I saw someone doing that and I am confused why they did it if we already got the best move we can make! Any help is much appreciated,ty!
3 Answers
+ 2
It is called pruning. Cutting off states you don't need to check since you got your minimum or maximum value.
Check out videos on YouTube on min-max pruning algorithms.
Happy Coding đ
+ 1
"If you don't want to win"? As humans, yes but I am not sure the ai will know this. It is either min or max value. The ai will want to win and worst case scenario, draw. I am sure it wont want a draw đ
with them it is either True or False. No "there is some element of truth in it" đ€Łđ€Ł
0
Tomiwa Joseph thank you đ ,but we can explore other states as well if we don't want to win and want to take the game to draw ,right?