Skip to main content
Formal Specification

The Wolf and the Sheep (Bariu dhe ujku) — Formal Specification

Albania · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Ujku dhe delet — AI-optimized specification ## General idea A multi-agent pursuit-evasion game on a 2D grid featuring an articulated kinematic chain. A single Wolf agent attempts to navigate around a Shepherd blocker to tag the terminal node of an `N`-segment linked chain (the Sheep line). The Shepherd pivots to intercept the Wolf, while the Sheep follow the Shepherd's motion history to keep the tail shielded. ## Formal model - **Abstraction taken:** The flock is modeled as a snake-like kinematic chain of `K` discrete nodes `(p_0, p_1, ..., p_K)` where `p_0` is the Shepherd and `p_K` is the Tail Sheep. Segment length is constrained to `||p_i - p_{i-1}|| = 1.0`. Wolf is an independent mobile agent with higher top speed. - **Player/agent count:** `K + 2` agents (1 Wolf, 1 Shepherd, `K` Sheep, default `K = 4`). - **Turn model:** Simultaneous tick-based execution (`t = 1, 2, ...`). ## Formal rules R1. Setup: 2D arena `[-10..10] × [-10..10]`. Shepherd starts at `(0, 0)`; Sheep nodes `1..K` start at `(0, -1), (0, -2), ..., (0, -K)`. Wolf starts at `(0, 5)`. Captured sheep counter `captured = 0`. R2. Speed parameters [gap-fill]: - Wolf maximum speed: `v_wolf = 1.3` units/tick. - Shepherd maximum speed: `v_shepherd = 1.0` units/tick. - Sheep chain following speed: follows previous node trajectory with lag of 1 tick. R3. Collision and Blocking: - If Wolf comes within distance `d < 0.8` of Shepherd `p_0`: The Shepherd successfully blocks the Wolf; Wolf's forward velocity toward the flock is zeroed for that tick. R4. Tagging and Capture: - If distance `||pos_wolf - p_K|| < 0.6` (Wolf reaches the tail sheep without being blocked): - The tail sheep `p_K` is `CAPTURED`. - `captured += 1`. - Tail node `p_K` is removed from the chain (`K := K - 1`). - Reset positions of Shepherd, remaining Sheep, and Wolf to R1 starting layout. R5. Win and Termination Conditions: - Wolf wins if `captured == 3` (or all sheep captured) within `T_max = 200` total ticks. - Shepherd/Flock wins if they protect the flock until `t >= T_max` with `captured < 3`. R6. [gap-fill] Disconnection penalty: If the chain curvature causes any adjacent segment distance `||p_i - p_{i-1}|| > 1.5`, the chain is `BROKEN`; Wolf may tag node `p_i` directly for the next 5 ticks. ## Edge cases - Tie at the end condition: Not applicable; either Wolf captures 3 sheep before `T_max` (Wolf win) or time expires (Shepherd win). - A player with no legal move: Not applicable; 2D vector movement is unconstrained within the arena boundaries. - Repetition / cycles: Bounded strictly by the global tick ceiling `T_max = 200`. - Simultaneous claims on the same resource or position: Resolved by R3 priority (Shepherd block takes precedence over Tail tag). - Player elimination mid-round; turn order repair: When a tail sheep is captured, `K` decrements, chain length shrinks by 1 node, and positions reset. - Resource exhaustion (pieces, tokens, space, time): Bounded by initial flock size `K` and tick limit `T_max`. - Termination guarantee: why the game provably ends: Guaranteed because tick counter increments monotonically toward `T_max = 200`. ## State representation - Persistent state: `captured_count: int`, `current_flock_size: int`, `tick_clock: int`. - Per-turn ephemeral state: `pos_wolf: (float, float)`, `pos_shepherd: (float, float)`, `sheep_chain: array[K] of (float, float)`. - Observable information: Fully observable by all agents. ## Action space - `move_wolf(vector: (float, float))`: Wolf continuous movement vector (`||vector|| <= 1.3`). - `move_shepherd(vector: (float, float))`: Shepherd continuous movement vector (`||vector|| <= 1.0`). - `follow_chain()`: Automated follower action for sheep nodes. ## Playability notes - Single-player-vs-AI: Natural; player controls the Wolf or the Shepherd while AI manages the opposing role and automated flock tail physics. - Group games (n>4): Natively captures the dynamic of 1 attacker vs. 1 defender controlling a multi-segment tail. - Physical-skill games: Continuous dodging and body shielding are represented via geometric circle colliders and velocity limits. - What is lost in the adaptation: The physical whip-like centrifugal force experienced by children at the tail of a rapidly pivoting human chain. ## Implementation hints Kinematic chain simulation in 2D. Branching factor is continuous 2D steering. First milestone: Implement 2D flock chain kinematics (nodes following predecessor path) and Shepherd blocking radius check before adding capture resets.

Download as JSON

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

Download JSON
Cite this page

The Wolf and the Sheep (Bariu dhe ujku) (Albania). (n.d.). Games of Countries. https://gamesofcountries.com/games/al-albania/ujku-dhe-delet

@misc{gamesofcountries-al-albania-ujku-dhe-delet,
  title = {The Wolf and the Sheep (Bariu dhe ujku) (Albania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/al-albania/ujku-dhe-delet}
}