Depth limited Minimax implementation of Mancala game
The Mancala Board
Mancala is played with a board that contains several positions, as shown in the figure below. Each position can contain zero or more gems. There are two players: player 0, and player 1.
• The positions on left and right are called mancalas.
• The positions on top and bottom are called pits.
• The pits on bottom and mancala on right belong to player 0.
• The pits on top and mancala on left belong to player 1.
• The positions are numbered 0 through 17 as shown in the figure, starting from the lower-left pit and increasing counter-clockwise around the board.
• A pair of adjacent pits on top and bottom are called opposite from each other. For example, the opposite pit from position 1 is position 15, and vice versa.
• At the beginning of the game, 4 gems are placed in each pit, and 0 gems in each mancala.