Formal Specification
Malagasy Strategic Board Game of Kings — Formal Specification
Madagascar · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Fanorona — AI-optimized specification
## General idea
Madagascar's royal abstract strategy board game, historically used by Merina sovereigns for divination,
military tactics, and political succession. Played on an Alquerque-derived 9x5 grid of 45 intersection points
connected by orthogonal and diagonal lines, each player commands 22 pieces with the center point starting vacant.
Fanorona is internationally renowned for its dual capture mechanism: **Approach (*Mpitondra*)** (moving toward
an enemy piece to capture it and all contiguous enemy pieces in a straight line behind it) and **Withdrawal
(*Mpisintona*)** (moving away from an enemy piece to capture it and the line behind it). Capturing moves can
chain into multi-capture sequences within the same turn along changing vector directions without revisiting points.
## Formal model
- **Abstraction taken:** None. Discrete 45-point graph topology, deterministic mechanics, perfect information.
- **Player/agent count:** Exactly 2 players (White vs Black).
- **Turn model:** Alternating sequential turns; capturing moves allow multi-step chaining within a single turn.
## Formal rules
R1. Board and pieces (entry §1): played on a **9x5 grid** (45 intersection points connected by orthogonal lines,
with diagonal lines on alternating intersections). Player 1 commands **22 white pieces**, Player 2 commands
**22 black pieces**, and the **center intersection starts vacant**.
R2. Simple movement (entry §2): on a non-capturing turn, a piece slides **1 step along an inscribed line**
to an adjacent vacant intersection.
R3. Approach capture (*Mpitondra*, entry §3): moving a friendly piece onto a vacant point directly toward an
adjacent enemy piece along a line **captures that enemy piece and all contiguous enemy pieces in a straight
line directly behind it**. All captured pieces are removed from the board.
R4. Withdrawal capture (*Mpisintona*, entry §3): moving a friendly piece onto a vacant point directly away
from an adjacent enemy piece along a line **captures that enemy piece and all contiguous enemy pieces in
a straight line directly behind it**.
R5. Simultaneous approach and withdrawal:
[gap-fill: if a move simultaneously approaches one enemy line and withdraws from another, the player must
explicitly declare which enemy line is captured; both lines cannot be captured on the same step].
R6. Multi-capture chaining (*Paika*, entry §4): a piece that makes a capture may **continue making additional
captures in the same turn** along available lines, subject to two restrictions:
- It may **not change direction along the same straight line** (must change direction at each step);
- It may **not revisit any intersection point** already occupied during that turn's chain.
R7. Victory (entry §5): a player wins by **capturing all 22 opponent pieces**.
R8. Mandatory capture and passing:
[gap-fill: the entry does not specify whether capture is mandatory if available; standard Malagasy rules
permit passing after any step in a capture chain, but non-capturing moves cannot be chosen if a capture exists].
R9. Draw rules:
[gap-fill: the entry defines no draw rule for three-fold repetition or non-progress; a 50-move limit is
standard for digital engines].
## Edge cases
- Tie at the end: unaddressed; the entry defines only decisive victory by total capture (R7) and provides
no draw rule for perpetual piece chasing.
- A player with no legal move: unaddressed; if a player's remaining pieces are completely immobilized,
standard practice treats immobilization as a loss, but the entry omits the rule.
- Repetition / cycles: unaddressed; endgame maneuvers between small numbers of pieces can cycle indefinitely
without captures; an implementation must enforce three-fold repetition or move-limit draws.
- Simultaneous claims on one position: not applicable; strictly alternating turns and each intersection holds
at most one piece.
- Elimination mid-round and turn-order repair: pieces are eliminated from the board via approach/withdrawal (R3, R4),
but players remain active; strict two-player alternation is invariant.
- Resource exhaustion: pieces on the board deplete monotonically via captures from 44 toward zero.
- Termination guarantee: not guaranteed; while captures are strongly monotone, players may execute infinite
sequences of non-capturing sliding moves if captures are avoided, and no repetition rule is in the raw entry text.
## State representation
- Persistent state: `board[5][9]` ∈ {empty, white, black}, `pieces_remaining[2]` ∈ {0..22}, `active_player` ∈ {0, 1}.
- Per-turn ephemeral state: `chain_path` (list of visited points), `last_direction`, `chain_active` (bool).
- Observable information: fully observable, perfect information.
## Action space
- `move_simple(from_pt, to_pt)`: active player slides piece to adjacent vacant point without capturing (R2).
- `capture_approach(from_pt, to_pt)`: active player moves toward enemy line, capturing all contiguous enemy pieces (R3).
- `capture_withdrawal(from_pt, to_pt)`: active player moves away from enemy line, capturing all contiguous enemy pieces (R4).
- `chain_continue(to_pt, capture_type)`: continuation step in an active capture chain along a new vector (R6).
- `chain_pass()`: player voluntarily terminates an active multi-capture chain (R6).
## Playability notes
- Single-player-vs-AI: extraordinary strategic and tactical depth; the chaining mechanic creates massive
branching spikes during tactical sweeps (*Velo* / *Paika*).
- Reducing n > 4 to 2 agents: not applicable; strictly two-player.
- Physical-skill games: not applicable; pure combinatorial board game.
- What is lost: the sacred royal Merina ceremonial divination, stone-slab incising, and oral folklore chants.
## Implementation hints
Model the 9x5 grid with explicit line connectivity: orthogonal edges connect all adjacent nodes; diagonal
edges exist only where `(row + col) % 2 == 0`. Implement ray-casting for R3 (Approach) and R4 (Withdrawal)
along the movement vector: Approach scans forward from `to_pt` in direction `dir`; Withdrawal scans backward
from `from_pt` in direction `-dir`. Contiguous pieces of opponent color along the ray are removed. Enforce
R6 chaining constraints strictly: maintain `visited_points_in_turn` and ensure `new_dir != current_dir` and
`new_dir != -current_dir`. Add three-fold repetition detection to guarantee engine termination.
Suggested first milestone: 9x5 board with approach/withdrawal ray captures and multi-step chaining validation.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Fanorona (Madagascar). (n.d.). Games of Countries. https://gamesofcountries.com/games/mg-madagascar/fanorona
@misc{gamesofcountries-mg-madagascar-fanorona,
title = {Fanorona (Madagascar)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/mg-madagascar/fanorona}
}