Formal Specification
Gibraltar Bottle Cap Racing — Formal Specification
Gibraltar · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 1
# Chapas — AI-optimized specification
## General idea
A turn-based 2D circuit racing game where agents alternate delivering flick actions to advance their customized bottle caps along a narrow bounded track. Going out of bounds incurs an immediate penalty, resetting the cap to its pre-turn position.
## Formal model
- **Abstraction taken:** The continuous winding track is modeled as a 2D polygonal corridor with centerline curve `C(s)` of arc-length `L` and width `W = 0.25` meters. The physical thumb flick is abstracted into an aim vector `(dx, dy)` and power scalar `P in [0, 1]`, with sliding friction and boundary collision checks.
- **Player/agent count:** 2 to 8 players.
- **Turn model:** Strictly sequential turn rotation.
## Formal rules
R1. Setup: A track of total length `L = 10.0` meters with start line `s = 0` and finish line `s = L`. Each player `i` starts at `pos[i] = (0.0, 0.0)` with progress parameter `s_i = 0.0`.
R2. On their turn, an active agent `i` inputs a flick vector `(v_x, v_y)`.
R3. Turn resolution:
R3.1. Initial velocity `V_0` is perturbed by skill noise: `V_act ~ Normal(V_0, sigma(skill))`.
R3.2. Cap trajectory is simulated under kinetic surface friction: `pos(t) = pos_old + V_act * t - 0.5 * mu * g * t^2`.
R3.3. Trajectory bounds check: If at any point along the simulated trajectory the cap's center exits the track corridor boundary (`dist_to_centerline > W/2`), the flick is a `CRASH`.
R3.4. If a `CRASH` occurs: The cap is restored to `pos_old` (0 net progress this turn), and the turn ends.
R3.5. If the trajectory completes cleanly within bounds: The cap's position updates to `pos_new`, advancing progress `s_i`.
R4. Win condition: The first player to achieve `s_i >= L` (cross the finish line cleanly within bounds) wins the race immediately.
R5. [gap-fill] Turn timeout: If a race exceeds 100 turns without a winner, the player with the highest track progress `s_i` is declared champion.
## Edge cases
- Tie at the end condition: Not applicable — turns are strictly sequential; the first agent to cross the finish line wins instantly.
- A player with no legal move: Not applicable — flick actions within power range are always legal.
- Repetition / cycles: Bounded by positive forward progress towards finite track length `L` and the 100-turn watchdog (R5).
- Simultaneous claims on the same resource or position: Cap-cap collisions resolve via 2D elastic disc collision; bumped opponent caps that stay in bounds retain their new spot.
- Player elimination mid-round: If an agent disconnects, their cap is removed and turn order continues.
- Resource exhaustion: Not applicable — track geometry is fixed.
- Termination guarantee: Guaranteed by monotonic distance advancement and R5 watchdog.
## State representation
- Persistent state: `track_geometry` (spline/polygon representation), `progress_s` (array of floats 0..L), `cap_positions` (array of `(x,y)`).
- Per-turn ephemeral state: `active_player_idx` (int 0..N-1), `pre_turn_pos` `(x,y)`.
- Observable information: Fully observable by all agents.
## Action space
- `flick_cap(aim_angle, power)`: Specify direction angle `theta in [-pi, +pi]` and force intensity `power in [0, 1]`.
## Playability notes
- Single-player-vs-AI: Natural — human player calibrates risk-reward on tight turns against AI racers using risk-aware trajectory optimization.
- Group games (n>4): Round-robin turn structure scales seamlessly.
- Physical-skill games: Finger flick snap and wax ballast balance parameterized via `V_act` and `sigma(skill)`.
- What is lost: The tactile satisfaction of pressing melted wax into metal caps and painting custom team colors.
## Implementation hints
2D polygonal path with segment distance indexing. Suggested milestone: Verify R3.3 off-track collision resets before adding multi-cap collision bouncing.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Gibraltar Bottle Cap Racing (Gibraltar). (n.d.). Games of Countries. https://gamesofcountries.com/games/gi-gibraltar/chapas-gibraltar
@misc{gamesofcountries-gi-gibraltar-chapas-gibraltar,
title = {Gibraltar Bottle Cap Racing (Gibraltar)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/gi-gibraltar/chapas-gibraltar}
}