Skip to main content
Formal Specification

Hen and Hawk — Formal Specification

Bosnia & Herzegovina · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Kvočka i jastreb — AI-optimized specification ## General idea A discretized 2D spatial chase-and-defense contest between a mobile predatory chaser (the Hawk) and a linked kinematic multi-segment snake (the Mother Hen and Chick chain). The Hawk attempts to reach and tag the final segment (the tail chick), while the Hen positions herself to block the Hawk's line of sight and movement vector, with the snake's tail lagging behind based on turning mechanics. ## Formal model - **Abstraction taken:** The continuous 2D field is discretized to a grid [0,15]×[0,15]. The Hawk is a point agent H=(xh,yh) with movement speed Vh=3 cells/tick. The Hen and Chicks form a linked kinematic snake S=[s0,s1,…,sK] where s0 is the Hen (speed Vs=2 cells/tick) and sK is the target tail chick. Segments sj follow segment sj−1 with 1-tick delay (standard snake kinematics). - **Player/agent count:** 2 agents: Hawk Agent vs Hen/Line Agent (controlling the head s0). - **Turn model:** Real-time ticked / simultaneous discrete movement phase per tick (tick length = 1 time unit). ## Formal rules R1. **Setup:** Grid bounds [0,15]×[0,15]. Chain length K=4 (Hen s0 and 4 chicks s1…s4). Initial positions: s0=(7,7),s1=(7,6),s2=(7,5),s3=(7,4),s4=(7,3). Hawk starts at H=(7,10). Max ticks per chase Tmax⁡=50. R2. **Action selection per tick:** - Hawk selects a movement step ΔH∈{(dx,dy):|dx|+|dy|≤3}. - Hen selects a movement step Δs0∈{(dx,dy):|dx|+|dy|≤2}. R3. **Simultaneous movement resolution:** - Hen moves to s0′=s0+Δs0 (clamped to grid). - Chain updates iteratively: sj′=sj−1 for j=K,K−1,…,1. - Hawk moves to H′=H+ΔH. - **Blocking condition:** The Hawk cannot move through the cell occupied by Hen s0′ or the front segments s1′,s2′; if the Hawk's path intersects s0′, the Hawk's movement halts at the adjacent cell. R4. **Capture and scoring:** - Tag condition: If H′==sK′ (Hawk reaches the exact cell of the tail chick) or ‖H′−sK′‖1≤1: The Hawk captures the chick (**TAG**). Hawk scores 1 point; the round ends. - [gap-fill] Time-out condition: If t=Tmax⁡ is reached without a tag, the Hen team successfully defends (**DEFENSE**). Hen scores 1 point; the round ends. R5. **Match victory:** Roles swap each round. The first agent to score 3 points as Hawk/Defense wins the match. ## Edge cases - **Tie at the end condition:** [gap-fill] If match score is tied 3–3 after 6 rounds, one sudden-death round with reduced chain length (K=2) breaks the tie. - **A player with no legal move:** Not applicable; zero movement (staying in current cell) is always legal. - **Repetition / cycles:** Bounded strictly by Tmax⁡=50 ticks per round, preventing infinite looping. - **Simultaneous claims on the same resource:** Simultaneous movement is resolved by processing Hen and chain translation first, then validating Hawk path collision against the new chain body. - **Player elimination mid-round / turn order repair:** Not applicable; 2-agent formalization. - **Resource exhaustion:** Grid boundaries and snake length are fixed constants. - **Termination guarantee:** Each round strictly terminates in at most Tmax⁡=50 ticks via tag or time-out, ensuring finite game duration. ## State representation - **Persistent state:** `score_hawk: int`, `score_hen: int`, `current_round: int`, `active_roles: (AgentID, AgentID)`. - **Per-tick ephemeral state:** `hawk_pos: (int, int)`, `snake_chain: List[(int, int)]`, `tick_index: int`. - **Observable information:** Fully observable state; all grid coordinates are public. ## Action space - Hawk: `move_hawk(dx: int, dy: int)` with Manhattan norm ≤3. - Hen: `move_hen(dx: int, dy: int)` with Manhattan norm ≤2. ## Playability notes - **Single-player-vs-AI:** Highly natural 1v1 spatial pursuit-evasion game; player as Hawk plans flanking trajectories around the blocking radius of the AI Hen. - **Group reduction:** A 12-child playground game reduces directly and cleanly to 1 Hawk agent vs 1 Hen agent controlling the kinematic snake body. - **Physical-skill games:** Sprinting, lateral shielding, and rotational whipping physics are modeled by discrete grid speed differentials and 1-tick segment delay. - **What is lost:** The exhilarating physical centrifugal whip felt by the last child in the line swinging wildly through the grass is reduced to kinematic coordinate updates. ## Implementation hints - Very simple 2D discrete grid environment; runs at thousands of ticks per second, ideal for reinforcement learning or minimax depth searches. - Obvious trap: Allowing the Hawk to jump directly through the Hen's blocking cell to reach the tail. - Suggested first milestone: Implement the snake update logic and verify that sharp turns by the Hen leave the tail temporarily vulnerable on the outside of the turn arc.

Download as JSON

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

Download JSON
Cite this page

Hen and Hawk (Bosnia & Herzegovina). (n.d.). Games of Countries. https://gamesofcountries.com/games/ba-bosnia-herzegovina/kvocka-i-jastreb

@misc{gamesofcountries-ba-bosnia-herzegovina-kvocka-i-jastreb,
  title = {Hen and Hawk (Bosnia & Herzegovina)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ba-bosnia-herzegovina/kvocka-i-jastreb}
}