Formal Specification
Macaca / Portuguese Hopscotch — Formal Specification
Portugal · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 4
# Jogo da Macaca — AI-optimized specification
## General idea
A turn-based race where agents attempt to complete 10 sequential grid stages of increasing distance. Each stage consists of a stone-throwing accuracy check followed by a series of discrete hopping balance checks across the hopscotch layout. The first agent to complete stage 10 wins.
## Formal model
- **Abstraction taken:** Physical stone toss and single-leg hopping balance are modeled as independent Bernoulli trials parameterized by stage difficulty and agent precision/balance attributes.
- **Player/agent count:** 2 agents (Agent 0, Agent 1).
- **Turn model:** Sequential alternating turns.
## Formal rules
R1. Setup: Stages `S = {1..10}`. Both agents start at `stage = 1`.
R2. On an agent's turn, the agent attempts their current `stage = k`:
- **Toss Check:** Success probability `P(toss_ok | k) = 0.95 - 0.04 * k` [gap-fill] (reflecting increasing distance to farther squares).
- If toss fails (lands on line or out of bounds): Turn ends immediately with no stage advance.
- **Hopping Course Check:** If toss succeeds, agent executes the hop-through sequence.
- Number of hopping steps `N_steps = 10`.
- Per-step balance failure probability `P(step_fail) = 0.02` [gap-fill].
- Overall course success: `Course_OK = product_{i=1}^{N_steps} (1 - P(step_fail)) ~= 0.817`.
- **Stone Retrieval Check:** Single-leg balance pickup check with `P(pickup_ok) = 0.95` [gap-fill].
R3. Stage Advancement:
- If Toss, Hopping Course, and Retrieval ALL succeed: Agent's stage increments (`stage = stage + 1`).
- If any check fails: Agent's stage remains unchanged, and turn ends immediately.
R4. Turn passes to the opposing agent.
R5. Win condition: The first agent to complete stage 10 (`stage == 11`) wins the game immediately.
## Edge cases
- Tie at the end condition: First agent to complete stage 10 wins; no simultaneous turns, so no tie is possible.
- A player with no legal move: Not applicable; attempting the current stage is always legal.
- Repetition / cycles: Stages are non-decreasing (`stage` never decreases on failure); bounded by stage 10.
- Simultaneous claims on the same resource or position: Turns are strictly sequential; each agent interacts with their own virtual grid.
- Player elimination mid-round: If an agent disconnects, the remaining agent continues solo to complete the race.
- Resource exhaustion (pieces, tokens, space, time): Hard round limit of 40 turns per agent [gap-fill].
- Termination guarantee: Non-zero positive probability of stage completion per turn (`P(stage_advance | k) > 0.40`) ensures convergence to stage 10 in finite expected turns (~20 turns).
## State representation
- Persistent state: `current_stages: [int, int]` (values 1..11), `turns_taken: [int, int]`, `active_agent: int`.
- Per-turn ephemeral state: `toss_success: bool`, `hop_success: bool`, `retrieval_success: bool`, `stage_advanced: bool`.
- Minimal observable information: Fully observable public race progress.
## Action space
- `attempt_stage(risk_modifier: Enum)`: where `risk_modifier in {cautious, normal, aggressive}` (trades toss precision for balance speed).
## Playability notes
- Single-player-vs-AI: Engine-ready. Highly engaging solitaire time trial or race against AI opponent.
- Group games (n>4): Extends to n players without structural change by cycling through agent roster.
- Physical-skill games: Physical foot-eye coordination abstracted into the 3-tier stochastic pipeline (Toss -> Course -> Pickup).
- What is lost in the adaptation: Muscular fatigue, wind resistance, and irregular pavement texture.
## Implementation hints
Very low complexity state. Single integer counter per agent. Suggested milestone 1: Implement the 3-stage Bernoulli pipeline and run Monte Carlo simulations to verify average match length (~20 turns).
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Macaca / Portuguese Hopscotch (Portugal). (n.d.). Games of Countries. https://gamesofcountries.com/games/pt-portugal/jogo-da-macaca
@misc{gamesofcountries-pt-portugal-jogo-da-macaca,
title = {Macaca / Portuguese Hopscotch (Portugal)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/pt-portugal/jogo-da-macaca}
}