Formal Specification
Marbles — Formal Specification
Singapore · dexterity-small · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Main Goli — AI-optimized specification
## General idea
Main Goli is a turn-based 2D ring-shooting game where agents flick a shooter marble into a central cluster of target marbles. Success depends on striking target marbles with sufficient impulse to eject them beyond a circular boundary while managing shooter position to prevent getting trapped inside or leaving easy targets for opponents.
## Formal model
- **Abstraction taken:** Marble-on-marble elastic collisions are modeled in 2D Euclidean space within a bounded disk of radius cm. The agent specifies an aim angle and strike force , subject to execution noise.
- **Player/agent count:** 2 to 6 agents.
- **Turn model:** Sequential turn rotation, with bonus shots granted upon successful ejection.
## Formal rules
R1. Setup: A ring centered at with radius cm contains target marbles arranged in a central cluster. Each agent holds one shooter marble.
R2. Active Shot: The active agent places their shooter at the ring boundary (or at its current resting position if already on the field) and chooses .
R3. Collision & Ejection Resolution:
- Trajectory of shooter and all struck marbles is simulated using 2D elastic collision dynamics with friction deceleration.
- Any target marble that comes to rest at distance is considered ejected (*terkeluar*).
- Ejected marbles are collected by the active agent (+1 point each) and permanently removed from the ring.
R4. Turn Continuation / Passing:
- If at least one target marble was ejected, the active agent retains the turn and shoots again from the shooter's new resting position.
- If no target marble was ejected, the turn passes to the next agent in rotation.
R5. Shooter Vulnerability: If an agent's shooter marble remains inside the ring () and is directly struck by another agent's shooter during a subsequent turn, the struck agent is eliminated from the round [gap-fill].
R6. Win Condition: When all target marbles have been ejected, the agent with the most captured marbles wins. [gap-fill] If 40 total shots are taken without all marbles ejected, the round terminates immediately and highest score wins.
## Edge cases
- Tie at the end condition: If two agents have equal captured marble counts, the tied agents shoot one sudden-death shot at a single center marble; the closest hit wins.
- A player with no legal move: Not applicable; an active agent always has the continuous aim/force action space.
- Repetition / cycles: Bounded by the 40-shot global cap per round [gap-fill].
- Simultaneous claims on the same resource or position: Turns are strictly sequential; physics collisions are resolved dynamically.
- Player elimination mid-round: An eliminated agent's shooter is removed from the board; turn rotation skips the eliminated agent seamlessly.
- Resource exhaustion: Target marbles are finite and non-replenishing ( total).
- Termination guarantee: Guaranteed by monotonic depletion of target marbles () backed by the 40-shot global turn cap.
## State representation
- Persistent state:
- `captured_counts`: array of size (integers ).
- `eliminated_flags`: array of booleans of size .
- `active_player`: integer .
- `shot_counter`: integer .
- Ephemeral state:
- `target_positions`: list of 2D coordinates for remaining target marbles.
- `shooter_positions`: array of 2D coordinates for active shooters.
- Observable information: Fully observable to all agents.
## Action space
- `shoot(angle, force)`:
- `angle` radians.
- `force` impulse scalar.
## Playability notes
- Single-player-vs-AI: Fully natural; AI computes optimal strike vectors toward dense marble clusters or enemy shooters.
- Group games (n>4): Plays smoothly with standard clockwise turn rotation.
- Physical-skill games: Motor flicking precision is modeled via Gaussian angle deviation .
- What is lost: Ground irregularities (dirt lumps, sand friction gradients) and subtle finger-spin backspin techniques.
## Implementation hints
Standard 2D physics loop with circular disc collisions. Can be simplified to ray-cast impact approximation if full rigid-body physics is omitted.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Marbles (Singapore). (n.d.). Games of Countries. https://gamesofcountries.com/games/sg-singapore/goli
@misc{gamesofcountries-sg-singapore-goli,
title = {Marbles (Singapore)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/sg-singapore/goli}
}