Formal Specification
The Wolf and the Sheep (Moldovan Pastoral Flock Defense & Chain Tag) — Formal Specification
Moldova · chase-tag · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 2
# De-a lupul si oile (Lupul și oile) — AI-optimized specification
## General idea
A classic Moldovan pastoral line-defense, predatory pursuit, and evasion game. One player ("The Shepherd" / *Ciobanul*) leads an unbroken single-file chain of "Sheep" (*Oile*), spreading wide arms and executing lateral blocking footwork to shield the vulnerable tail of the flock (*oaia șchioapă*) from an agile circling "Wolf" (*Lupul*).
## Formal model
- **Abstraction taken:** 2D continuous kinematic multi-body snake-chain model. The Shepherd acts as an active frontal barrier; trailing sheep positions update via inverse kinematics with centrifugal tension checks. The Wolf navigates around the barrier to execute reaching tags on the exposed tail.
- **Player/agent count:** 1 Shepherd agent (), 1 Wolf agent (), and Sheep agents (, linked in order, with ).
- **Turn model:** Synchronous discrete ticks (1 tick = 0.2 seconds) within a 300-second match clock.
## Formal rules
R1. Setup & Flock Chain Initialization:
- Playing area is a 2D bounding square meters.
- Shepherd is positioned at .
- Sheep form a linked chain behind : position of maintains segment distance from ().
- Wolf starts at .
- `captured_sheep = []`, `match_clock = 0.0`.
R2. Movement & Kinematics:
- **Wolf Kinematics:** Wolf submits `stalk_and_sprint(vx, vy)` with maximum velocity .
- **Shepherd Defense:** Shepherd submits `block_flank(vx, vy)` (), extending a lateral blocking arc of width .
- **Flock Follower Physics:** Each sheep node updates position following the trajectory of :
.
R3. Centrifugal Tension & Chain Break:
- When Shepherd changes direction rapidly, centrifugal acceleration is evaluated across all chain links.
- If tension at link exceeds grip threshold :
- Chain breaks at link (`is_broken = true`).
- Trailing sheep become detached and vulnerable to direct tags anywhere on the body until re-linking.
R4. Capture & Wolf Tagging:
- **Tail Tag:** When the chain is intact, the Wolf may only legally tag the current tail sheep .
- If , Wolf executes `tag_tail_sheep()`.
- is captured and moved to `captured_sheep` in the wolf's den.
- **Loose Sheep Tag:** If the chain is broken, Wolf may tag any detached sheep.
R5. Match Conclusion & Role Transition:
- **Wolf Total Capture:** If all sheep are captured before , the Wolf wins the match.
- **Flock Survival:** If sheep remains when `match_clock == 300.0s`, the Shepherd and surviving sheep win.
- Role rotation: The first captured sheep becomes the new Wolf; the former tail sheep becomes the new Shepherd for the subsequent match [gap-fill].
## Edge cases
- Tie at the end condition: Survival evaluated against strict 300-second binary threshold; remaining sheep count serves as tiebreak metric between multiple rounds [gap-fill].
- A player with no legal move: Not applicable; all agents maintain continuous kinematic movement.
- Repetition / cycles: Match clock increments monotonically to 300 seconds.
- Simultaneous claims on the same position: Wolf is repelled by Shepherd's frontal blocking shield hitbox.
- Elimination mid-round and turn-order repair: Captured sheep are removed from the active chain, making the new tail sheep.
- Resource exhaustion: Sheep count in active chain strictly decreases from toward 0.
- Termination guarantee: Monotonic progress of `match_clock` guarantees match termination in exactly 1500 ticks (300 seconds).
## State representation
- Persistent state:
- `match_clock`: Float seconds.
- `wolf_id`: Agent ID.
- `shepherd_id`: Agent ID.
- `captured_history`: List of Agent IDs in capture order.
- Per-tick ephemeral state:
- `positions`: Map of Agent ID .
- `active_chain`: Ordered list of active Sheep IDs.
- `is_broken`: Boolean.
- `break_index`: Integer or null.
- Observable information: Fully observable coordinates of all flock nodes, wolf position, and match timer.
## Action space
- `stalk_and_sprint(vx, vy)`: Wolf dynamic movement.
- `block_flank(vx, vy)`: Shepherd lateral blocking move.
- `tag_tail_sheep()`: Wolf reach attack on tail sheep.
- `tag_loose_sheep(target_id)`: Wolf tag on disconnected sheep.
- `relink_chain()`: Sheep reconnect waist grip after break.
## Playability notes
- Single-player-vs-AI: High-adrenaline spatial evasion/defense game. Player can act as Shepherd timing lateral barrier shifts against an AI Wolf's flanking feints, or play as the Wolf using rapid direction reverses to snap the chain tail.
- Group reduction: Reducible to 1 Shepherd, 1 Wolf, and 3 Sheep.
- Physical-skill games: Dynamic snake-chain "whip" physics, grip strength endurance under centripetal loads, and rapid lateral shuffling are parameterized via multi-body physics.
- What is lost: The chaotic shrieks of children swerving across the meadow, the grip marks on wool sweaters, and the triumphant chant *"Fură, dacă-i putea!"*
## Implementation hints
Multi-segment kinematic chain with a leading barrier collision box. First milestone: implement the inverse-kinematic snake-chain following loop and Shepherd-Wolf frontal collision checks before adding centrifugal grip tension breaks and tail tagging.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Wolf and the Sheep (Moldovan Pastoral Flock Defense & Chain Tag) (Moldova). (n.d.). Games of Countries. https://gamesofcountries.com/games/md-moldova/de-a-lupul-si-oile
@misc{gamesofcountries-md-moldova-de-a-lupul-si-oile,
title = {The Wolf and the Sheep (Moldovan Pastoral Flock Defense & Chain Tag) (Moldova)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/md-moldova/de-a-lupul-si-oile}
}