Zanzibar Bao Rules for the Computer

H.H.L.M. Donkers
Universiteit Maastricht
email:
September 5, 2001

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.

The Board

Zanzibar Bao (Or Bao for short) is a game from the mancala family. It is played by two persons on a board with four rows of eight pits (or holes). The two lower rows are owned by the player called South, the two upper rows are owned by the player called North. The two middle rows are called front rows and the two outer rows are called back rows}. The fifth pit from the left (in perspective of the player) on each front row is shaped differently and is called the Nyumba or house. The two outer pits of the front row are called Kitchwa, and the two pits on the front row next to the `Kitchwa' are called the `Kimbi'. Bao is played with 64 equal counters (seeds, stones, or 'Kete').

Board Notation

The front row of South is indicated by the character `A', the back row is indicated by `B'. For North, `a' and `b' are used for the front row and back row respectively. The holes on each rows are numbered from 1 to 8, starting at the left hand of the player owning the rows. South's Nyumba is indicated by `A5' and North's by `a5'. The kitchwas are: A1, A8, a1, and a8, the kimbis are: A2, A7, a2, and a7. A configuration of stones on the board is indicated by four rows of numbers, or two rows if the back rows are not of interest. The rows of North are always on top. A wildcard `x' can be used to indicate that the content of a non-empty pit is not of interest or not known.

Part 1: General Rules

rule 1.1: Goal of the game. The goal of Zanzibar Bao is to empty the front row of the opponent or to make it impossible for the opponent to move.

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.5: Move. A move in Bao is a sequence of sowings and captures by one player. A move stops if a sowing ends in an empty pit, but may also stop at the house (see rule 2.5b) or at a takasia-ed hole (see rule 4.1b). After a move the opponent is to move.

rule 1.6: Endelea. If a sowing ends in a non-empty pit (e.g., after sowing there are more than one stones in the ending pit) and a capture is not allowed, then the move continues in the same direction by taking all the stones from that pit and sowing the stones starting at the next pit in the same direction. This continuation of sowing is called `endelea'.

rule 1.7: No-capture moves (takasa). If a move does not start with a capture, then capturing is not allowed at all during that move. The player is then called to takasa. During takasa, the player keeps performing endelea until it ends (rule 1.6a/b). During takasa, the direction of the move cannot change.

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.

rule 1.8: There are two stages in Bao: Namua and Mtaji.

Part 2: Namua stage

rule 2.1: The game starts in namua stage with the following board configuration: there are six stones in South's nyumba and two stones in the hole to the right of the nyumba and again two stones in the next hole to the right. The same number of stones are in North's nyumba and in the consecutive holes to the right (of North). Each player has 22 stones in store.
  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 0
The 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.4: Takasa in namua stage. If a player cannot capture, he must takasa. In namua, takasa starts with sowing one stone from the store in a non-empty hole in the front row. Takasa cannot start in the back row.

rule 2.5: The house (Nyumba). At the start of the game, both players own their house.

Part 3: Mtaji stage

rule 3.1: The mtaji stage starts if all stones are on the board.

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.

Part 4: Special rules

rule 4.1: Takasia. If a player must takasa, but he can play such that (1) the opponent also must takasa next move and (2) that exactly one of the opponent's hole can be captured after that, then the opponent is not allowed to empty this takasia-ed hole. (This can only happen in mtaji stage.)

part 5: Notational system

Moves are indicated by the row ('A','B','a','b') and number of the hole from which the move starts('1'-'8'). The direction of the move is indicated by 'L' or 'R'. When a player decides to play the house, a '>' is added to the move. A takasa move is indicated by an asterisk '*', a takasia is indicated by two asterisks '**'.

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.

Example game

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