Skip to main content
Formal Specification

Doors (Greek Backgammon) — Formal Specification

Greece · board-race · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Portes — AI-optimized specification ## General idea A discrete, two-player race and capture board game played on a 24-point linear graph with counter-flowing paths. Players advance 15 checkers according to dice rolls, capture isolated opposing checkers ("blots") to the bar, construct blockading two-checker points ("doors"), and bear off all pieces once gathered in their home quadrant. Identical to Western backgammon in movement and hit logic, but without a doubling cube. ## Formal model - **Abstraction taken:** None required (`fidelity_class: direct`). The board is modeled as a 24-node line graph with player-specific directional indices 1..24, a bar state, and an off-board terminal state. - **Player/agent count:** Exactly 2 agents (Player 0 and Player 1). - **Turn model:** Sequential alternating turns. Each turn begins with rolling 2 independent d6 dice (or 4 moves on doubles). ## Formal rules R1. State space: Board consists of 24 points indexed 1..24. Checkers of Player 0 move from 24 down to 1 (home table: 1..6); Checkers of Player 1 move from 1 up to 24 (home table: 19..24). R2. Starting setup: - Player 0: 2 on pt 24, 5 on pt 13, 3 on pt 8, 5 on pt 6. Bar = 0, Off = 0. - Player 1: 2 on pt 1, 5 on pt 12, 3 on pt 17, 5 on pt 19. Bar = 0, Off = 0. R3. On a turn, roll D=(d1,d2) uniformly from {1..6}2. If d1=d2, available move list is [d1,d1,d1,d1], else [d1,d2]. R4. Legal move rules: - If `bar[active] > 0`: Active agent must re-enter a checker from the bar onto target point `25 - die` (for P0) or `die` (for P1). If that target point contains ≥2 opposing checkers, entry on that die is illegal. - If `bar[active] == 0`: A checker on point p may move to p′=p∓die (depending on player direction) provided target point contains <2 opponent checkers. - Hitting: If target point contains exactly 1 opponent checker, the opponent checker is moved to `bar[opponent] += 1` and the active checker occupies the point. - Point creation: If target point contains ≥1 friendly checkers, it becomes a closed door ("πόρτα") blocking opponent landing. R5. Bearing off: - Precondition: All 15 friendly checkers are either on points within the home board or already borne off (`off[active]`). - An exact roll bears off a checker from point `die` (from home boundary). - If no checker exists on the exact die point, but higher points within the home table are also empty, a checker from the highest occupied point may be borne off. R6. [gap-fill] Mandatory move consumption: A player must use as many rolled dice as legally possible. If only one of the two dice can be played, the higher die value must be played. R7. Win condition: - The first agent to reach `off[active] == 15` wins immediately. - If `off[opponent] > 0`, score is 1 point (single win). - If `off[opponent] == 0`, score is 2 points (dipló / double win). ## Edge cases - Tie at the end condition: Not applicable — the first agent to bear off their 15th checker wins immediately on their turn; turns are sequential so simultaneous completion is impossible. - A player with no legal move: If no legal moves can be made with the remaining dice in the active roll, all unused dice are forfeited and turn passes immediately to the opponent. - Repetition / cycles: Bounded — checkers advance monotonically toward their home quadrant; only being hit resets a checker to the bar, which must re-traverse forward. Infinite cycling is theoretically possible if both players perpetually hit each other, but [gap-fill] a hard cap of 400 total plies triggers a draw adjudication if reached. - Simultaneous claims on the same resource or position: Not applicable — strictly sequential turns; friendly checkers stack arbitrarily on a point, while opponent doors preclude landing. - Player elimination mid-round; turn order repair: Not applicable — 2-agent fixed alternating rotation until termination. - Resource exhaustion: Checkers and board points are conserved constants (N=30, 24 points). - Termination guarantee: Monotonic progress during bearing-off ensures eventual termination almost surely given non-zero probabilities of unblocked advancement and bearing-off rolls. ## State representation - Persistent state: - `board`: Array of 24 integers, positive for Player 0 count, negative for Player 1 count, 0 for empty. - `bar`: Array of 2 integers `[p0_bar, p1_bar]`. - `off`: Array of 2 integers `[p0_off, p1_off]`. - `turn`: Active player index (0 or 1). - `match_score`: Array of 2 integers `[p0_score, p1_score]`. - `ply_count`: Integer tracking elapsed plies. - Per-turn ephemeral state: - `dice_remaining`: List of available die values (e.g. `[4, 2]` or `[6, 6, 6, 6]`). - Observable information: Fully observable by both agents. ## Action space - `move(from_point, die_value)`: - `from_point`: `0..24` (`0` represents the bar). - `die_value`: An element of `dice_remaining`. - `pass()`: Auto-triggered if and only if no legal `move` exists for any remaining die. ## Playability notes - Single-player-vs-AI: Engine-ready. Directly implementable with standard expectiminimax, Monte Carlo Tree Search (MCTS), or reinforcement learning (e.g., TD-Gammon style policy networks). - Group games (n>4): Not applicable (strictly 2-player). - Physical-skill games: Not applicable (discrete board game). - What is lost in adaptation: Physical sound, speed of slapping checkers, and psychological tavern bluffing. ## Implementation hints - Very low state space complexity; branching factor averages 10–25 per turn depending on roll and board openness. - Re-use standard backgammon move-generator structures, omitting the doubling cube and backgammon triple-gammon scoring logic. - Suggested first milestone: Deterministic move generator verifying R4, R5, R6 on benchmark board positions.

Download as JSON

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

Download JSON
Cite this page

Tavli (Portes) (Greece). (n.d.). Games of Countries. https://gamesofcountries.com/games/gr-greece/tavli-portes

@misc{gamesofcountries-gr-greece-tavli-portes,
  title = {Tavli (Portes) (Greece)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/gr-greece/tavli-portes}
}