Formal Specification
Steal the Flag / Flag Snatching — Formal Specification
Vietnam · chase-tag · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 4
# Cướp cờ — AI-optimized specification
## General idea
Cướp cờ is a symmetrical team evasion and flag-snatching game. Two opposing teams stand behind parallel baselines with players assigned numbered bibs. A central caller calls one or more numbers; the summoned players race to the center circle to contest a single flag. The player who seizes the flag must sprint back across their home baseline untouched, while the opponent must chase and tag the carrier before they cross.
## Formal model
- **Abstraction taken:** The continuous field is discretized into a 2D grid with coordinates . Physical running velocity is discretized into 1 grid step per tick [gap-fill: physical sprinting and reaction times are discretized into simultaneous grid movement ticks where each active runner moves 1 cell per tick, and tagging requires occupying the same cell as the flag carrier].
- **Player/agent count:** 2 teams of players each ().
- **Turn model:** Round-based; within each round, active players execute simultaneous movement ticks until a point is scored or round times out.
## Formal rules
R1. Arena and Setup:
- Grid dimensions: (length ), (width ).
- Team 1 baseline: ; Team 2 baseline: .
- Center flag position: .
- Team 1 players numbered ; Team 2 players numbered .
- Team scores . Target score is (default 5 points).
R2. Round Initiation:
- The referee calls a number .
- Player starts at and Player starts at . All other players remain inactive on their baselines.
- Flag state , .
R3. Movement and Snatching (per tick ):
- Active players simultaneously submit .
- Movement updates positions .
- `SNATCH` action is valid only if and .
- [gap-fill] If both players execute `SNATCH` on the exact same tick, neither gains possession; the flag remains at and both players bounce back 1 step toward their respective baselines.
- If a single player executes a valid `SNATCH`, , and the flag moves with that carrier.
R4. Tagging and Scoring:
- If player holds the flag and crosses their home baseline ( for Team 1, or for Team 2) without being tagged:
- Team scores +1 point (). Round terminates.
- If player (opponent) enters the exact cell occupied by the flag carrier () while is within field bounds:
- Team scores +1 point () via successful tag. Round terminates.
- [gap-fill] Stepping out of lateral bounds () constitutes a fault, terminating the round and awarding +1 point to the opponent.
R5. [gap-fill] Round Stagnation Timeout:
- If 60 ticks elapse without either runner snatching the flag or scoring, the referee halts the round, awards 0 points to both teams, and initiates the next round.
R6. Victory Condition:
- The first team to reach points wins the match immediately.
## Edge cases
- Tie at the end condition: If both teams reach simultaneously (in multi-number call variants), a sudden-death single-number tie-breaker round is played.
- A player with no legal move: Inactive baseline players have no moves; active runners always have valid movement actions.
- Repetition / cycles: Bounded by R5 (hard 60-tick round stagnation timeout).
- Simultaneous claims on the same resource or position: Covered by R3 (simultaneous flag snatch bounce-back rule).
- Player elimination mid-round; turn order repair: In the standard points format, no players are eliminated; round resets fully after each point.
- Resource exhaustion: Flag position resets to at the start of every round; points accumulate monotonically.
- Termination guarantee: why the game provably ends: Each round completes in ticks; since non-zero points are awarded on successful sprints/tags and numbers cycle, the game reaches or a maximum round limit provably.
## State representation
- Persistent state:
- `team1_score`, `team2_score`: non-negative integers.
- `active_number`: integer .
- `round_number`: integer.
- Per-round ephemeral state:
- `p1_pos`, `p2_pos`: coordinates in .
- `flag_pos`: coordinate .
- `flag_carrier`: enum `{NONE, PLAYER_1, PLAYER_2}`.
- `round_ticks`: integer .
- Observable information:
- Public: Full observation of player positions, flag position/carrier, scores, and round timer.
## Action space
- `move(direction)`: direction .
- `snatch()`: Attempt to pick up the flag at current position.
## Playability notes
- Single-player-vs-AI: Highly playable; 1 human controlling the active runner against an AI opponent employing bluffing, distance-baiting, and intercept trajectories.
- Group games (n>4): The full game involves players with 1v1 duels per call. To reduce to a pure 2-agent game, simply model the 1v1 duel directly over a series of rounds.
- Physical-skill games: Physical sprint speed is discretized into grid steps; strategic content focuses on spacing, feints, and timing the grab.
- What is lost in the adaptation: The explosive physical acceleration, real-time hand swatting/tag evasion, and team chanting along the baselines.
## Implementation hints
- Set for a compact grid arena.
- State transitions are strictly deterministic given simultaneous action inputs.
- Suggested first milestone: Build the 1v1 grid environment with flag grab and baseline tag detection, testing against simple greedy baseline-runner bots.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Steal the Flag / Flag Snatching (Vietnam). (n.d.). Games of Countries. https://gamesofcountries.com/games/vn-vietnam/cuop-co
@misc{gamesofcountries-vn-vietnam-cuop-co,
title = {Steal the Flag / Flag Snatching (Vietnam)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/vn-vietnam/cuop-co}
}