Skip to main content
Formal Specification

Bicycle Rim Rolling Race — Formal Specification

Malaysia · dexterity-small · Confidence: low

← Back to game page

Implementation 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 (xi,yi,vi,θi,ωi) 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 Δt=0.1 s, all agents select thrust and corrective steering impulse vectors. ## Formal rules R1. Course topology & state variables per agent i∈[1..N]: - Distance xi∈[0,Dfinish] where Dfinish=50.0 m. - Lateral deviation yi∈[−W/2,W/2] where lane width W=2.0 m. - Velocity vi≥0, lean angle θi∈[−θmax,θmax], and angular momentum Li∝vi. R2. Kinematic update per tick t: - Agent commits thrust force Fi∈[0,Fmax] and steering torque τi∈[−τmax,τmax]. - Velocity update: vi(t+1)=vi(t)+Fi−cdvi(t)mΔt. - Lean stability equation: Lean angle drifts based on destabilizing torque and corrective steering: θi(t+1)=θi(t)+(kgravitysin⁡θi(t)−kgyrovi(t)θi(t)+τi)Δt+ϵterrain where ϵterrain∼𝒩(0,σ2) represents surface irregularities. - Position updates: xi(t+1)=xi(t)+vi(t)cos⁡θi(t)Δt yi(t+1)=yi(t)+vi(t)sin⁡θi(t)Δt R3. Topple & out-of-bounds fault: - If |θi|>θcrit (critical lean angle 30∘) or |yi|>W/2 (lane boundary violation), the rim topples (*rim jatuh*). - Status transitions to `TOPPLED`. The agent must execute a mandatory recovery delay of Tpenalty=2.0 s (20 ticks), resetting vi←0, θi←0, and snapping yi back within lane bounds before resuming rolling from xi. R4. Direct touch prohibition: No direct manual holding of the rim is permitted; forward propulsion is strictly mediated through the selected (Fi,τi) tool input space. R5. Victory condition: The first agent whose position satisfies xi≥Dfinish while upright and in active control wins the heat. R6. [gap-fill] Maximum duration timeout: A heat terminates at Tmax=60.0 s (600 ticks). If no agent reaches the finish line, the agent with the maximum forward progress max⁡(xi) wins. R7. [gap-fill] Obstacle / Slalom module: In slalom configurations, K=5 equidistant gate markers are placed at intervals along the track; agents must alternate passing to the left and right of consecutive gates (ygate=0) under penalty of a +3.0 s time addition per missed gate. R8. [gap-fill] Simultaneous finish tie-breaker: If multiple agents cross Dfinish on the exact same tick, the agent with the higher remaining momentum vi is ranked ahead. ## Edge cases - Tie at the end condition: Sub-tick fractional interpolation tcross=t+Dfinish−xi(t)xi(t+1)−xi(t); if identical, broken by higher velocity. - A player with no legal move: Not applicable; agents can always choose neutral control inputs (F=0,τ=0). - 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 Tmax=60 s 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 (Fi,τi) 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 thrust_force∈[0,Fmax] and steering_torque∈[−τmax,τmax]. ## 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 ([x,y,v,θ]), action space is 2D continuous ([F,τ]). First milestone: implement a single-agent PID stabilizer to keep θ≈0 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 JSON
Cite 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}
}