Sowing

Sowing

Oware, the West African seed game, against a bot that thinks out loud. Watch it weigh every pit before it moves.

How it's built

A search engine from scratch

The bot is a game-tree search: negamax with alpha-beta pruning, iterative deepening, a transposition table and move ordering, running in a Web Worker so the board never freezes.

Checked against brute force

The pruned search is compared with plain minimax on a thousand random positions, and the rules are compared with a second, independently written implementation over twenty thousand moves.

The numbers are real

The chalk score on each pit, the depth meter and the dashed line are the engine's own output, streamed as it searches. Nothing is canned.

Rules convention: after a third repetition of a position, or 100 moves without a capture, each player takes the seeds on their own side.

Play Oware

How to play Oware

Two players, twelve pits, 48 seeds. You own the six pits nearest you (the bottom row, a to f). The bot or your opponent owns the top row. The first to capture 25 seeds wins.

Sowing

On your turn, pick one of your pits that has seeds and lift all of them. Drop them one at a time into the next pits, counterclockwise: along your row to the right, then back along the other row. If you lift 12 or more seeds, you skip the pit you started from on every lap.

Capturing

If your last seed lands in a pit on your opponent's side and that pit now holds 2 or 3 seeds, you capture them. Then look at the pit before it (clockwise): if it also holds 2 or 3, capture it too, and keep going until a pit holds anything else or you leave their row.

The grand slam

If a move would capture every seed on your opponent's side, it is still legal, but it captures nothing. Nobody can be wiped out in one stroke.

Feeding

If your opponent has no seeds, you must play a move that gives them some. If no move can, the game ends and each player keeps the seeds on their own side.

How a game ends

Reach 25 captured seeds and you win; 24 each is a draw. In this game, if the same position appears for the third time, or 100 moves pass without a capture, the game ends and each player keeps the seeds on their own side. Tournament rules vary on this point; this is the convention Sowing uses.

Play the bot

That page is not here

The link may be old. The board is waiting.

Back to the board