Formal Specification
Water-Bugs Three-in-a-Row — Formal Specification
Kenya · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 0
# Shisima (Shisima) — AI-optimized specification
## General idea
A three-in-a-row abstract strategy game on a 9-point octagon-and-diagonals graph, where
players slide pieces along graph edges to align their 3 pieces.
## Formal model
- **Abstraction taken:** none — the board is naturally a graph of 9 nodes (8 octagon
corners + 1 center) connected by octagon-perimeter edges and 4 diametrical lines
through the center.
- **Player/agent count:** 2.
- **Turn model:** strictly alternating.
## Formal rules
R1. Board: graph with 9 nodes — 8 perimeter nodes (octagon corners) and 1 center node.
Edges: the 8 perimeter edges of the octagon, plus 4 diametrical edges connecting each
perimeter node through the center to its opposite perimeter node (i.e. each diametrical
line is two edges: corner-to-center and center-to-opposite-corner).
R2. Setup: each player places 3 pieces on 3 consecutive vacant perimeter nodes, such
that a vacant node remains immediately adjacent on both ends of their set of 3 (i.e. not
occupying the full perimeter along with the opponent's set with no gaps).
R3. Move: on a turn, move one of your own pieces along a single graph edge to an
adjacent empty node. Pieces cannot jump over occupied nodes.
R4. Win condition: the first player whose 3 pieces occupy 3 collinear nodes (any
straight line on the board — a perimeter arc is not collinear; a diametrical line
through the center is) wins immediately.
R5. Draw condition: if the same full board position recurs for the third time, the game
is declared a draw.
## Edge cases
- **Tie at the end:** R5 threefold-repetition rule forces a draw if neither player achieves 3-in-a-row alignment.
- **A player with no legal move:** cannot occur under normal play — with 9 nodes and 6 pieces, 3 nodes are always empty, and any piece adjacent to an empty node can move; a stalemate is not described by the source and should not be assumed possible under R1-R3's connectivity.
- **Repetition / cycles:** board configurations can repeat; R5's threefold-repetition rule forces a draw if the same full board position recurs for the third time.
- **Simultaneous claims on one position:** only one piece may occupy a node; moves to occupied nodes are illegal.
- **Elimination mid-round and turn-order repair:** not applicable; no piece elimination; both players retain 3 pieces throughout.
- **Resource exhaustion:** pieces remain constant at 3 per player.
- **Termination guarantee:** guaranteed — R5's threefold-repetition rule forces a draw if no player achieves R4, so the game cannot continue indefinitely under correct implementation of state-repetition tracking.
## State representation
- `positions`: array[6] of node assignments (3 per player) over the 9-node graph.
- `to_move`: player index.
- `position_history`: multiset of prior full-board states, for R5.
## Action space
- `move(piece_id, target_node)` — legal iff `target_node` is graph-adjacent to
`piece_id`'s current node and currently empty.
## Playability notes
- Small, fully enumerable state space (9 nodes, 6 pieces) — trivially solvable by
brute-force minimax or even exhaustive search; a good candidate for a "solved game"
demonstration rather than requiring heuristic AI.
- Nothing physical is lost in adaptation; this is already an abstract board game.
## Implementation hints
Represent the board as a fixed adjacency list (8 perimeter edges + 8 spoke-half edges
through the center) rather than 2D coordinates, since the win condition (R4) is purely
graph-collinearity, not Euclidean geometry.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Shisima (Kenya). (n.d.). Games of Countries. https://gamesofcountries.com/games/ke-kenya/shisima
@misc{gamesofcountries-ke-kenya-shisima,
title = {Shisima (Kenya)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/ke-kenya/shisima}
}