Skip to main content
Formal Specification

Crow Hatching Eggs — Formal Specification

Thailand · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 5
# Ka Fak Khai — AI-optimized specification ## General idea A perimeter-defense and egg-theft tag game where a single central defender (the "Crow") protects a clutch of egg tokens placed in a central nest against multiple surrounding stealers. Stealers feint, orbit the perimeter, and lunge across the boundary line to snatch eggs, while the Crow pivots and executes defensive tag sweeps. The formal model discretizes the arena into radial sectors with simultaneous movement and reach-tag resolution. ## Formal model - **Abstraction taken:** The continuous concentric playing circle is discretized into `S = 8` radial sectors (indexed 0 to 7 arranged cyclically). The arena consists of three radial depth zones: Outer Perimeter (`zone = 2`, safe zone for Stealers), Inner Circle (`zone = 1`, Crow movement area), and Center Nest (`zone = 0`, containing egg tokens). - **Player/agent count:** 1 Crow agent vs `N` Stealer agents (typically 3 to 8 stealers). - **Turn model:** Simultaneous discrete action selection per tick. ## Formal rules R1. Setup: The Center Nest (`zone = 0`) contains `E` egg tokens (where `E = N`, the number of Stealers). The Crow starts in the Inner Circle (`zone = 1`) at sector 0. Stealers start on the Outer Perimeter (`zone = 2`) distributed among sectors 0 to 7. R2. Action Selection: On each tick, all agents choose an action simultaneously: - Stealer actions: - `Orbit(dir)`: Move along Outer Perimeter to sector `(current_sector + dir) mod 8`, where `dir in {-1, +1}`. - `Feint()`: Remain in current sector, increasing dodge agility for that tick. - `Lunge()`: Extend reaching arm from Outer Perimeter (`zone = 2`) into the Nest (`zone = 0`) to grab 1 egg token. - Crow actions: - `Pivot(target_sector)`: Change facing direction to `target_sector in {0..7}`. - `Sweep(target_sector)`: Execute an active tagging sweep covering `target_sector` and its adjacent sectors `[(target_sector - 1) mod 8, (target_sector + 1) mod 8]`. - `Guard()`: Maintain central positioning, covering all 8 sectors with reduced reach/speed. R3. [gap-fill] Action Resolution Order per tick: 1. Stealer `Orbit` and `Feint` movements resolve and update positions. 2. Crow `Pivot` and `Sweep` orientations resolve. 3. Tag Evaluation: Any Stealer executing `Lunge()` in a sector covered by the Crow's active `Sweep()` is tagged (`tagged = true`). 4. Egg Capture: Any untagged Stealer executing `Lunge()` successfully takes 1 egg token from the Nest, reducing Nest eggs by 1 and increasing the Stealer's carried eggs by 1. R4. [gap-fill] Tag Outcome: If any Stealer is tagged, the round ends immediately. The tagged Stealer becomes the Crow for the next round, and the nest is replenished to `E` eggs. R5. [gap-fill] Clean Sweep Victory: If the Nest egg count reaches 0 without any Stealer being tagged, the Stealers win the round. [gap-fill] The losing Crow must undergo an egg-hiding search phase modeled as a discrete 3-turn deduction challenge or score deduction. R6. [gap-fill] Round Time Limit: A round lasts a maximum of 40 ticks. If the time limit expires with eggs remaining in the nest and no tags made, the Crow successfully defends the nest and scores a defensive victory. ## Edge cases - Tie at the end condition: The win/loss condition is strictly binary per round: either a Stealer is tagged (Crow win / role transfer) or all eggs are stolen (Stealers win). If the 40-tick round timer expires, Crow wins by successful defense. - A player with no legal move: Not applicable; all agents always have at least stationary or orbit/guard actions available. - Repetition / cycles: Bounded by the 40-tick maximum duration per round and the monotonic reduction of egg tokens upon successful lunges. - Simultaneous claims on the same resource or position: Multiple Stealers may occupy the same Outer Perimeter sector. If multiple Stealers execute `Lunge()` in the same sector while only 1 egg remains, the egg is awarded to the Stealer with the lower player index, while both remain vulnerable to the Crow's `Sweep()`. - Player elimination mid-round; turn order repair: In standard play, a tag instantly ends the round and resets roles. In tournament elimination variants, a tagged Stealer is eliminated from the active roster, their carried eggs return to the nest, and remaining Stealers continue simultaneously. - Resource exhaustion: Nest egg count `E` is strictly bounded and non-negative; reaching 0 immediately triggers the Stealers' victory condition. - Termination guarantee: why the game provably ends: Bounded by the 40-tick round cap and the strictly decreasing nest egg count on successful untagged lunges. ## State representation - Persistent state: - `nest_eggs`: integer in `[0, E]` - `crow_state`: `{ sector: [0, 7], stance: guard | sweep | pivot }` - `stealer_states[N]`: `{ sector: [0, 7], carried_eggs: integer, status: active | tagged | eliminated }` - `tick_count`: integer in `[0, 40]` - `current_crow_id`: player ID - Per-turn ephemeral state: - `stealer_actions[N]`: list of chosen actions for the current tick. - `crow_action`: chosen Crow action for the current tick. - Observable information: Fully observable public state (all player sectors, egg counts, Crow facing, and carried eggs are visible to all agents). ## Action space - Stealer: - `orbit(direction)`: `direction in {-1, +1}`, moves along outer ring. - `feint()`: remains in sector, dodges standard reach. - `lunge()`: reaches into nest to grab 1 egg token. - Crow: - `pivot(sector)`: `sector in {0..7}`, reorients defense. - `sweep(sector)`: `sector in {0..7}`, tags lunging stealers in sector and adjacent neighbors. - `guard()`: defensive stance across all sectors. ## Playability notes - Single-player-vs-AI: Highly playable; a human player can control the Crow defending against coordinated multi-agent AI stealers, or control one Stealer cooperating with AI teammates. - Group games (n>4): The sector discretization scales smoothly to 4–12 agents; multiple stealers coordinate multi-sector simultaneous lunges to overload the Crow's single-sector sweep. - Physical-skill games: Physical reach, peripheral vision, and feinting agility are modeled through the spatial sector coverage and simultaneous action selection. - What is lost in the adaptation: The visceral excitement of physical lunges, vocal taunts, feigned reaches, and outdoor grass tumbling. ## Implementation hints - Radial grid representation with modulo-8 arithmetic makes spatial checks simple and fast. - Branching factor: 3 actions per Stealer, 10 actions for the Crow (`8 sweeps + pivot + guard`). - Suggested first milestone: Implement the 8-sector simultaneous tick resolver and verify multi-agent lunge vs sweep conflict resolution.

Download as JSON

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

Download JSON
Cite this page

Crow Hatching Eggs (Thailand). (n.d.). Games of Countries. https://gamesofcountries.com/games/th-thailand/ka-fak-khai

@misc{gamesofcountries-th-thailand-ka-fak-khai,
  title = {Crow Hatching Eggs (Thailand)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/th-thailand/ka-fak-khai}
}