Skip to main content
Formal Specification

The Bars (Prisoners' Base) — Formal Specification

Jersey · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Les Barres — AI-optimized specification ## General idea A dynamic multi-agent tag and territory game where legal capture authority depends on temporal priority ("freshness"). Two teams operate from home bases at opposite ends of a 2D grid. Stepping off the home line records an entry timestamp; an agent can tag any opposing agent whose active timestamp is strictly older, creating an emergent cat-and-mouse dynamic of baiting, refreshing, and rescuing captured teammates from prison. ## Formal model - **Abstraction taken:** The continuous field is discretized into a 2D grid X×Y (20×10 cells). Time progresses in discrete ticks t=0,1,2,…. Continuous movement is replaced by 1-cell orthogonal or diagonal moves per tick. - **Player/agent count:** 2 teams (Team A and Team B), with N=4 agents per team (standard) or N=1 agent per team (minimal tactical duel). - **Turn model:** Simultaneous-move execution per tick: all agents submit movement/tag actions, which are validated and resolved in order of freshness. ## Formal rules R1. Grid Topology: The board is an L×W grid (X∈[0,19],Y∈[0,9]). - Team A Home Base: X=0. Team A Prison: (19,0). - Team B Home Base: X=19. Team B Prison: (0,9). R2. Agent State Vector: Each agent i has state (xi,yi,statusi,tentry,i) where: - statusi∈{AT_BASE,IN_FIELD,PRISONER,ESCORTED,IMMUNE_RETURN}. - tentry,i is the discrete tick index when the agent last transitioned from AT_BASE to IN_FIELD. R3. Movement: At each tick, active agents in IN_FIELD or IMMUNE_RETURN may move to an adjacent cell (Chebyshev distance ≤1). - Moving into one's own home base resets status to AT_BASE and clears tentry. - Exiting one's home base into X∈[1,18] sets status to IN_FIELD and updates tentry,i=tcurrent. R4. Tagging and Freshness: - If agent Ai and agent Bj occupy the same cell or adjacent cells (distance ≤1): - If tentry,Ai>tentry,Bj, agent Ai captures Bj. - Bj transitions to PRISONER at Team A's prison location (19,0). - If tentry,Ai=tentry,Bj [gap-fill: simultaneous exit results in mutual bounce with no capture]. R5. Prison and Rescue: - Multiple prisoners at a prison form a chain: Prisoner k at distance k from the prison anchor. - If an active teammate in IN_FIELD reaches a cell adjacent to any member of the prisoner chain, all prisoners in that chain and the rescuer transition to IMMUNE_RETURN. - Agents in IMMUNE_RETURN move directly toward their home base and cannot tag or be tagged. R6. Win Conditions: - A team wins immediately if all N opposing agents are concurrently in PRISONER state. - Alternatively, an active agent who steps onto the opponent's home base line without being tagged scores an immediate win for their team. R7. [gap-fill] Max-Tick Termination: If neither win condition is achieved by Tmax=200 ticks, the team with fewer active prisoners wins; if equal, the match is a draw. ## Edge cases - Tie at the end condition: Resolved via R7 (fewer prisoners, then draw). - A player with no legal move: Agents in prison have no movement actions until rescued; agents at base can always remain at base or exit. - Repetition / cycles (and the loop-breaking rule): Bounded by the hard tick horizon Tmax=200. - Simultaneous claims on the same resource or position: Simultaneous entry to a cell by two opposing players is resolved by freshness check (tentry); if timestamps are identical, both agents bounce back to their previous tick coordinates. - Player elimination mid-round; turn order repair: Captured agents enter prison state and are skipped in active field collision checks until liberated. - Resource exhaustion (pieces, tokens, space, time): Grid cells and agent counts are constant; time is bounded by Tmax. - Termination guarantee: Guaranteed by the hard cap Tmax=200 combined with immediate terminal states in R6. ## State representation - Persistent state: - `tick`: Integer counter ∈[0,200]. - `agents`: Array of 8 agent objects (x,y,team,status,tentry). - Ephemeral state (per tick): - `declared_moves`: Map of agent ID →(Δx,Δy). - Observable information: Fully observable game; all agent coordinates, team affiliations, statuses, and entry timestamps are known to all agents. ## Action space - `move(dx, dy)`: Δx,Δy∈{−1,0,1}. Valid for IN_FIELD and IMMUNE_RETURN. - `stay_at_base()`: Valid for AT_BASE. - `step_out()`: Transitions from AT_BASE to IN_FIELD, updating tentry. ## Playability notes - Single-player-vs-AI: Highly playable; human commands one agent (or a squad) against an AI opponent. The AI maintains a priority queue of enemy freshness timestamps and calculates safety corridors to enemy prison/base. - Group games (n>4): The 4×4 multi-agent form cleanly abstracts full squad dynamics without rules modification. - Physical-skill games: Physical sprinting speed is abstracted into uniform grid movement speed; the game becomes a pure game-theoretic spatial coordination and timing problem. - What is lost in the adaptation: Acceleration bursts, feints, physical reach, and simultaneous multi-body tag collisions. ## Implementation hints - Freshness tracking is trivial: a single integer `last_exit_tick` per agent. - State evaluation function for AI agents can compute: +C1⋅(enemy_prisoners)−C2⋅(own_prisoners)+C3⋅(min_dist_to_enemy_base). - Recommended first milestone: Implement a 1v1 duel on a 10×5 grid to verify freshness capture logic and base touching before expanding to 4v4 with prison rescue chains.

Download as JSON

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

Download JSON
Cite this page

The Bars (Prisoners' Base) (Jersey). (n.d.). Games of Countries. https://gamesofcountries.com/games/je-jersey/les-barres

@misc{gamesofcountries-je-jersey-les-barres,
  title = {The Bars (Prisoners' Base) (Jersey)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/je-jersey/les-barres}
}