Play free Mancala (the classic six-pit rules) against the computer at three levels, or with a friend on the same screen. Extra turns, captures and undo.
You 0
Computer 0
Your move
Session You 0, Computer 0, Draws 0
Best win -
Wins 0
Pick one of your pits (the bottom row) and its seeds are dropped one by one into the pits that follow, going right along your row, into your store (the long pit at the right end of the board, or the bar below your row on a narrow screen), and on along the top row. Your opponent's store is skipped. If your last seed lands in your store you go again. If it lands in an empty pit on your side and the pit across from it has seeds, you take both. The game ends when one side has no seeds left; the other side keeps what is in its pits, and the bigger store wins. Pits that you can play are outlined. Arrow keys move around the pits, Enter or Space plays one.
Easy picks any pit with seeds in it at random. Medium searches 4 moves ahead with alpha-beta pruning. Hard searches up to 8 moves ahead, one move deeper at a time, and stops deepening after about a third of a second. Both score a position by the lead in the stores, then by how many seeds are still in their own pits. An extra turn counts as a move of the same player. It is a fixed search with no learning, so a careful player can beat it. Undo takes back your last move and the reply, and a game that used Undo is not counted as a result. Undo is not available once a game is over. These are the classic six-pit rules: the page keeps the extra turn and the capture, and the game ends as soon as one side is empty.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
The board has two rows of six pits and a long pit, called a store, at each end. Every pit starts with 4 seeds (you can choose 3 or 5). The bottom row and one store are yours; the top row and the other store belong to your opponent. On a wide board the stores are the long pits at the two ends (yours on the right, your opponent’s on the left); on a narrow screen they become bars, yours below your row and your opponent’s above the top row.
On your turn you pick one of your pits that has seeds in it. All its seeds are picked up and dropped one at a time into the pits that follow, going to the right along your row, into your store, and on along your opponent’s row from right to left. Your opponent’s store is skipped. Two rules decide most games:
The game ends as soon as one side has no seeds left in its pits, even when it is the other side’s turn. The seeds still on the board stay with the side they are on and go to that side’s store. The bigger store wins, and equal stores are a draw. A pit holding 13 seeds drops one seed in every pit except your opponent’s store and ends in the pit it started from, which then counts as an empty landing pit.
Controls:
The pits you can play are outlined. The seeds are shown as small coloured dots, and every pit also shows its count as a number, so colour is never the only clue. The pits that just received seeds are tinted, the pit you last played has a dashed outline, and a captured pit is tinted too. Seeds drop one by one so you can follow a move; with reduced motion switched on in your system, the move happens at once. On the keyboard, arrow keys move between pits, Home and End jump to the ends of a row, and Enter or Space plays the pit. Every pit is announced with its row, number and seed count, and the status line says what each move did, including extra turns and captures.
The page address carries the opponent, difficulty, side and seed count, so you can bookmark a setup.
The engine keeps the board as a ring of 14 cells: six pits, a store, six pits, a store. Seeds go to the next cell in the ring, and the opponent’s store is skipped, so a full lap is 13 seeds. The opposite pit of cell i is cell 12 minus i. Everything is whole numbers, and the engine never touches the page.
The test suite pins the rules in several ways:
The computer has three levels:
Both searches score a position by the lead in the stores (10 points per seed), then by the seeds still sitting on each side (2 points per seed), with a small bonus for having the move. A finished game scores as a win or a loss that outranks any of those figures. An extra turn keeps the same player to move, so the search does not flip the sign there. Moves are tried in a useful order, extra turns and captures first, so pruning cuts branches sooner. Moves that tie for best are chosen between at random.
In the test suite, over seeded games with the first move alternating, Medium won at least 10 of 12 against Easy, and Hard searching 5 moves ahead won at least 5 of 6. The suite asserts that Hard answers every position it is asked about in under 4 seconds, a bound loose enough for a slow machine; the design limit is about a third of a second. The computer waits about 0.45 seconds before it moves so you can follow along, and moves at once if you have asked for reduced motion.
Nothing is uploaded and there is no account. Against the computer, your win count and your biggest winning margin for each difficulty are saved in your browser’s local storage, as small whole numbers inside a small JSON object, under one key. Clearing site data removes them. The session tally lives only on the page and resets when you leave it. Two-player games are not saved.
Only finished games count. A game in which you used Undo is not counted against the computer, so the saved figures are not inflated.
Everything runs locally in your browser.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.