Skip to main content
Formal Specification

Go / Surrounding Game — Formal Specification

Japan · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Igo — AI-optimized specification ## General idea A two-player perfect-information deterministic abstract strategy game played on a 19x19 grid of 361 intersections. Players alternate placing black and white stones to enclose vacant intersections (territory) and capture opponent stone groups by depriving them of orthogonal liberties, culminating in Japanese territory scoring adjusted by komi. ## Formal model - **Abstraction taken:** None required; traditional Japanese professional Go rules form an exact, mathematically complete discrete system. - **Player/agent count:** 2 players (Black / *Kuro* and White / *Shiro*). - **Turn model:** Strictly sequential alternating turns. ## Formal rules R1. Board setup: A 19x19 grid with 361 vertices (*moku*), initially all empty. Black moves first. R2. On each turn, the active player must either place one stone on an unoccupied vertex or declare a `PASS`. R3. Groups and Liberties: - Stones of the same color orthogonally adjacent form an indivisible group (chain). - Unoccupied vertices orthogonally adjacent to any stone in a group are its "liberties". - If a move fills the last liberty of an enemy group, that entire group is captured (*tori*), removed from the board, and placed into the captor's prisoner bank (*agehama*). R4. Suicide Prohibition: A player cannot play a stone on a vertex that leaves that stone or its group with 0 liberties, unless that move simultaneously captures one or more adjacent enemy stones. R5. Basic Ko Rule (*Kō*): A player cannot make a move that recaptures a single stone if that move immediately reproduces the exact board state from the previous turn. R6. Game End Trigger: The game terminates immediately when both players declare `PASS` in consecutive turns. R7. Territory Scoring (Japanese Rules): - Agreed "dead" enemy stones on the board are removed and added to the captor's prisoners. - Each player's score equals their surrounded empty territory vertices (*ji*) minus the number of their stones held as prisoners by the opponent. - White receives a compensation offset (*komi*) of 6.5 points. - The player with the higher total score wins. Ties are impossible due to fractional komi. R8. [gap-fill] Superko / cycle resolution: If a complex multi-stone repetition (e.g., triple ko, round-robin ko, or *chōsei* eternal life) reproduces the identical full-board position for the third time, the game terminates immediately as a void draw (*no contest*). R9. [gap-fill] Dispute resolution protocol: If players disagree on the life/death status of stones during the post-pass scoring phase, play resumes from the passed position to settle capture status directly. R10. [gap-fill] Maximum move hard cap: If a game reaches 722 moves (twice the total board capacity) without consecutive passes, the match terminates automatically and is scored by area counting. ## Edge cases - **Tie at the end condition:** Prevented by the fractional 6.5 komi point addition to White's total. - **A player with no legal move:** A player can always legally choose `PASS`. - **Repetition / cycles:** Basic single-stone cycles are prohibited by R5; multi-move cycles terminate in a draw via R8. - **Simultaneous claims on the same resource or position:** Not applicable; turns are strictly sequential, and an occupied vertex cannot be played on. - **Player elimination mid-round:** Not applicable; 2-player game with no player removal. - **Resource exhaustion:** Stone supply is effectively infinite; captured stones recirculate as scoring markers. - **Termination guarantee:** Guaranteed by consecutive-pass terminal trigger (R6) and the 722-move maximum cap (R10). ## State representation - **Persistent state:** `board` (19x19 grid with values `EMPTY | BLACK | WHITE`), `prisoners[2]` (counts of captured stones), `consecutive_passes` (0, 1, or 2), `active_player` (BLACK or WHITE), `board_history` (hash set of past board configurations). - **Per-turn state:** `last_move` (coordinate or PASS). - **Observable information:** Fully observable perfect-information game. ## Action space - `place_stone(x: [0..18], y: [0..18])`: Place stone on target intersection. - `pass()`: Forfeit placement and pass turn. - `resign()`: Concede match immediately. ## Playability notes - **Single-player-vs-AI:** Benchmark domain for AI (AlphaGo, KataGo); perfectly suited for Monte Carlo Tree Search (MCTS) paired with deep value/policy neural networks. - **Group games (n>4):** Strictly a 2-player abstract; pair go (rengo) alternates two-player teams with strict communication bans. - **Physical-skill games:** Not applicable (pure abstract strategy). - **What is lost in the adaptation:** The physical tactile placement of slate and clamshell stones onto kaya wood boards. ## Implementation hints Discrete 2D array or 1D array of 361 elements. Board state evaluation requires fast disjoint-set (union-find) data structures for tracking group liberties and flood-fill algorithms for territory calculation. First milestone: implement legal move generation with suicide and basic ko filters on a 9x9 board.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Igo (Japan). (n.d.). Games of Countries. https://gamesofcountries.com/games/jp-japan/igo

@misc{gamesofcountries-jp-japan-igo,
  title = {Igo (Japan)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/jp-japan/igo}
}