Game Board and Scores
How to Play
- Each player can be a human or the computer. By default, player B is human (you) and A is the computer (me).
- Players take turns. The arrow shows whose turn it is.
- In turn, each player clicks one of the six buttons (cups) in his/her row.
- All the pieces are taken from the cup and one piece is put in each following cup, moving counter-clockwise.
- If the last piece lands in a cup on the opponent's side, and if the cup contains
2 or 3 pieces, the pieces are captured and added to the score.
If the immediately preceding cup has 2 or 3 pieces, they are also captured, and so on. - The game automatically ends when a player has no pieces and cannot take his/her turn.
- The winner is the player who captured the most pieces.
- Press New to start another game.
Tips
- Press Reset (or Reload or Refresh in your browser) to return the game to all original settings.
- You can choose how many pieces each cup should start with (3 to 6 or random).
- If the program is too slow for you, uncheck the Pause feature. All pieces will move immediately.
- If the program hangs, click the Stop button of your browser.
- If you want the computer to only make one move, first make sure the other player is human.
Strategies
- The computer chooses a cup using one of six strategies: random (the default), first, last, fullest, emptiest, or greedy.
- The greedy strategies look ahead 1 to 5 moves to see which choice of cup would gain the most points. (greedy5 is slow.)
- You can let the computer play against itself to see which strategies are best or worst.
Bugs
- This program uses Javascript 1.2, so it probably only works with Netscape Navigator 4 or Internet Explorer 4.
- It does not work with Netscape on a Macintosh because button text cannot change.
- Pause is just an empty loop (a hack) and may be slow on computers with slow processors.
- Internet Explorer users should uncheck Pause, since the screen does not update until processing stops.
- Internet Explorer sometimes hangs or crashes.
- Internet Explorer button widths change, which is distracting.
- There is no way to gray out buttons that should be disabled.
- The program should disallow a move that will leave the opponent with no pieces if other moves are possible.
- There is no option about who scores the remaining pieces when one player cannot move.
More information about Mankala games like Ayòayò is available on my Africa page.