Based on the Perl implementation by Sean M. Burke, which uses different rules as Vincent Everaert's zrf.
The quotes of the perl version desc: The rules of Alak are simple -- at least as I've (mis?)understood them and implemented them here:
- Alak is a two-player game played on a one-dimensional board with
eleven slots on it. Each slot can hold at most one stone at a time.
There's two kinds of stones, black and white. One player has four black
stones, the other has four white stones.
- The initial configuration of the board is:
xxxx___oooo. 'X' stands for a black stone, 'O' - for a white one. Blacks always have the first move.
- The players take turns moving. At each turn, each player can move
only one piece, once. A player cannot pass up on his turn. A player
can move any one of his pieces to the next unoccupied slot to its right
or left, which may involve jumping over occupied slots. A player cannot
move a piece off the side of the board.
- If a move creates a pattern where the opponent's pieces are
surrounded, on both sides, by two pieces of the mover's color (with no
intervening unoccupied blank slot), then those surrounded pieces are
removed from the board.
- The goal of the game is to remove all of your opponent's pieces, at
which point the game ends. Removing all-but-one ends the game as
well, since the opponent can't surround you with one piece, and so will
always lose within a few moves anyway.
|