Play Mancala (Kalah) Online vs the Computer
Play the classic game of Mancala — in its standard Kalah rules — directly against the computer, free, in your browser, with no download and no sign-up. You play the bottom row of pits with your store on the right; the AI plays the top row. Click one of your pits to scoop up its stones and sow them counter-clockwise. This is a single-player game built around an honest AI opponent: Beginner makes mistakes you can punish, Medium plays a solid game, and Hard runs an extremely strong search engine that plans free-turn chains and captures many moves ahead. Your legal moves are highlighted, and you get a move hint, undo and per-difficulty score tracking in your browser.
How the AI thinks
The opponent here is not a set of canned tricks — it is a real game-tree search engine, the same family of algorithm used by classic chess and checkers programs. On every turn it plays out possible futures for both sides using negamax with alpha-beta pruning, scoring the resulting positions and picking the move with the best guaranteed result while skipping branches that provably cannot matter. What makes Mancala interesting for a search engine is the free turn: landing your last stone in your store lets you move again, so a single decision can be a chain of several sows in a row — and the engine reads those chains to the end. Its evaluation weighs the stones banked in each store, the material each side is holding on the board, and standing capture threats. Hard uses iterative deepening within a time budget of about a second; the whole engine runs locally in your browser (in a background worker thread, so the page stays responsive), and nothing is sent to a server. It is extremely strong against human play, though we do not claim it is perfect.
How to play Mancala — the rules
- The board. Each player has six small pits and one large store. Your store is the one on your right. Every pit starts with four stones.
- Sowing. On your turn, pick up all the stones in one of your own pits and drop them one at a time into the following pits, moving counter-clockwise. You drop a stone in your own store as you pass it, but you skip your opponent's store.
- Free turn. If your last stone lands in your own store, you take another turn straight away. Clever players chain several free turns together.
- Capture. If your last stone lands in an empty pit on your own side, you capture that stone and all the stones in the pit directly opposite, and put them in your store.
- Ending. The game ends as soon as one player has no stones left in their pits. The other player sweeps all their remaining stones into their store, and whoever has the most stones wins.
- Hint and undo. Hint asks the engine for a strong move; Undo takes back your last move.
Tips to beat the AI
- Hunt for free turns. Any pit whose stone count is exactly the distance to your store lets you move again. Stringing free turns together at the start can bank a big early lead.
- Set up captures. Landing your last stone in one of your own empty pits steals the whole pit opposite. Keeping a pit empty and waiting for the opposite one to fill is a classic trap.
- Watch the AI's captures. If the AI has an empty pit, the stones in your pit opposite it are in danger — sometimes it is worth emptying that pit before it can strike.
- Hoard on your own side late. When a side is close to empty, remember that whoever runs out first hands their remaining stones to the opponent — timing the finish matters.
FAQ
Can I play Mancala online against the computer?
Yes — that is exactly what this page is. Pick a difficulty, choose who goes first, and play. Works on desktop and mobile, free, with no account.
Is Mancala the same as Kalah?
Mancala is a whole family of ancient sowing games; Kalah is the specific version most people in the West mean by "Mancala" — six pits a side, four stones each, free turns and captures. This page uses those standard Kalah rules.
How strong is the AI?
Beginner plays some random moves. Medium plays a solid game. Hard runs a negamax search with alpha-beta pruning that plans free-turn chains and captures deep into the game — extremely strong, though we don't claim perfection.
What is the best opening move?
In standard Kalah, the pit that lands your last stone exactly in your store gives an instant free turn; from the start that is the third pit from your store. The Hard AI opens exactly this way.
Is it free? Does it work offline?
Completely free, no download, no sign-up. The engine runs client-side, so once loaded the game keeps working without a connection. More AI games: AI Checkers, AI Othello, AI Connect 4, AI Chess or all games.
More AI games on LK Forge
You win!
You banked more stones.