Formal Specification
Tar pit — Formal Specification
Finland · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 4
# Tervapata — AI-optimized specification
## General idea
A traditional Finnish circle-chase game rooted in rural tar-burning folklore. Players stand around a large outer ring in individual "nests" (*pesät*), surrounding a central "tar pit" (*tervapata*). A circulator walks around the perimeter and stealthily drops an object (pinecone/stick) behind a nest holder. Once the holder notices the drop, both players sprint in opposite directions around the circle to claim the vacant nest; the loser becomes the new circulator, while an oblivious player passed on a full lap is sent into the central tar pit.
## Formal model
- **Abstraction taken:** The continuous physical circle and running paths are discretized into a ring graph of perimeter nest nodes surrounding a central sink node . Running around the circle is modeled as clockwise or counter-clockwise step transitions with parameterized sprint speeds. Secret dropping and awareness detection are modeled via a perception latency check.
- **Player/agent count:** agents (), configured as 1 Circulator and Nest Holders (plus any trapped in TarPit).
- **Turn model:** Simultaneous discrete execution per tick within round episodes.
## Formal rules
R1. **Court Graph & Setup:**
- Ring graph with nest nodes arranged cyclically.
- One central node .
- One agent is initialized as `Circulator` positioned outside the ring. All other agents occupy distinct nests facing inward.
R2. **The Drop Phase:**
- The `Circulator` moves clockwise along the ring.
- The `Circulator` selects nest node and executes `drop_object(i)`.
- The dropped object remains in nest .
R3. **Detection and Sprint Race:**
- The holder of nest () performs an awareness check each tick:
- Once noticed:
- picks up the object and sprints **counter-clockwise** toward node .
- The `Circulator` continues sprinting **clockwise** toward node .
- Both runners move nodes per tick (e.g. ).
- **Lapped Oblivious Penalty:** If the `Circulator` completes a full lap around the ring (arrives back at nest ) before notices the object, is "burned" and sent to . [gap-fill] The Circulator reclaims the object and begins a new drop.
R4. **Passing and Nest Claim:**
- When the two sprinting runners cross on the ring, they pass without collision.
- The runner who arrives at vacant nest first claims the nest and becomes `Safe`.
- The runner who arrives second (or fails to claim the nest) becomes the new `Circulator` for the next round.
R5. **Tar Pit Trapping & Liberation:**
- A player sent to cannot participate in sprinting.
- [gap-fill] A player in is liberated when a new player is sent to (the previous occupant takes the vacated nest), or if a maximum penalty duration of 3 rounds elapses.
R6. **Match Victory:** [gap-fill] In a structured match of rounds, the agent who has spent the fewest rounds in the `TarPit` and fewest rounds as `Circulator` is declared the winner.
## Edge cases
- **Tie at the end condition:** [gap-fill] If the Circulator and Nest Holder reach nest node on the exact same tick, the Nest Holder retains their nest (defender advantage), and the Circulator remains Circulator.
- **A player with no legal move:** Nest holders execute `wait` until detecting the drop, then `sprint`. Circulators always have move/drop actions.
- **Repetition / cycles:** Rounds cycle continuously; match terminates strictly upon completing rounds.
- **Simultaneous claims on the same resource or position:** Handled by R6 tie-breaker for nest . Mid-ring runner crossovers are permitted without interference.
- **Player elimination mid-round; turn order repair:** Tar Pit occupants are temporarily suspended from active ring nodes; the ring size shrinks or is maintained by shifting adjacent nodes.
- **Resource exhaustion (pieces, tokens, space, time):** 1 drop object in play. Rounds bounded by .
- **Termination guarantee: why the game provably ends:** Each sprint race around a ring of size terminates in at most ticks, and total rounds are capped at .
## State representation
- **Persistent state:** Ring size ; list of nest node occupancies; TarPit occupant queue; round counter ; cumulative penalty scores.
- **Per-round state:** Circulator position; drop node index ; dropped object state ; runner positions and directions.
- **Observable information:** Asymmetric information. Circulator observes full ring and drop status. Nest holders observe only inward ring state, detecting drops behind them only after perception latency .
## Action space
- `circulator_move(speed)` / `drop_object(nest_id)`: (Circulator).
- `sprint(direction)` / `look_behind()`: (Nest Holders).
## Playability notes
- **Single-player-vs-AI:** Highly playable. Human plays Circulator trying to exploit the highest-latency AI nest holder, or plays a Nest Holder balancing vigilance with reflex sprinting.
- **Group games ():** Standard format operates on large rings (); reduces cleanly to 2 agents with dummy automated ring occupants.
- **Physical-skill games:** Sprinting speed and peripheral glance detection are abstracted into discrete movement rates and reaction time latencies.
- **What is lost in the adaptation:** The physical sensation of creeping quietly on gravel/grass, the smell of wood smoke/tar, and the close-quarters shoulder brush during runner bypasses.
## Implementation hints
- Model the ring as a circular doubly-linked list or modulo array of size .
- Branching factor: Circulator: candidate drop nests. Nest holders: binary (wait vs sprint).
- Suggested first milestone: Implement an 8-node ring with 1 Circulator and 7 automated holders, verifying opposite-direction sprint racing and nest capture resolution.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Tar pit (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/tervapata
@misc{gamesofcountries-fi-finland-tervapata,
title = {Tar pit (Finland)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/fi-finland/tervapata}
}