Skip to main content
Formal Specification

Drive the Sow into the Hole — Formal Specification

Denmark · stick-team · Confidence: high

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 3
# So i hul (Drive so i hul) — AI-optimized specification ## General idea An ancient pastoral stick-and-ball territorial game. A central goal hole is encircled by peripheral resting holes, one for each outer driver. Drivers use hooked sticks to steer a wooden ball (the "sow") into the central hole, while a central defender (the Swineherd) blocks the ball and attempts to thrust their own stick into any peripheral hole left vacant when a driver steps out to strike. ## Formal model - **Abstraction taken:** Continuous pasture terrain is discretized into a 2D plane containing a central goal node H0=(0,0) and K peripheral hole coordinates {H1…HK} arranged in a circle of radius Rring. Ball physics are modeled with discrete 2D kinematic updates and deceleration. Stick possession of holes is evaluated via discrete spatial occupancy booleans. - **Player/agent count:** 4 to 10 players (1 Swineherd, K=N−1 Drivers). - **Turn model:** Synchronized discrete time ticks; simultaneous movement, striking, and hole-occupation actions. ## Formal rules R1. **Pitch Geometry & Holes:** Pitch is centered at (0,0) with central hole H0 (radius rgoal=0.5). K peripheral holes {H1…HK} are positioned at radius Rring=5.0 at angles θk=2πkK. Each hole has state `Occupied(player_id)` or `Vacant`. R2. **Initial Roles & Positions:** 1 player is `Swineherd` starting near (0,0) with no assigned hole. K players are `Drivers`, each starting at their assigned peripheral hole Hk with status `Occupied(k)`. Ball ("sow") starts at position (0,6.0). R3. **Simultaneous Tick Actions:** On each tick t, all active agents submit one action: - `move(dx, dy)`: Displacement with ‖(dx,dy)‖2≤vmax. Stepping away from a hole (‖Pi−Hk‖>Dreach) sets Hk.status=Vacant. - `strike_ball(dir_x, dir_y, power)`: Legal if ‖Pi−Pball‖≤Dreach. Updates ball velocity: v→ball←v→ball+power⋅u→dir. - `occupy_hole(hole_id)`: Legal if ‖Pi−Hk‖≤Dreach and Hk is `Vacant`. R4. **Swineherd Hole Claim (Role Swap):** If the Swineherd executes `occupy_hole(H_k)` on a `Vacant` hole: - The Swineherd becomes a `Driver` assigned to Hk. - The displaced driver (the previous owner of Hk) becomes the new `Swineherd`. R5. **Central Goal ("So i hul!"):** When ball position enters the central goal (‖Pball−H0‖≤rgoal): - `DriverScore` increments by 1. - Ball is reset to (0,6.0), and all drivers return their sticks to their assigned peripheral holes. R6. **Kinematic Ball Friction:** On each tick, ball position updates as Pball(t+1)=Pball(t)+v→ball(t), and velocity decays by friction v→ball(t+1)=max⁡(0,‖v→ball‖−μ)⋅v→ball‖v→ball‖. R7. [gap-fill] Body Contact Foul:** Players may only manipulate the ball and defend holes with their stick. Touching the ball with feet/body or physically obstructing an opponent's body results in an immediate foul, forcing the offending player to become the Swineherd. R8. [gap-fill] Match Termination & Victory:** The game ends when `DriverScore` reaches 5 points (collective victory for Drivers), or when Tmax=1000 ticks elapse. The individual winner is the player who accumulated the fewest total ticks in the Swineherd role. ## Edge cases - Tie at the end condition: If multiple players tie for fewest ticks as Swineherd at Tmax, tie is broken by the player with the most successful ball strikes [gap-fill]. - A player with no legal move: `move(0, 0)` or holding stick in hole is always legal. - Repetition / cycles: Dynamic role swapping can continue indefinitely; strictly bounded by the global tick limit Tmax=1000 in R8. - Simultaneous claims on the same resource or position: If a Driver and the Swineherd attempt `occupy_hole(H_k)` on the exact same tick, the Driver retains the hole (defensive entitlement). - Player elimination mid-round; turn order repair: If a driver disconnects, their peripheral hole is removed from the ring, contracting K by 1. If the Swineherd disconnects, the driver furthest from their hole becomes Swineherd. - Resource exhaustion (pieces, tokens, space, time): Conserved ball and fixed hole nodes; time bounded by Tmax. - Termination guarantee: why the game provably ends: Guaranteed by monotonic progression of the global tick clock t→Tmax and the finite 5-goal cap in R8. ## State representation - **Persistent state:** Pitch dimensions, peripheral hole coordinates {Hk}, player roster, cumulative Swineherd ticks per player {Therd,i}. - **Per-tick ephemeral state:** Player positions {Pi}, hole occupancy statuses {Hk.status}, ball position and velocity (Pball,v→ball), current tick t. - **Observable information:** Fully observable; all players observe all positions, ball trajectory, and hole statuses. ## Action space - `move(dx, dy)`: 2D displacement vector. Precondition: agent is active. - `strike_ball(dir, power)`: Power ∈[0,1.0]. Precondition: ‖Pi−Pball‖≤1.0. - `occupy_hole(hole_id)`: Target Hk. Precondition: ‖Pi−Hk‖≤1.0 and Hk is `Vacant`. ## Playability notes - Single-player-vs-AI: Highly playable; human acts as Swineherd balancing ball clearance against hole-stealing opportunities, or as a Driver coordinating offensive pushes with AI teammates. - Group games (n>4): Natively designed for 4 to 10 players; scales directly with number of peripheral holes K. - Physical-skill games: Stick manipulation and ball hooking are modeled as 2D force vectors and proximity checks. - What is lost in the adaptation: The somatic clatter of wooden hooked sticks crossing, uneven natural pasture divots, and physical shoulder jostling. ## Implementation hints Medium complexity. Involves 2D kinematic integration, circle collision for hole occupations, and an agent role-swapping state machine. First milestone: implement 2D arena with 4 perimeter holes and test Swineherd hole-stealing logic against stationary/moving drivers.

Download as JSON

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

Download JSON
Cite this page

Drive the Sow into the Hole (Denmark). (n.d.). Games of Countries. https://gamesofcountries.com/games/dk-denmark/so-i-hul

@misc{gamesofcountries-dk-denmark-so-i-hul,
  title = {Drive the Sow into the Hole (Denmark)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/dk-denmark/so-i-hul}
}