Skip to main content
Formal Specification

Wolf and Sheep — Formal Specification

Estonia · chase-tag · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 6
# Hunt ja lambad — AI-optimized specification ## General idea A wave-based predatory field crossing game played on a zoned 1D/2D grid. Multiple evaders (sheep) must cross an open danger zone (forest) occupied by one or more chasers (wolves) to reach a safe home zone; captured sheep convert into auxiliary wolves for subsequent waves until a single survivor remains. ## Formal model - **Abstraction taken:** The continuous physical sprint across a 20–40m field is discretized into a synchronized tick-based 2D grid (X×Y), where sheep and wolves move simultaneously each tick. Physical reach and open-hand tagging are replaced by grid cell adjacency/occupancy contact rules. - **Player/agent count:** 1 initial Wolf agent, N Sheep agents (N≥4). The Shepherd role is formalized as an automated game engine trigger/referee that starts each crossing wave. - **Turn model:** Synchronous discrete time ticks during active crossing phases; waves repeat sequentially until the termination condition is met. ## Formal rules R1. The playing field is modeled as a grid of length L and width W, partitioned into three contiguous zones along the longitudinal axis: - *Pasture* (x∈[0,xpasture]): Safe zone for Sheep. - *Forest* (x∈(xpasture,xhome)): Danger zone where Wolves roam. - *Home Fold* (x∈[xhome,L]): Safe zone where Sheep seek refuge. R2. Setup: All Sheep start within the Pasture zone. The initial Wolf starts in the Forest zone. R3. Wave initiation: The engine executes the antiphonal dialogue chant. On the final tick ("Jookske!"), all living Sheep are forced out of the Pasture and must move toward the Home Fold. R4. Each tick within a wave, agents submit movement actions simultaneously: - Sheep move up to vsheep cells per tick forward or laterally. [gap-fill: sheep cannot backtrack into the Pasture once crossed into the Forest]. - Wolves move up to vwolf cells per tick in any direction within the Forest (vwolf≥vsheep). Wolves cannot enter the Pasture or Home Fold. R5. Tagging resolution: If at the end of any tick a Wolf occupies the same cell as a Sheep or passes through an adjacent cell, the Sheep is tagged. [gap-fill: tie-breaking priority when multiple wolves tag the same sheep resolves simultaneously]. R6. A Sheep that enters any cell in the Home Fold (x≥xhome) is marked Safe for the remainder of the wave. R7. Wave end and conversion: A wave ends when every Sheep is either Safe in the Home Fold or Tagged. All tagged Sheep convert their role to Wolf for all subsequent waves. [gap-fill: a wave times out after Tmax ticks, at which point any sheep still stranded in the Forest is automatically tagged]. R8. Reset: Surviving Sheep are reset to the Pasture, all Wolves are positioned in the Forest, and a new wave begins. R9. Win/Loss: The game ends when exactly 1 Sheep remains uncaught after a wave (that agent wins) [gap-fill: if the final remaining sheep are all tagged in the same wave, the sheep that survived the highest number of ticks wins; if tied, a joint victory is declared]. ## Edge cases - Tie at the end condition: If all remaining sheep are captured simultaneously in the final wave, winner is broken by maximum ticks survived in the danger zone [gap-fill]; if identical, draw. - A player with no legal move: Not applicable; agents always have at least a pass or valid grid movement vector. - Repetition / cycles: Bounded by mandatory forward progress constraint (R4) and the per-wave maximum tick limit Tmax per [gap-fill] in R7. - Simultaneous claims on the same resource or position: Multiple sheep or wolves may occupy the same cell; if a wolf shares a cell with multiple sheep, all sheep in that cell are tagged simultaneously. - Player elimination mid-round; turn order repair: Tagged sheep are not removed from play but converted to the Wolf team at wave boundaries, preserving all agent slots. - Resource exhaustion: Not applicable; grid space is non-depleting and agent counts are bounded. - Termination guarantee: In each wave where at least one sheep is tagged, the number of active sheep strictly decreases (Nt+1≤Nt−1) and wolf density strictly increases. Combined with Tmax and bounded sheep count N, the game terminates in at most N−1 waves. ## State representation - Persistent state: - `active_sheep_ids`: List of IDs of surviving sheep agents. - `wolf_ids`: List of IDs of wolf agents (initial wolf + converted sheep). - `wave_number`: Integer counter. - Per-tick ephemeral state: - `positions`: Map of agent ID →(x,y) coordinates. - `sheep_status`: Map of sheep ID →{PASTURE,IN_TRANSIT,SAFE,TAGGED}. - `tick_counter`: Current tick within the wave (0≤t≤Tmax). - Observable information: Fully observable 2D positions of all agents and boundary lines. ## Action space - `move(dx, dy)`: Move by displacement vector with |dx|+|dy|≤vagent. - `wait()`: Remain stationary in current cell. ## Playability notes - Single-player-vs-AI: Highly natural. Human controls one Sheep trying to survive multiple waves against algorithmic AI Wolves, or human plays Wolf attempting to optimize catch yield per wave. - Group games (n>4): Cleanly reducible to 1 Sheep vs 1 Wolf, though 1v1 eliminates the herd-dilution strategy where sheep split to overwhelm a single wolf. - Physical-skill games: Sprint speed and agility are abstracted into speed parameters vsheep and vwolf and maneuverability vectors. - What is lost in the adaptation: The physical fear of collision, peripheral vision chaos of a 20-person stampede, and vocal social delivery of the traditional pastoral chant. ## Implementation hints Grid dimensions of 30×15 with vsheep=1, vwolf=1.5 (e.g. 3 cells every 2 ticks) produce balanced pursuit dynamics. First milestone: implement 1D coordinate crossing with 1 Wolf and 4 Sheep to validate wave transition and role conversion logic.

Download as JSON

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

Download JSON
Cite this page

Wolf and Sheep (Estonia). (n.d.). Games of Countries. https://gamesofcountries.com/games/ee-estonia/hunt-ja-lambad

@misc{gamesofcountries-ee-estonia-hunt-ja-lambad,
  title = {Wolf and Sheep (Estonia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ee-estonia/hunt-ja-lambad}
}