Skip to main content
Formal Specification

Human Chess / Living Xiangqi Pageant — Formal Specification

Vietnam · board-abstract · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Cờ người — AI-optimized specification ## General idea Cờ người is a grand living theatrical adaptation of Xiangqi (Chinese chess) played on a giant outdoor grid where two master strategists direct 32 human pieces. At its core, the game is a deterministic, perfect-information abstract strategy board game governed by classical Xiangqi movement, blocking, cannon-jumping, and checkmate mechanics. The martial arts combat demonstrations accompanying captures are theatrical representations of deterministic piece removals. ## Formal model - **Abstraction taken:** The physical pageantry, human actors, gong signals, and choreographed martial katas (*đấu võ ăn quân*) are abstracted to standard Xiangqi piece state updates; the decision game is modeled directly as classical two-player Xiangqi. - **Player/agent count:** 2 agents (Red/First-player, Black/Second-player). - **Turn model:** Strictly alternating sequential turns (Red moves first). ## Formal rules R1. Board and Setup: - Board is a grid of 9 files × 10 ranks (90 intersections). - River divides ranks 4 and 5 (0-indexed). - Two 3×3 Palaces: Red on files 3–5, ranks 0–2; Black on files 3–5, ranks 7–9. - 32 pieces arranged in standard Xiangqi initial setup (1 General, 2 Advisors, 2 Elephants, 2 Horses, 2 Chariots, 2 Cannons, 5 Soldiers per side). R2. Movement Legality: - **General (*Tướng*):** Moves 1 step orthogonally within the 3×3 Palace. Flying General rule: The two Generals may never face each other along an open vertical file without intervening pieces. - **Advisor (*Sĩ*):** Moves 1 step diagonally within the Palace (5 valid positions). - **Elephant (*Tượng*):** Moves exactly 2 steps diagonally; blocked if the intermediate intersection is occupied (*cản tượng*); cannot cross the River. - **Horse (*Mã*):** Moves 1 step orthogonally followed by 1 step diagonally outward (L-shape); blocked if the adjacent orthogonal intersection is occupied (*cản mã* / horse leg blocked). - **Chariot (*Xe*):** Moves any distance orthogonally along unobstructed lines. - **Cannon (*Pháo*):** Moves like a Chariot when not capturing; captures an enemy piece along an orthogonal line by jumping over exactly one intervening piece (*ngòi* / screen) of either color. - **Soldier (*Tốt*):** Moves 1 step forward. After crossing the River, may move 1 step forward, left, or right. Never moves backward. R3. Captures and In-Check: - Entering an enemy-occupied intersection captures and removes that piece from the board. - A move is illegal if it leaves the friendly General in check (threatened with capture on the opponent's next turn) or exposes the opposing General on an open file. R4. Victory Conditions: - Checkmate (*chiếu bí*): If an agent's General is in check and the agent has no legal move to escape check, that agent loses immediately. - [gap-fill] Stalemate (*vô thế*): If an agent has no legal moves but is not in check, that agent loses (standard Xiangqi convention). - Resignation: An agent may concede at any time. R5. [gap-fill] Repetition and Perpetual Checks: - Perpetual check or perpetual pursuit is strictly forbidden; the player repeating the checking/attacking sequence must alter moves, or forfeit the match if they refuse, following Asian Xiangqi Federation standard loop-breaking rules. R6. [gap-fill] Move Limit Draw: - If 60 consecutive moves occur by both sides without a piece capture or a Soldier advancing past the river, the game terminates in a draw. ## Edge cases - Tie at the end condition: Agreed draw, or triggered automatically by the 60-move rule without captures/pawn advances (R6). - A player with no legal move: Handled by R4; in Xiangqi, having no legal moves (stalemate) results in an immediate loss for the stalemated player. - Repetition / cycles: Bounded by R5 (perpetual check/chase penalty) and R6 (60-move no-progress limit). - Simultaneous claims on the same resource or position: Not applicable; turns are strictly sequential. - Player elimination mid-round; turn order repair: Not applicable; standard 2-player game. - Resource exhaustion: Piece count is strictly non-increasing (max 32 pieces). - Termination guarantee: why the game provably ends: Guaranteed by R5 (anti-repetition rule) and R6 (finite 60-move no-progress draw threshold). ## State representation - Persistent state: - `board`: 9×10 2D array of piece types and colors (or null for empty intersections). - `active_color`: enum `{RED, BLACK}`. - `halfmove_clock`: integer counting moves since last capture or soldier advance. - `position_history`: hash map of board configurations for repetition detection. - Per-round ephemeral state: - `selected_move`: `(from_coord, to_coord)`. - Observable information: - Full, complete information observed by both agents at all times. ## Action space - `move(from_pos, to_pos)`: Validated against standard Xiangqi kinematics and check constraints. - `resign()`: Forfeits the match. - `offer_draw()` / `accept_draw()`: Mutual draw negotiation. ## Playability notes - Single-player-vs-AI: Fully natural; standard perfect-information game solvable with alpha-beta minimax, MCTS, or Xiangqi engines. - Group games (n>4): Not applicable; inherently a 2-player strategic duel. The festival format features 32 human piece-actors, but strategic control rests solely with the two masters. - Physical-skill games: Not applicable; martial demonstrations are purely theatrical and carry zero stochastic outcome on piece survival. - What is lost in the adaptation: The spectacular village festival atmosphere, costume aesthetics, drum rolls, and martial arts choreography. ## Implementation hints - Can be directly plugged into standard Xiangqi chess libraries (e.g., UCCI protocol). - Ensure Horse-blocking (*cản mã*) and Elephant-eye blocking (*cản tượng*) are accurately implemented. - Suggested first milestone: Implement board representation and legal move generator for all 7 piece types, validating against standard Xiangqi checkmate puzzles.

Download as JSON

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

Download JSON
Cite this page

Cờ người (Vietnam). (n.d.). Games of Countries. https://gamesofcountries.com/games/vn-vietnam/co-nguoi

@misc{gamesofcountries-vn-vietnam-co-nguoi,
  title = {Cờ người (Vietnam)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/vn-vietnam/co-nguoi}
}