Trouble approaching Mancala free moves to Minimax Node

366 views Asked by At

I am coding the Minimax algorithm for playing Mancala in python. I have no trouble with the code but with the algorithm.
In Mancala you can earn a free move and I do not know how to create the Node for that game state. For minimax it is supposed that min makes a move after max does and vice-versa, but when max earns a free move, max makes two consecutive moves.
I don't know how I could implement that, because when max earn a free move, you have to choose again between different possibilities for max.

Could someone help me? Thanks a lot.

1

There are 1 answers

0
Lopan On BEST ANSWER

Finally I did it this way. Using a boolean, when max player for example gets a free move, you create a child min node with the same game state as before and without increasing the depth value. That min node just creates another max node with the same game state as before and without increasing the depth. That worked for me!