Formal Specification
Gingerbread Biting — Formal Specification
Netherlands · festival-ritual · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: abstractedGap-fills: 3
# Koekhappen — AI-optimized specification
## General idea
A real-time blinded target capture game where an agent operates under hidden spatial information (blindfolded) to track and capture a dynamic swinging pendulum target (gingerbread slice) using mouth snapping actions. The strategic tension lies in approach velocity: fast lunges cause the suspended target to swing away, whereas slow exploratory probes require acute acoustic/spatial estimation.
## Formal model
- **Abstraction taken:** The blindfolded player is modeled as a sensory-constrained agent in a 2D horizontal plane `(x, y)` relative to a suspended pendulum target. The target has coordinate `(x_target, y_target)` and an oscillation state `(theta, omega)`. The agent receives noisy spatial observations `z = (x_target - x_head) + N(0, sigma_blind)` and chooses head movement and bite timing. [gap-fill]
- **Player/agent count:** 2 to n agents competing simultaneously on independent hanging lines.
- **Turn model:** Real-time ticked simulation (`dt = 0.05` seconds), bounded by time limit `T_max = 60.0` s.
## Formal rules
R1. Setup: Each agent `i` is assigned an independent pendulum slice initialized at `pos_target = (0.0, 0.0)` with zero velocity. Agent head starts at `pos_head = (0.0, -0.30)`. Target cake health `H = 1.0` (100% attached).
R2. On each tick `dt`, the agent submits an action `action = (move_head_x, move_head_y, bite_bool)`.
R3. Dynamic Physics & Sensory Update:
- Head position updates: `pos_head += (move_head_x, move_head_y) * dt`.
- Noisy observation returned to agent: `obs = pos_target - pos_head + noise`.
- If `distance(pos_head, pos_target) < 0.05` and `bite_bool == False` (head bumps cake):
- Cake experiences an impulse: `target_velocity += impulse_vector` (cake swings away).
R4. Bite Action Resolution:
- When `bite_bool == True`:
- If `distance(pos_head, pos_target) <= 0.04`:
- Successful bite: `H -= 0.60` [gap-fill: two clean bites fully consume the slice].
- If `distance(pos_head, pos_target) > 0.04`:
- Missed bite; air snap imparts slight turbulence, pushing cake away slightly.
R5. Win Condition: The first agent whose cake health reaches `H <= 0.0` wins immediately. If the timer reaches `T_max`, the agent with the lowest remaining `H` wins.
## Edge cases
- Tie at the end condition: If multiple agents reduce `H <= 0.0` on the exact same tick, the agent with the lowest distance error on the final bite wins. [gap-fill]
- A player with no legal move: Not applicable; head movement and bite actions are always valid.
- Repetition / cycles: Bounded by hard time limit `T_max = 60.0` s.
- Simultaneous claims on the same resource or position: Not applicable; each agent has a separate cake.
- Player elimination mid-round; turn order repair: Disqualified agents (e.g. for hand fouls) are removed; remaining agents continue.
- Resource exhaustion: Not applicable.
- Termination guarantee: Ticked clock strictly reaches `T_max` or ends on `H <= 0.0`, guaranteeing termination.
## State representation
- Persistent state:
- `cake_health`: Map `agent_id -> float in [0.0, 1.0]`.
- `winner_id`: String or None.
- Per-tick ephemeral state:
- `head_positions`: Map `agent_id -> (float, float)`.
- `cake_states`: Map `agent_id -> (pos_x, pos_y, vel_x, vel_y)`.
- `time_elapsed`: Float `t`.
- Observable information:
- Partial observability: agents receive only noisy positional offset observations of their own target cake.
## Action space
- `act(move_dx: float, move_dy: float, bite: bool)`:
- Preconditions: `t < T_max`, `cake_health > 0.0`.
- Parameters: `move_dx, move_dy in [-0.20, 0.20]` m/s, `bite in {True, False}`.
## Playability notes
- Single-player-vs-AI: Natural; player competes against benchmark AI reaction profiles.
- Group games (n>4): Fully scalable across arbitrary player counts.
- Physical-skill games: Sensory estimation (POMDP tracking) and timing are modeled with stochastic noise filters.
- What is lost: The fragrant aroma of spiced gingerbread and the comedic visual of blindfolded players snapping at empty air.
## Implementation hints
Low complexity. Modeled cleanly as a simple 2D POMDP where an agent uses a Kalman filter or basic heuristic to center its head over the estimated target before executing a bite. First milestone: Implement the 2D pendulum bump-and-swing physics and bite collision radius check.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Gingerbread Biting (Netherlands). (n.d.). Games of Countries. https://gamesofcountries.com/games/nl-netherlands/koekhappen
@misc{gamesofcountries-nl-netherlands-koekhappen,
title = {Gingerbread Biting (Netherlands)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/nl-netherlands/koekhappen}
}