Formal Specification
Cabbage Stealing (Thief in the Garden / Saimnieks Dārzā) — Formal Specification
Latvia · chase-tag · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 10
# Kāpostu zagšana — AI-optimized specification
## General idea
An asymmetric multi-agent stealth and resource-stealing tag game. A single gardener defends a circular plot containing a central stockpile of cabbage tokens from multiple agile thieves; thieves raid the circle to seize one cabbage at a time and escape across the perimeter, while the gardener attempts to tag and capture thieves within the garden boundary.
## Formal model
- **Abstraction taken:** Continuous garden terrain is discretized into a 2D grid containing three concentric zones: central cabbage depot (), garden zone ( where gardener can move and tag), and safe exterior zone ( where thieves are immune). Discrete time ticks model synchronous agent motion.
- **Player/agent count:** 1 gardener agent, thief agents ().
- **Turn model:** Synchronous discrete-time simulation ticks (simultaneous action resolution).
## Formal rules
R1. **Spatial zones:** Arena of radius grid units. Inner garden boundary at radius units; central depot at with radius units [gap-fill].
R2. **Initial inventory and placement:** Center depot contains cabbage tokens. Gardener starts at . Thieves start distributed in the safe exterior zone (). [gap-fill]
R3. **Movement constraints:**
- Gardener can move unit per tick anywhere within the garden (), but cannot cross into the exterior safe zone ().
- Thieves can move unit per tick freely across the entire arena [gap-fill].
R4. **Cabbage interaction:**
- A thief within depot radius () carrying 0 cabbages can execute `pickup_cabbage()`, taking 1 cabbage token from the center [gap-fill]. A thief cannot carry more than 1 cabbage at a time.
- When a thief carrying a cabbage crosses into the safe zone (), the cabbage is deposited into the thieves' secured pool.
R5. **Tagging and capture:**
- If the gardener's position is within tag distance of a thief whose position is inside the garden ():
- The thief is tagged and enters `captured` state (removed from active play) [gap-fill].
- If the tagged thief was carrying a cabbage, that cabbage returns to the center depot immediately [gap-fill].
R6. **Win / end conditions:**
- **Thieves win:** All cabbages have been secured in the outer safe zone.
- **Gardener wins:** All thieves have been tagged and captured before all cabbages are lost.
- **Timeout draw:** If tick counter reaches ticks, the side with majority cabbage share wins (gardener wins if remaining cabbages in center secured stolen cabbages) [gap-fill].
## Edge cases
- Tie at the end condition: resolved via R6 timeout majority rule; if exactly equal (e.g. 5 center vs 5 stolen at ), gardener wins as defender tie-breaker [gap-fill].
- A player with no legal move: not applicable — `stay` or movement within valid zones is always available.
- Repetition / cycles: bounded by the hard tick limit ticks.
- Simultaneous claims on the same resource or position: if multiple thieves execute `pickup_cabbage()` on the last remaining token on the same tick, the token is awarded to the thief with lower agent ID [gap-fill].
- Player elimination mid-round: captured thieves are removed from active motion; active thief set shrinks monotonically without disrupting turn structure.
- Resource exhaustion: cabbage stockpile is finite (); once depot is empty, thieves can only escape or assist remaining active carriers.
- Termination guarantee: guaranteed by finite cabbage count , monotonic thief elimination, and global tick cap .
## State representation
- Persistent state: zone radii , initial thief count , total cabbages , round tick cap .
- Per-turn ephemeral state: gardener position , thief positions , thief statuses (`active`, `captured`), thief cabbage possession booleans, remaining depot cabbages, secured cabbage count, tick .
- Observable information: full public observability — all agent positions, cabbage counts, and carrier statuses are fully visible to all agents.
## Action space
- `move(direction)`: directional displacement unit. Precondition: gardener must respect boundary.
- `pickup_cabbage()`: grab 1 cabbage token. Precondition: thief is active, carrying 0 cabbages, , depot cabbages .
## Playability notes
- Single-player-vs-AI: natural — human plays as lone gardener defending against multi-pronged heuristic thief AI, or as a thief timing raids with team distractions.
- Group games (n>4): natively designed for large groups (). Scaled down to 2 agents (1 gardener vs 1 thief with cabbages and gardener speed 0.8) preserving the spatial bait-and-dodge mechanic [gap-fill].
- Physical-skill games: stealth and rapid sprinting abstracted into 2D velocity vectors and zone boundary conditions.
- What is lost: physical feints, hand-swatting tag dodges, and multi-child physical crowding.
## Implementation hints
Low-to-medium complexity. Deterministic 2D grid or continuous coordinates with simple circle collision checks. First milestone: implement circular boundary checks, thief cabbage pickup/securing state transitions, and gardener tag detection.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Cabbage Stealing (Thief in the Garden / Saimnieks Dārzā) (Latvia). (n.d.). Games of Countries. https://gamesofcountries.com/games/lv-latvia/kapostu-zagsana
@misc{gamesofcountries-lv-latvia-kapostu-zagsana,
title = {Cabbage Stealing (Thief in the Garden / Saimnieks Dārzā) (Latvia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/lv-latvia/kapostu-zagsana}
}