Skip to main content
Formal Specification

The Goat and Wolf (Wolf and Goats) — Formal Specification

Latvia · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 10
# Kaza un vilks — AI-optimized specification ## General idea A cooperative spatial barrier tag game. A ring of defensive circle agents dynamically modulates boundary permeability, raising arm-gates to shelter a vulnerable "goat" agent while lowering arms to lock out a predatory "wolf" agent in a dual-zone (interior vs exterior) chase arena. ## Formal model - **Abstraction taken:** The continuous human circle with raised/lowered arms is abstracted into a 2D arena split by a circular perimeter of radius R containing M discrete gate nodes. Each gate has a dynamic state vector (Ggoat,Gwolf)∈{Passable,Blocked}2, controlled by the circle defenders to selectively permit goat entry/exit while obstructing wolf penetration. - **Player/agent count:** 1 wolf agent, 1 goat agent, and K circle agents (6≤K≤23, modeled as M=K boundary gate controllers or 1 unified circle controller) [gap-fill]. - **Turn model:** Synchronous discrete-time simulation ticks (simultaneous action selection and resolution). ## Formal rules R1. **Arena geometry:** Arena [−W,W]×[−H,H] [gap-fill: 20×20 units]. Circular boundary of radius R=6.0 centered at origin, partitioned into M gate arcs of length 2πR/M [gap-fill]. R2. **Initial setup:** Goat starts in the interior at (0,0). Wolf starts in the exterior at (R+3,0). All M gates start in state: `Goat: Passable`, `Wolf: Blocked` [gap-fill]. R3. **Agent movement per tick:** - Goat chooses movement vector v→g with ‖v→g‖≤vgoat=1.0 unit/tick [gap-fill]. - Wolf chooses movement vector v→w with ‖v→w‖≤vwolf=1.2 unit/tick [gap-fill]. R4. **Gate crossing mechanics:** - If an agent's path intersects a boundary gate arc: - If gate state is `Passable` for that agent type, the agent crosses freely. - If gate state is `Blocked`, the agent is stopped at the perimeter boundary and velocity along the normal vector is zeroed [gap-fill]. R5. **Circle defense action:** - Each tick, circle controllers choose gate configurations: a gate adjacent to the goat is set to `Passable` for the goat; a gate adjacent to the wolf is set to `Blocked` for the wolf. - Gate state transitions take τgate=1 tick latency [gap-fill]. R6. **Tag resolution:** If distance ‖Xw−Xg‖≤dtag=0.8 units, the wolf tags the goat and the round terminates immediately [gap-fill]. R7. **Scoring and match termination:** A match consists of Rtotal=6 rounds. Each round is scored by the survival time of the goat (in ticks) until tagged, up to a maximum timeout Tmax⁡=500 ticks [gap-fill]. ## Edge cases - Tie at the end condition: ranked by total survival time as goat across paired rounds; ties broken by fewest ticks taken as wolf to capture. - A player with no legal move: not applicable — movement within valid spatial domains is always available. - Repetition / cycles: bounded by the hard round tick cap Tmax⁡=500 ticks. - Simultaneous claims on the same resource or position: not applicable — boundary collision resolves independently per agent path. - Player elimination mid-round: not applicable — all agents remain active throughout each round. - Resource exhaustion: not applicable — no consumable resources. - Termination guarantee: guaranteed by the hard per-round tick cap Tmax⁡ and fixed round count Rtotal. ## State representation - Persistent state: arena bounds, perimeter radius R, gate arc definitions, round index, cumulative survival times per agent. - Per-turn ephemeral state: goat position (xg,yg), wolf position (xw,yw), gate states (G1…GM), tick counter t. - Observable information: full public observability — all agent positions, velocity vectors, and active gate states are globally known. ## Action space - `move(vx, vy)`: continuous velocity vector within maximum speed limit for goat and wolf. - `set_gate(gate_id, goat_passable, wolf_passable)`: configure permeability for boundary arc. Precondition: agent is circle controller. ## Playability notes - Single-player-vs-AI: natural — human plays as wolf trying to exploit gate switching latency, as goat coordinating evasive routes, or as circle controller timing gate traps. - Group games (n>4): natively models multi-agent circle coordination. Reduced to 2 agents (1 wolf vs 1 goat, with circle gates automated via deterministic proximity heuristics) without losing the fundamental gate-trap dynamic. - Physical-skill games: physical arm linking and dodging under arms abstracted into directional gate permeability and velocity clipping. - What is lost: physical strain in holding arms together against a surging child, and bodily deception. ## Implementation hints Low-to-medium complexity. The circular perimeter crossing detection can be solved with line-circle intersection. First milestone: implement circular boundary with static gates, test wolf pathfinding toward goat, and add dynamic gate toggling.

Download as JSON

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

Download JSON
Cite this page

The Goat and Wolf (Wolf and Goats) (Latvia). (n.d.). Games of Countries. https://gamesofcountries.com/games/lv-latvia/kaza-un-vilks

@misc{gamesofcountries-lv-latvia-kaza-un-vilks,
  title = {The Goat and Wolf (Wolf and Goats) (Latvia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/lv-latvia/kaza-un-vilks}
}