Formal Specification
Hopscotch — Formal Specification
Israel · dexterity-throw · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Klas — AI-optimized specification
## General idea
Klas (Hopscotch) is a level-based linear progression game played on a discretized grid graph. On each level , an agent must first throw a projectile to land within the boundaries of a specific node , and then traverse the entire graph on single or double-node steps while skipping node , retrieving the projectile, and returning. The challenge is balancing movement speed with stochastic physical-balance checks.
## Formal model
- **Abstraction taken:** The 10-square hopscotch board is represented as an undirected graph .
- where is the start/exterior node.
- Edges connect adjacent blocks: .
- Double blocks , , and are represented as single compound nodes requiring double-foot landing.
- **Player/agent count:** 1 to n players, sequential turns.
- **Turn model:** Sequential. A player attempts their current level . If they succeed, they increment their level and can immediately play again [gap-fill] up to a maximum of 2 consecutive successful runs per turn to prevent total game-monopolization. If they fail (fault), the turn passes.
## Formal rules
R1. **State variables:** Each agent has state `level` (integer, range 1 to 10).
R2. **The Throw Action:** The agent executes `throw_tush(target_node)`. The outcome is resolved stochastically:
- If the throw fails (lands on a line or in the wrong node), a fault is declared and the turn ends.
R3. **The Jump Course:** If the throw succeeds, the agent must execute a sequence of hops traversing the path from to and back.
- Each transition on the graph is resolved with a balance check:
- `Multiplier` is for single nodes, for double-landing nodes, and when picking up the stone on the return.
- During the traversal, the agent is forbidden from entering the node containing the thrown stone.
R4. **Retrieval:** On the return traversal, when the agent is at node adjacent to , they must execute the action `retrieve_stone()`.
- This requires a high-difficulty balance check ().
- If successful, the stone is removed from , and the agent can complete the traversal back to node .
R5. **Faults:** Any failed balance check () immediately halts the traversal, resets the stone to the player's pocket, and ends the turn. The player's level does not change.
R6. **Win Condition:** The first player to successfully complete level 10 (the final run) wins the game.
## Edge cases
- **Tie at the end condition:** Not applicable; turns are strictly sequential.
- **A player with no legal move:** Not applicable; players can always attempt a throw.
- **Repetition / cycles:** Because players can only progress forward (increasing level) and failures merely pass the turn without regression, the game state is strictly bounded and will eventually terminate.
- **Simultaneous claims on the same resource:** Not applicable; players use the grid individually on separate turns.
- **Player elimination mid-round:** Removed from rotation; remaining order continues.
- **Resource exhaustion:** Not applicable.
- **Termination guarantee:** Guaranteed as long as the player's base accuracy and balance are non-zero.
## State representation
- **Persistent state:**
- `player_levels`: Map of `player_id` to integer `[1..10]`.
- `active_player_index`: Integer.
- **Per-turn ephemeral state:**
- `thrown_stone_node`: Integer representing which node currently holds the stone (, or if not thrown).
- `agent_position`: Node index on the graph.
- `traversal_direction`: Enum `[OUTBOUND, RETURNING]`.
## Action space
- `throw_tush(level)`: Attempt to land the stone in the square corresponding to the active level.
- `hop_to_node(node_id)`: Execute a jump transition to an adjacent node.
- `retrieve_stone()`: Pick up the stone from the adjacent node. Precondition: agent is adjacent to the node containing the stone on the return leg.
## Playability notes
- **Single-player-vs-AI:** Highly suitable. The human competes against AI agents whose slip rates and throw accuracies are calibrated to match human physical standards.
- **Group games (n>4):** Generalizes easily since turn mechanics are individual.
- **Physical-skill games:** [gap-fill] The physical challenge is abstracted into a series of Bernoulli trials along a graph-traversal route, with the probabilities depending on the node types and the retrieval phase.
- **What is lost in the adaptation:** The physical sensation of balancing on one leg, physical fatigue, and the fine motor control of throwing a flat stone onto a chalk line are fully collapsed into abstract probability calculations.
## Implementation hints
- Represent the grid as a clean array/list structure.
- Build the sequential traversal loop where the system validates that the player skips the "active" block.
- Add the retrieval step requiring a specific position check on the return leg.
- Calibrate the accuracy and slip probabilities to provide a satisfying, non-punitive progression.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Hopscotch (Israel). (n.d.). Games of Countries. https://gamesofcountries.com/games/il-israel/klas
@misc{gamesofcountries-il-israel-klas,
title = {Hopscotch (Israel)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/il-israel/klas}
}