Bao is a traditional mancala-style sowing game from East Africa where you attempt to eliminate all pieces from the opposing front row or leave them with no legal moves.
It is played on a board of four rows of eight pits. Each player controls the two rows on their side of the board. The row nearer the opponent is that player's front row; the other is their back row.
Each player has 32 seeds. Players sow seeds around their own sixteen pits, capture seeds from the opponent's front row, and relay-sow until the turn ends.
You win if either:
The two end pits of each front row are called the kichwa. The pits immediately beside them are the kimbi.
Each player also begins with a special front-row pit called the nyumba or house. It is the fifth pit from the player's left (equivalently, the fourth from the right) and is shown as a square pit on Abstract Play.
The two front-row pits directly opposite one another are paired for purposes of capture.
A front-row pit is a marker when the opposing pit contains at least one seed.
When captured seeds enter your side of the board, they are sown beginning with one of your kichwa:
The terms clockwise and counterclockwise always refer to the circuit around your own sixteen pits.
Red moves first; Blue moves second.
In the normal setup, each player begins with:
From Abstract Play's usual board orientation, the initial position is:
Blue — 22 in reserve Back: 0 0 0 0 0 0 0 0 Front: 0 2 2 [6] 0 0 0 0 ----------------------- Front: 0 0 0 0 [6] 2 2 0 Back: 0 0 0 0 0 0 0 0 Red — 22 in reserve
On Abstract Play, Red's nyumba is e2 and Blue's is d3.
The game begins in the kunamua phase. Once all the reserve seeds have entered the board, play continues in the mtaji phase.
There are two separate distinctions which are important not to confuse:
Thus, despite the shared word mtaji, a mtaji turn and the mtaji phase are not the same thing.
Capture is compulsory. If a mtaji turn is available, you must make one. You may kutakata only when no capturing move is available. Once a turn has begun as kutakata, no captures may occur anywhere during that turn, even if later sowing ends in a marker.
Whenever seeds are picked up for sowing, place them one at a time into consecutive pits around your own two rows in the required direction, starting from the required pit.
If the last seed of a sowing lands in an empty pit (ie, one which now contains only that one seed), the turn ends.
If the last seed of a sowing lands in a pit containing at least one seed (ie, one which now contains two or more seeds) and no capture is triggered thereby, pick up all the seeds from that pit and continue sowing in the same direction, beginning with the next pit. This continuation is called kuendelea or relay sowing.
Sowing continues, along with any triggered captures on a mtaji turn, until the turn ends by sowing into an empty pit or by one of the special stopping rules described below. AP also ends the turn early if victory is achieved.
Captures can occur only from your front row.
On a mtaji turn, a capture occurs when a sowing ends in a front-row pit which:
Take every seed from that opposing pit. Those captured seeds are immediately sown on your own side, beginning in one of your kichwa.
Capture is compulsory: if at least one legal move begins with a capture, you may not choose a kutakata move instead.
If the capture was made from a kichwa or kimbi, the captured seeds must enter through the kichwa on that same side.
Otherwise:
Thus repeated captures can occur during one turn. A capture from a kichwa or kimbi may change the direction because the corresponding kichwa takes precedence over preserving the previous direction.
During the kunamua phase, each turn begins by taking one seed from your reserve and placing it into a nonempty pit of your front row.
There is an important restriction involving the nyumba: on a kutakata turn, you normally cannot begin from your owned nyumba at all. As long as another occupied pit exists in your front row, you must begin somewhere other than the nyumba. The nyumba may be used to begin a kutakata turn only when it is the sole occupied pit in your front row.
This restriction does not prevent a mtaji turn from beginning at the nyumba: if the nyumba is opposite a nonempty enemy pit, placing your reserve seed there may be a compulsory capture.
If any occupied pit in your front row is opposite a nonempty enemy pit, you must place the reserve seed into such a pit and capture.
The reserve seed remains in the pit where it was placed. Take all the seeds from the opposing enemy pit and begin sowing those captured seeds from one of your kichwa.
If the capturing pit is a kichwa or kimbi, you must sow from the nearest kichwa; otherwise you may choose either kichwa for this first capture.
Further captures and relay sowing then proceed normally.
If no capture is available, the turn must be kutakata: no captures will be triggered during the turn even if later sowing would otherwise create the conditions for one.
Abstract Play determines the pits from which you may begin in the following order:
After placing the reserve seed into the chosen pit, sow from that pit in either direction. Because this is kutakata, no captures can occur for the entire turn even if the last seed of a sowing lands in an occupied pit opposite an opposing occupied pit.
A nyumba which still has its special status is working while it contains at least 6 seeds.
Most of the special nyumba rules apply only during the kunamua phase.
During a kunamua kutakata turn, if relay sowing ends in a working nyumba, the turn stops there rather than picking up and resowing the contents.
During a kunamua mtaji turn, if sowing ends in a working nyumba and no capture occurs there, you may either:
Playing the house removes its special nyumba status: from then on no special rules apply to it.
If a capture is possible from the nyumba, the capture takes precedence; you may not simply stop there or safari.
As described above, an owned nyumba cannot normally be chosen to begin a kunamua kutakata turn while another occupied front-row pit is available.
If the nyumba itself is used to begin the turn and it contained at least 6 seeds before the reserve seed was added, it is taxed: after adding the reserve seed, take only 2 seeds from the nyumba and sow those two. The remaining seeds stay in the nyumba.
Taxation does not remove the pit's nyumba status. It may, however, leave the nyumba with fewer than 6 seeds, in which case it is no longer working until its count again reaches 6.
If a non-working nyumba is sown from (not taxed, nor just ended in and not sown), its full contents are used and it loses its nyumba status.
A pit loses its special nyumba status if:
Once the game reaches the mtaji phase, the kunamua rules for stopping in, playing, and taxing the nyumba no longer apply. An owned nyumba is sown from like an ordinary pit.
Abstract Play nevertheless continues to track an unsown, uncaptured nyumba as a house until it is eventually picked up and sown or captured. This retained status has one effect on AP's implementation of kutakatia: while the nyumba contains at least 6 seeds, AP will not allow it to become blocked.
The mtaji phase begins after all reserve seeds have entered the board.
There are no longer reserve seeds to place. Instead, begin a turn by choosing one of your own pits containing at least 2 seeds and sowing its entire contents clockwise or counterclockwise.
As during kunamua, the turn itself will be either a mtaji turn (capturing) or a kutakata turn (noncapturing). Capture remains compulsory.
To begin a mtaji turn during the mtaji phase:
If any such capture is available, you must choose a capturing move.
A pit containing 16 or more seeds cannot begin a capturing turn. A turn beginning from such a pit is always kutakata, even if its sowing would otherwise finish in a marker.
Once a turn has begun as kutakata, it remains noncapturing for the entire turn.
If no capturing move exists, you must kutakata.
If at least one legal front-row pit contains 2 or more seeds, you must begin from the front row.
Only if no such front-row move is available may you begin from a back-row pit containing 2 or more seeds.
Sowing then continues by the normal relay rules, without captures.
During the mtaji phase, a kutakata move can sometimes block one of the opponent's front-row pits. Abstract Play marks such a pit with an outline.
After a player completes a kutakata turn, Abstract Play considers all the capture moves that that same player would have if they could move again immediately from the resulting position. If there is at least one such capture move, and every one of them makes its first capture from the same opposing pit, AP attempts to block that pit.
A pit is not blocked if:
While a pit is blocked, the following rules apply:
The block disappears if:
Thus a player may sometimes remove a block during a capturing move of their own, either by sowing from the blocked pit or by capturing the opposing pit.
You lose immediately if your front row becomes empty.
You also lose if, at the beginning of your turn, you have no legal move. In mtaji this can happen, for example, if all of your remaining seeds are isolated one seed per pit.
Bao can produce extremely long relay sequences, and genuinely never-ending moves are mathematically possible [citation needed].
Abstract Play uses a fixed distance cutoff. It keeps track of the cumulative distance sown during a move and aborts the move after this exceeds 12 complete revolutions of the player's 16-pit circuit—a distance of 192 pit-to-pit seed placements, to be precise. Because captures can interrupt ordinary relay sowing and restart the sowing from a kichwa, this should be understood as a cumulative sowing-distance limit rather than necessarily twelve uninterrupted laps around the board.
If AP's cutoff is exceeded, the move is declared infinite and the player making it immediately loses.
The Malawi variant changes the starting position:
The change from 6 to 8 is only to the initial number of seeds in the nyumba. Abstract Play does not change the threshold used by the nyumba rules: a nyumba is still considered working when it contains at least 6 seeds, and rules referring to a 6-seed threshold continue to use 6 rather than 8.
All other rules are unchanged.
Bao la Kujifunza skips the kunamua phase entirely.
At the start:
The game therefore begins immediately under the mtaji-phase rules.
Generated by ChatGPT; reviewed by Samraku. I'm fairly confident it has the rules right according to the AP code (or at least close enough to compete with existing rules explanations for completeness, correctness, and clarity), but not very confident how those rules relate to traditional formulations. Some of the more esoteric terminology (like kuendelea) I also didn't verify.