Skip to main content
Formal Specification

Sack Races — Formal Specification

Andorra · strength-endurance · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: abstractedGap-fills: 1
# Curses de sacs — AI-optimized specification ## General idea A discretized multi-agent race where competitors advance along parallel 1D tracks via discrete hopping actions. Each hop choices balance stride length (speed) against stumble/fall probability; stumbling imposes recovery delay ticks. ## Formal model - **Abstraction taken:** Continuous physical jumping inside a burlap sack is discretized into a 1D grid `[0, L]` where `x = 0` is the start and `x = L` (default `L = 30` meters) is the finish. A stochastic risk-reward mechanic governs forward movement vs. fall penalties. - **Player/agent count:** 2 to 12 agents racing concurrently. - **Turn model:** Synchronous discrete time ticks (`dt = 0.5s`). ## Formal rules R1. Setup: Each agent `i` starts at position `pos[i] = 0`, state `status[i] = STANDING`, recovery counter `recovery_ticks[i] = 0`. R2. On each tick `t`, each standing agent chooses an exertion mode: - `Hop_Safe`: Advances `+1` meter; `P(fall) = 0.01`. - `Hop_Normal`: Advances `+2` meters; `P(fall) = 0.08`. - `Hop_Sprint`: Advances `+3` meters; `P(fall) = 0.25`. R3. Fall resolution: R3.1. If an agent falls: `status[i]` becomes `FALLEN`, `recovery_ticks[i]` is set to 2 ticks (modeling standing up and adjusting the sack), and position does not advance on this tick. R3.2. While `recovery_ticks[i] > 0`, the agent cannot take hop actions; `recovery_ticks[i]` decrements by 1 per tick. R3.3. When `recovery_ticks[i] == 0`, `status[i]` reverts to `STANDING`. R4. Win condition: The first agent `i` to achieve `pos[i] >= L` wins. R5. [gap-fill] Simultaneous finish resolution: If multiple agents cross `L` on the exact same tick, the agent with the largest overflow `pos[i] - L` wins; if equal, a dead-heat tie is recorded. ## Edge cases - Tie at the end condition: Resolved via overflow distance in R5, or recorded as a tie. - A player with no legal move: Not applicable — choosing an exertion mode is always available when standing. - Repetition / cycles: Bounded because position `pos[i]` is monotonically non-decreasing (`pos` never resets backward on falls) and `L` is finite. - Simultaneous claims on the same resource or position: Not applicable — agents occupy dedicated parallel lanes. - Player elimination mid-round: Disconnected agents are set to `FALLEN` permanently; remaining agents finish the race. - Resource exhaustion: Not applicable — distance to finish is finite. - Termination guarantee: Guaranteed by monotonic position advancement and bounded recovery ticks. ## State representation - Persistent state: `race_distance_L` (int), `rankings` (list of finished agent_ids). - Per-tick ephemeral state: `pos` (array of ints indexed by agent_id), `status` (array of enum: STANDING / FALLEN), `recovery_ticks` (array of ints). - Observable information: Fully observable — all agent positions and statuses are public. ## Action space - `hop(mode)`: Choose `Hop_Safe`, `Hop_Normal`, or `Hop_Sprint`. ## Playability notes - Single-player-vs-AI: Natural — human player calibrates risk strategy against AI racers operating on diverse risk profiles. - Group games (n>4): Simulates large heats cleanly with no communication overhead. - Physical-skill games: Dynamic balance and leg fatigue abstracted into risk-weighted hop distributions. - What is lost: The visceral comedy of tripping forward into grass and the physical friction of burlap on shins. ## Implementation hints Extremely simple and robust Markov decision process. Easy to implement in <100 lines of simulation logic. First milestone: Verify that high-risk sprint strategies produce higher variance in finish times than conservative strategies.

Download as JSON

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

Download JSON
Cite this page

Sack Races (Andorra). (n.d.). Games of Countries. https://gamesofcountries.com/games/ad-andorra/curses-de-sacs

@misc{gamesofcountries-ad-andorra-curses-de-sacs,
  title = {Sack Races (Andorra)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ad-andorra/curses-de-sacs}
}