Mancala

Saved games stay in this browser only.

About the game

Mancala is a family of counting games played for well over a thousand years with seeds or stones in rows of pits. This version plays Kalah, the rule set most people learn first. Each player owns a row of pits and a large store at the end; on your turn you pick up all the seeds in one of your pits and sow them one by one into the following pits, going around the board.

Two rules make it a game of planning. If your last seed lands in your own store, you move again. If it lands in an empty pit on your side, you capture it together with all the seeds in the opposite pit. When one side runs out of seeds the game ends, and the player with more seeds in the store wins.

The computer opponent looks ahead with the minimax algorithm, running in the background so the board stays responsive. Easy only sees the move in front of it; Hard thinks nine moves deep and is genuinely tough.

Playing it here

Click Play. The top bar sets each player (the blue side at the top and the red side at the bottom): Human, or the computer at Easy, Medium or Hard. The sliders change the number of seeds per pit (3 to 7) and pits per side (5 to 8). Press Start; the blue side at the top moves first. Then tap or click a pit on the side whose turn it is.

Controls

Input Action
Tap / click a pit sow the seeds of that pit
Player menus (top) Human or computer, and its level
Sliders seeds per pit and pits per side
Start / Abort begin or stop a game

A few things worth knowing

Count before you sow. A pit holding exactly as many seeds as the steps to your store gives you an extra turn; look for those first.

Empty pits are traps and chances. Landing in an empty pit of your own captures the seeds opposite, so keep an eye on which of the opponent's full pits face your empty ones.

Only the store counts. In this version, seeds still sitting in the pits when the game ends are not added to anyone's score, so a big pile in your row is worth nothing unless you sow it home in time.

FAQ

Can two people play on one device? Yes. Leave both players on Human and take turns tapping your own row.

How strong is the computer? Easy looks zero moves ahead, Medium two and Hard nine, according to the author's notes. Hard can take a moment to think on slower phones.

Can I watch the computer play itself? Yes. Set both sides to a computer level and press Start.

Credits and licence

Mancala was written by virgs with Vue and released under the MIT licence. It uses Bootstrap (MIT), Font Awesome Free icons (CC BY 4.0, code MIT) and the Exo font (SIL OFL). On this site Bootstrap and Exo are served from our own copy instead of external servers; the game itself is unchanged. The licence texts are linked from this page and the source is on GitHub.

Screenshots

Screenshot of Mancala