Formal Specification
The Potters are Coming — Formal Specification
Israel · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 3
# Kadarim Ba'im — AI-optimized specification
## General idea
Kadarim Ba'im is a spatial grid game played on a bounded 2D field. A set of runners must cross from the top row to the bottom row, while a set of taggers (initially one) in the middle row attempts to intersect and tag them. The critical mechanic is the directional constraint: runners can only move forward or laterally, preventing backtracking. Any tagged runner is recruited into the tagger team for the next charge, creating a compounding defensive wall.
## Formal model
- **Abstraction taken:** The rectangular field is discretized as a 2D grid of size and .
- is Safe Zone A (top).
- is Safe Zone B (bottom).
- are the side boundary bounds. Stepping outside or is an out-of-bounds fault.
- **Player/agent count:** agents. Initially, 1 is designated Tagger, are Runners.
- **Turn model:** Simultaneous-movement ticks. Each tick, all active players commit their next grid movement step.
## Formal rules
R1. **State variables per agent:**
- `x` (), `y` ().
- `role`: Enum `[RUNNER, TAGGER]`.
- `direction`: Enum `[SOUTH, NORTH]` indicating current target safe zone (SOUTH is Safe Zone B, NORTH is Safe Zone A).
R2. **The Charge Dialogue:** A charge begins with all Runners at (where is either or ). Runners set their `direction` to the opposite side.
R3. **The Movement Step:** Each tick, players commit an action.
- **Runner Move Set:** A runner can move to an adjacent grid cell or where if direction is SOUTH, and if direction is NORTH. [gap-fill] Backward movement (opposite of ) is strictly illegal.
- **Tagger Move Set:** A tagger can move to any adjacent cell (fully omnidirectional).
R4. **Collision and Tagging:**
- If a Tagger and a Runner occupy the same grid cell at the end of a tick, or pass through each other along an edge during a tick, the Runner is tagged.
- Tagged status: `role` is immediately set to `TAGGER` for the next charge.
R5. **Completing a Charge:** A charge ends when all untagged runners reach their target safe zone ( or ).
- Any runner who stepped out of bounds ( or ) is tagged and begins the next charge as a Tagger.
- For the subsequent charge, the remaining runners reverse their `direction`, and the process repeats.
R6. **Win Condition:** The game terminates when only one Runner remains untagged at the end of a charge. That agent is declared the winner of the match.
## Edge cases
- **Tie at the end condition:** If the last two runners are tagged on the same tick, the one who was closer to the target safe zone (lower distance to safety) is declared the winner.
- **A player with no legal move:** If a runner is blocked by a solid wall of taggers and has no legal forward/lateral cells, [gap-fill] they are forced to stand still. If they stand still for 3 consecutive ticks, they are declared "tagged" by default.
- **Repetition / cycles:** Because runners are forced to move forward on every step toward the opposite end zone, cycles are impossible; a charge is guaranteed to resolve in at most 11 ticks.
- **Simultaneous claims on the same resource:** If multiple taggers attempt to tag the same runner on the same cell, the tag is resolved and the runner is converted; no tagger conflict arises.
- **Player elimination mid-round:** If an agent leaves, they are removed, and the remaining roles are preserved.
- **Resource exhaustion:** Not applicable.
- **Termination guarantee:** Guaranteed by R3 (runners must move forward) and R4 (taggers grow monotonically, guaranteeing all runners eventually get caught).
## State representation
- **Persistent state:**
- `agents`: Array of structs `(id, x, y, role, direction)`.
- `charge_active`: Boolean.
- **Per-tick ephemeral state:**
- `committed_moves`: Map of `agent_id` to `(new_x, new_y)`.
## Action space
- `move_step(dx, dy)`: Move 1 cell. Precondition: the cell is adjacent and complies with role movement constraints (R3).
## Playability notes
- **Single-player-vs-AI:** Highly playable. The user controls a runner trying to weave through a wall of AI taggers. AI taggers use simple coordinate tracking to head off the nearest runner, while AI runners use pathfinding to find lanes of empty cells to safety.
- **Group games (n>4):** Standard format.
- **Physical-skill games:** [gap-fill] Agility and acceleration are simulated by granting Taggers a 10% chance of a double-move action per tick if they are chasing a runner in an adjacent lane.
- **What is lost in the adaptation:** The physical dodging, sidestepping, slipping on grass, or splashing in a pool are collapsed into grid coordinate changes.
## Implementation hints
- Implement the 2D grid coordinate system and the simultaneous movement resolver.
- Write the collision detector that handles both cell-sharing and edge-crossing tags.
- Program the state manager that handles charge end, role conversion, and direction reversal.
- Write a basic pursuit AI for taggers: "Calculate Manhattan distance to nearest runner, move to close the gap."
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Potters are Coming (Israel). (n.d.). Games of Countries. https://gamesofcountries.com/games/il-israel/kadarim-baim
@misc{gamesofcountries-il-israel-kadarim-baim,
title = {The Potters are Coming (Israel)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/il-israel/kadarim-baim}
}