The rules for Zanzibar Bao are adapted for computer use from: Alexander J. de Voogt (1995). Limits of the Mind. Towards a characterisation of Bao mastership. Ph.D. thesis, University of Leiden, The Netherlands. ISBN 90-73782-50-3.
rule 1.2: End of the game. The game ends if (1) the front row of a player is empty (even during a move) or (2) if a player cannot move. In both cases the other player wins.
rule 1.3: Sowing. The basic move of Bao is sowing (spreading) of stones. Sowing is the process of putting a determined number of stones one by one in consecutive holes in the own two rows of the board in clockwise or anti-clockwise direction. During sowing, the direction of the sowing cannot change. Every sowing (spread) has a starting pit, a number of stones to sow, a sowing direction, and an ending pit.
rule 1.4: Single capture. Capturing in Bao is only allowed if a sowing ends in an non-empty pit at the front row that has an opposing non-empty pit at the front row of the opponent (this is called mtaji). The player's pit is called the capturing pit and the opponent's pit is called the captured pit. The capture in Bao consists of taking all stones out of the captured pit in the opponent's front row and sowing them immediately at the own side of the board. The sowing of captured stones must start at one of the kitchwas.
rule 1.4b: If the capturing pit is the left kitchwa or kimbi, the sowing must start at the left kitchwa. If the capturing pit is the right kitchwa or kimbi, the sowing must start at the right kitchwa.
rule 1.4c: When another pit is capturing, the direction can either be chosen by the player if the capture is the start of a move in namua stage, or the existing direction of the move must be sustained.
rule 1.6b: Endelea stops if the sowing ends at a takasia-ed hole.
rule 1.6c: Endelea stops if a capture is possible. The move continues with the capture. The direction of the sowing of captured stones is the same as the direction of endelea, unless capture occurs at the kichwa or kimbi.
rule 1.7: Capture moves. If a move starts with a capture, then more captures can occur during endelea later on. If captures take place at the kitchwa or kimbi, the direction of the moves changes.
b 0 0 0 0 0 0 0 0 a 0 2 2 6 0 0 0 0 A 0 0 0 0 6 2 2 0 B 0 0 0 0 0 0 0 0The first player is South.
rule 2.2: During namua stage, the player starts each move with sowing one stone from the store on the board each move. When all stones are on the board (after 22 moves or 44 plies) the game enters the mtaji stage.
rule 2.3: Capturing in namua stage. A player is allowed to capture a non-empty opponent's hole from the front row if there is a non-empty hole at the own front row (the capturing hole), directly opposite to the captured hole. The player puts (`sows') one stone from the store in the capturing hole, takes all stones from the opponent's captured hole and start sowing them at one of the own kichwas as described in rule 1.4.
rule 2.3b: If a player can capture, he must do so.
rule 2.4b: Takasa cannot start from the owned house with six or more seeds unless it is the only filled hole in the front row. If it is the only hole filled at the front row, then one stone from the store must be put in it, two stones have to be taken out and spread to the left or to the right.
rule 2.4c: Takasa cannot start from a hole with only one stone, unless there are no holes with more than one stone on the front row or unless the house is still owned (even with less than 6 stones).
rule 2.5b: If the player still owns the nyumba and a sowing ends in the nyumba then (1) the move ends during takasa if the house contains six or more stones, or (2) the move ends during a capture move if no capture is possible at the nyumba and if the player wishes to stop. If a player does not wish to stop then the player is said to play the house, which means that the house is emptied and its stones are spread.
rule 3.2: If the house happens to be still owned by one of the players, it stays owned until the first capture occurs. The namua rules for the house (2.4b, 2.4c and 2.5b) do not apply anymore. Takasia rules do apply (4.1c) on the house.
rule 3.3: In mtaji stage, only holes can be played that contain more than one stone. If both rows of a player only contain holes with zero or one stones, this player looses the game. Every move in mtaji stage starts with selecting a hole and sowing the contents in a chosen directory.
rule 3.4: Capture move in Mtaji stage. A capture move in mtaji stage must start from a hole on the front row or back row that contains more than one but less then 16 stones. After spreading in a chosen direction, the last stone must allow capturing. If a player can capture he must do so. The direction of the sowing of the captured stones is the same as the selected move direction, unless capture occurs on the kichwa or kimbi.
rule 3.5: Takasa in Mtaji stage If no capture move is possible, the player must takasa.
rule 3.5b: If the only filled hole on the front row is one of the kichwas, takasa cannot go in the direction of the back row (because the front row will be empty and the game is a loss).
rule 4.1b: If endelea ends in a takasia-ed hole, the move ends.
rule 4.1c: If a house is still owned during Mtaji stage, it cannot be takasia-ed.
In namua stage, the row indication can be omitted. If the capturing hole is a kichwa or kimbi, the direction indication can be omitted.
The direction indicator is relative to the player at move. It indicates the direction in which the hand moves after putting the first stone in namua stage or after picking up the stones of a pit in mtaji stage. So, in a capture move during namua stage, the direction indicates whether the left (L) or right (R) kichwa is chosen to be started from.
A game transcript consists of a head containg the game information and one line for every two plies (one move). A move line starts with the move number, then a colon, a space, the move for South, a space, the move for North and a semicolon follow. After the semicolon, comments may be added.
title: Ramadhan versus Kijumbe, second match South: Ramadhan North: Kijumbe opening: official place: Zanzibar date: 17-10-94 event: Zanzibar championship winner: North time: 30 minutes 10 seconds 1: 7L* 5R; 2: 6R* 6R*; 3: 7R* 8L*; 4: 8R* 6R*; 5: 5R* 8L*; 6: 7R* 6R*; 7: 6R* 8L*; 8: 7R* 6R*; 9: 8R* 7; 10: 5L* 5L; 11: 3R 1; 12: 5R 7R*; END IN THE HOUSE 13: 8 2; 14: 8 2; 15: 3R* 5R>; 16: 5R 3L; 17: 8 6R; 18: 4R 7; 19: 5R 8; 20: 5R 7; 21: 7 6L; 22: 2 8; 23: B2L b7R; 24: A7L b8R; 25: A3R a6L; 26: A7L a6L; A resigns