Brief Intro:
BIBO Balance is a simulation-first, physics-based reinforcement learning project. The goal is to use a neural controller to continuously command the lengths of four vertical corner actuators, manipulating a rigid 3:1 platform to stabilize a rolling ball. It features a custom deterministic C/CUDA physics engine and a Python/TensorFlow machine learning layer.
- Define coordinate convention (World Z-up).
- Define actuator joint model (Vertical actuators with spherical joints allowing lateral slip).
- Define base anchor geometry (Identical 3:1 footprint).
- Decide on contact physics fidelity (Full rigid-body sphere with angular inertia and rolling resistance).
- Choose C Toolchain (C11, CMake, GCC/Clang).
- Scaffold core directory structure (
src/,include/,tests/, etc.). - Implement core structs (
Vec3,Quat,Pose,BallState). - Implement
Vec3vector mathematics. - Implement
Quatquaternion operations (multiplication, axis-angle, rotations). - Implement Platform Plane & Normal derivations.
- Implement Rod kinematic distance constraints.
- Configure CMake and pass C-based geometry unit tests.
- Implement configurable 3D gravity decomposition (
$g_{normal}$ ,$g_{parallel}$ ). - Implement rigid-body contact detection and resolution.
- Implement rolling mechanics and friction (slip vs. grip thresholds).
- Implement temporal time integration (RK4 or Euler).
- Implement Energy (Kinetic/Potential) calculations.
- Implement stability detection window logic.
- Implement rod-length rate limiting and constraints.
- Translate
$\Delta L$ commands into moving-platform velocity vectors. - Factor platform movement into contact forces.
- Finalize deterministic fixed-step C simulator.
- Expose C ABI for external state access.
- Create deterministic replay test suite and benchmark throughput.
- Port geometry and physics kernels to CUDA.
- Implement VRAM Allocation for batched state arrays.
- Write global step kernel.
- Expose batched step to Python & Benchmark.
- Scaffold Actor-Critic neural networks in TensorFlow.
- Implement PPO rollout buffers and advantage estimation.
- Write the PPO optimization step and training loops.
- Train continuous action agent and save weights.
- Introduce randomized initial drops.
- Introduce randomized gravity vectors and friction.
- Train over disturbance curriculum.
- Swap privileged state for multi-camera CNN encodings.
- Add temporal processing for velocity inference.
- Add explicit physical constraint residuals to the RL loss function.
- Measure sample efficiency differences vs. baseline.
- Build C++ / OpenGL / Dear ImGui desktop interface.
- Bind real-time telemetry (energy plots, FPS, actuator effort).
- Build TypeScript / Three.js / WebGPU public client.
- Set up deterministic replay WebSocket/Server.
- Generate standard benchmarking reports.
- Curate and record edge-case demonstration scenarios (A-F).
- Finalize artifact bundle.