Formal Specification
Bicycle Rim Rolling Race — Formal Specification
Malaysia · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Main Lereng — AI-optimized specification
## General idea
A simultaneous-turn racing and rotational momentum management simulation based on the traditional Malaysian bicycle rim rolling folk sport. Agents continuously regulate forward propulsion thrust and delicate lateral steering torque using a virtual guide tool to keep an unstable upright rolling hoop centered within a designated lane over a 50-meter course without toppling.
## Formal model
- **Abstraction taken:** The continuous gyroscopic physics and fine stick-wire contact mechanics are abstracted into a discrete 2D kinematic state vector per agent representing distance traveled, lateral lane offset, forward rolling velocity, lean angle relative to vertical, and wheel rotational spin rate.
- **Player/agent count:** 2 to 10 agents competing simultaneously in parallel lanes.
- **Turn model:** Simultaneous-turn discrete-time simulation. Each tick , all agents select thrust and corrective steering impulse vectors.
## Formal rules
R1. Course topology & state variables per agent :
- Distance where .
- Lateral deviation where lane width .
- Velocity , lean angle , and angular momentum .
R2. Kinematic update per tick :
- Agent commits thrust force and steering torque .
- Velocity update: .
- Lean stability equation: Lean angle drifts based on destabilizing torque and corrective steering:
where represents surface irregularities.
- Position updates:
R3. Topple & out-of-bounds fault:
- If (critical lean angle ) or (lane boundary violation), the rim topples (*rim jatuh*).
- Status transitions to `TOPPLED`. The agent must execute a mandatory recovery delay of (20 ticks), resetting , , and snapping back within lane bounds before resuming rolling from .
R4. Direct touch prohibition: No direct manual holding of the rim is permitted; forward propulsion is strictly mediated through the selected tool input space.
R5. Victory condition: The first agent whose position satisfies while upright and in active control wins the heat.
R6. [gap-fill] Maximum duration timeout: A heat terminates at (600 ticks). If no agent reaches the finish line, the agent with the maximum forward progress wins.
R7. [gap-fill] Obstacle / Slalom module: In slalom configurations, equidistant gate markers are placed at intervals along the track; agents must alternate passing to the left and right of consecutive gates under penalty of a time addition per missed gate.
R8. [gap-fill] Simultaneous finish tie-breaker: If multiple agents cross on the exact same tick, the agent with the higher remaining momentum is ranked ahead.
## Edge cases
- Tie at the end condition: Sub-tick fractional interpolation ; if identical, broken by higher velocity.
- A player with no legal move: Not applicable; agents can always choose neutral control inputs .
- Repetition / cycles: Impossible due to positive forward progress or hard 600-tick termination bound.
- Simultaneous claims on the same resource or position: Agents run in distinct, parallel, non-overlapping lanes; lane boundary crossing triggers an immediate topple penalty rather than collision.
- Player elimination mid-round; turn order repair: Toppled agents suffer a stationary restart penalty but remain in the race.
- Resource exhaustion (pieces, tokens, space, time): Track length is fixed at 50 meters; simulation terminates within 600 ticks.
- Termination guarantee: Enforced by the finite time ceiling and monotonic progress mechanics.
## State representation
- Persistent state: `track_length`, `lane_width`, `heat_rankings`, `elapsed_time`.
- Per-agent state: `(x, y, v, theta, status, penalty_ticks_remaining, gates_cleared)`.
- Ephemeral state: Input forces committed during the current tick.
- Observable information: Fully observable by all agents (all competitors' positions and velocities are public).
## Action space
- `apply_control(thrust_force, steering_torque)`: Continuous 2D control action where and .
## Playability notes
- Single-player-vs-AI: Highly playable as a time-trial or direct sprint race against PID-controlled or RL-trained AI pacers.
- Group games (n>4): Easily scales up to 10 parallel lanes without cross-agent state explosion.
- Physical-skill games: Dynamic balance and steering responsiveness are captured through an inverted pendulum / gyroscopic stabilization model.
- What is lost in the adaptation: The tactile vibration of the wire guide scraping along the steel rim groove is translated into numeric torque corrections.
## Implementation hints
Ideal candidate for an OpenAI Gym / Gymnasium environment. State space is low-dimensional continuous (), action space is 2D continuous (). First milestone: implement a single-agent PID stabilizer to keep at steady speed along a straight 50m lane before adding terrain noise and multi-agent competition.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Bicycle Rim Rolling Race (Malaysia). (n.d.). Games of Countries. https://gamesofcountries.com/games/my-malaysia/main-lereng
@misc{gamesofcountries-my-malaysia-main-lereng,
title = {Bicycle Rim Rolling Race (Malaysia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/my-malaysia/main-lereng}
}