Skip to main content
Formal Specification

Driving the Pig — Formal Specification

Lithuania · stick-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 10
# Kiaulės varymas — AI-optimized specification ## General idea Kiaulės varymas is an asymmetric territory-defense, stick-handling, and goal-driving game played on a circular ring of holes surrounding a central goal depression. One designated herder attempts to strike a wooden block (the "pig") into the central hole or steal an unguarded perimeter hole with their stick, while perimeter defenders must balance the risk of leaving their protective hole to intercept the rolling pig against the threat of immediate dispossession. ## Formal model - **Abstraction taken:** Discretized. Continuous 2D terrain is modeled as a circular spatial layout consisting of a center hole Hcenter at (0,0) and N−1 perimeter holes H1…HN−1 distributed evenly at radius R=4.0 m [gap-fill]. Ballistic motion of the "pig" is modeled via 2D velocity vectors with ground friction damping [gap-fill]. Stick occupancy of each hole is maintained as an explicit discrete state variable. - **Player/agent count:** N agents (5≤N≤15): 1 active herder (S) and N−1 defenders (D1…DN−1). - **Turn model:** Real-time ticked simulation (Δt=100 ms) [gap-fill]. All agents submit movement and stick striking actions simultaneously each tick. ## Formal rules R1. Setup: - N−1 perimeter holes are placed at positions p→k=(Rcos⁡θk,Rsin⁡θk) where θk=2π(k−1)N−1. - Each defender Dk is assigned to hole Hk with stick status `in_hole = true`. - The "pig" projectile begins at initial position x→pig=(1.0,1.0) [gap-fill] with v→pig=0. - Herder S starts inside the circle with `in_hole = false`. R2. Pig Physics and Movement: - Each tick, x→pig←x→pig+v→pig⋅Δt, and v→pig←v→pig⋅(1−μΔt) with friction μ=0.4 [gap-fill]. R3. Action Types: - `move(target_pos)`: Translate agent position at speed vmax⁡=3.0 m/s. - `strike_pig(impulse_vector)`: Apply impulse J→ to the pig (valid only if ‖p→agent−x→pig‖2≤1.2 m). Executing this action forces `in_hole = false`. - `guard_hole(hole_id)`: Maintain stick contact in specified hole (valid only if ‖p→agent−p→hole‖2≤0.5 m). - `claim_vacant_hole(hole_id)`: Thrust stick into an unoccupied perimeter hole (`occupant = None`). R4. Perimeter Hole Capture: - If a defender Dk leaves hole Hk (`in_hole = false`) to strike the pig, hole Hk becomes vacant. - If the herder S successfully executes `claim_vacant_hole(H_k)`, role transfer occurs immediately: Dk becomes the new herder, S becomes the defender of Hk, and the sub-round resets [gap-fill]. R5. Sinking the Pig (Central Goal): - If the pig enters the central hole depression (‖x→pig‖2≤0.2 m with ‖v→pig‖2≤1.0 m/s), the goal triggers ("Kiaulė dvare!"). - Goal Scramble Phase: All perimeter hole assignments are wiped (`in_hole = false` for all agents). All N agents race to claim the N−1 perimeter holes. The single agent who fails to secure a hole is assigned as the herder for the subsequent round. R6. Prohibited Contacts: Kicking the pig with feet, blocking the pig with body mass, or striking opponent sticks/shins is penalized by an immediate free strike for the offended party [gap-fill]. R7. Match Limit: The game terminates after Rmax⁡=10 goal resets or a maximum duration of Tmax⁡=1000 ticks per round [gap-fill]. ## Edge cases - Tie at the end condition: In the scramble phase, if two agents attempt `claim_vacant_hole(H_k)` on the exact same tick, the agent with closer geometric distance claims the hole; ties broken uniformly at random [gap-fill]. - A player with no legal move: Not applicable — `move()` and `guard_hole()` are always valid actions. - Repetition / cycles (and the loop-breaking rule): Defenders perpetually turtling in their holes without striking are forced into action by the herder's unimpeded ability to roll the pig directly into Hcenter, triggering the mandatory scramble phase. - Simultaneous claims on the same resource or position: Perimeter holes have discrete capacity 1; exclusive access is resolved by arrival timestamp / distance priority. - Player elimination mid-round; turn order repair: Not applicable — all N players remain active across all rounds, rotating between herder and defender roles. - Resource exhaustion (pieces, tokens, space, time): Round terminates in an automatic scramble reset if t>Tmax⁡=1000 ticks [gap-fill]. - Termination guarantee: Guaranteed by the finite match round ceiling Rmax⁡ and round tick timer Tmax⁡. ## State representation - Persistent state: Agent count N, active herder ID, cumulative herder-duration counters per agent, completed goal count. - Per-turn ephemeral state: Agent positions p→i, stick states (`in_hole` booleans), perimeter hole occupancy table occ(Hk)∈{1…N}∪{∅}, pig coordinates x→pig and velocity v→pig, active scramble flag. - Observable information: Fully observable — all agent coordinates, hole states, and pig velocities are visible to all participants. ## Action space - `move(x, y)`: Move toward coordinate target. - `strike_pig(vx, vy)`: Strike the projectile toward a target trajectory. - `guard_hole(hole_id)`: Anchor stick securely in assigned hole. - `claim_vacant_hole(hole_id)`: Insert stick into an empty perimeter hole. ## Playability notes - Single-player-vs-AI: Highly engaging — human can play as the lone herder maneuvering the ball and baiting AI defenders out of position, or as a defender coordinating perimeter protection. - Group games (n>4): Natively designed for 5–15 players; reduction to 2 agents (1 herder, 1 defender, 1 perimeter hole, 1 center hole) functions mechanically as an intense 1v1 duel. - Physical-skill games: Stick swings, ball rolling angles, and sprint reactions are abstracted into velocity vectors and radius-based reach checks. - What is lost: The visceral thrill of stick clashes, chaotic shouter banter, and the physical dash to jam a stick into a dirt divot are replaced by collision logic. ## Implementation hints Spatial geometry requires a 2D continuous canvas or high-resolution grid with circle collision queries for the center hole and perimeter holes. First milestone: Build the single-hole defense and stick-claiming mechanic (R3–R4) before implementing the multi-agent scramble phase.

Download as JSON

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

Download JSON
Cite this page

Driving the Pig (Lithuania). (n.d.). Games of Countries. https://gamesofcountries.com/games/lt-lithuania/kiaules-varymas

@misc{gamesofcountries-lt-lithuania-kiaules-varymas,
  title = {Driving the Pig (Lithuania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/lt-lithuania/kiaules-varymas}
}