INITIALIZING NEURAL CORE INICJALIZACJA RDZENIA NEURONOWEGO

overcl
RACING
cked

System Updates

RESEARCH & DEVELOPMENT

Follow our journey from zero knowledge to training competitive AI racing agents. Every step documented.

14

Entries

6

Phases

5

Charts

Phase 6

Jun 30, 2026

Final agents: 92.04 s scored lap (imitation and RL)

The deliverable bc_v6.pth (429 KB) scored a 92.04 s standing-start lap under submission conditions (fuel and damage enabled), top speed 250 km/h. Reinforcement learning is part of the result, not just a baseline: a residual Soft Actor-Critic policy that adds learned corrections on top of the same frozen network reaches the same ~92 s lap. Both agents ship — so the result stands on both imitation learning and RL.

The chart is a real telemetry speed profile of a recorded lap; the two deep minima are the Corkscrew chicane (~56 km/h) and the final hairpin.

Results Submission Residual RL

Phase 5

Jun 27, 2026

Distillation: behavioural cloning, the copycat trap, DAgger

The tuned v6 teacher was cloned into a 109k-parameter MLP (32→256→256→128→2, LayerNorm, tanh) on 500k transitions with a corner-weighted MSE loss. Plain BC hit the classic copycat/inertia failure (Codevilla et al., 2019): with the previous steering command in the observation, the network learned steer ≈ prev_steer — validation loss 0.002, yet it crashed 787 m into its first closed-loop lap. Fix: Gaussian noise (σ = 0.15) on exactly that feature during training. DAgger (5 × 100k steps, teacher-relabelled, seeded with full-lap demos) then closed the covariate-shift gap.

Behavior Cloning DAgger Distillation Codevilla et al.

Phase 4

Jun 21, 2026

Teacher v6: decoupled speed model + racing line

v5 computes the apex speed from the tightest forward rangefinder (v_apex = c·√sev) and adds a braking-reach term from the most open one, clamped by a free top-speed parameter — corners stay slow, straights go to the car's limit. v6 adds a tunable out-in-out racing line (wide entry, inside apex; both gains searchable from zero so Optuna can fall back to v5). Best standing-start laps: v5 = 91.2 s, v6 ≈ 88.8 s.

Teacher Racing Line Optuna

Phase 4

Jun 14, 2026

Root cause of the 174 km/h ceiling: gear scheduling

A speed-vs-distance telemetry tool exposed a hard 174 km/h cap on every straight — invisible in lap times alone. The engine redlines at 18,700 rpm, yet every controller and every RL agent before it upshifted at ~8,200 rpm: severe short-shifting that kept the engine far below its power band. Raising the shift point to 17,800 rpm lifted top speed to 184 km/h; decoupling straight-line from corner speed targets then unlocked 244.5 km/h and cut the lap from ~101 s to 91.2 s. Telemetry shows the fix was entirely about the shift point, not gear count: the car reaches its top speed in 5th gear (~17,200 rpm), and the SCR interface caps commands at gear 6 anyway. Driver logic only — car physics untouched.

Telemetry Gearbox Breakthrough

Phase 4

Jun 12, 2026

Teacher controllers v2–v4: structure beats tuning

Three controller families were compared. v3 (static per-position speed/line waypoints) converged to 118.8 s after 2,210 trials — a plateau, because an open-loop profile cannot react to the car's live state. The much simpler v2 (lookahead PID on live rangefinders) reached 105.8 s; v4 introduced the correct cornering physics v ∝ √R but still coupled straight-line speed to corner gain (107 s). Conclusion, confirmed repeatedly: no volume of hyperparameter search recovers what the model structure cannot express.

Teacher Optuna Control Theory

Phase 3

Jun 4, 2026

Distributed Optuna farm: 10 headless TORCS workers

Teacher tuning needs thousands of evaluations, each a full race. TORCS 1.3.7 was compiled headless inside WSL (same physics as the reference container); up to 10 workers per machine — the SCR server module admits at most 10 robots — ran Optuna trials against a WAL-mode SQLite study mirrored one-way to a cloud PostgreSQL instance. Roughly 15,000 trials were consumed across studies. Hard-won lessons: pin one DB connection per process, never let a worker's self-heal kill other workers' TORCS processes, and add a no-progress bailout for wedged cars.

Optuna WSL Distributed Infrastructure

Phase 3

Jun 1, 2026

Pivot: teacher–student architecture

From-scratch RL was plateauing near 106–107 s laps. The strategy was inverted: engineer a white-box analytic controller (the "teacher") whose ~50 parameters a black-box search can optimise at race-per-trial throughput, then compress it into the required neural network by imitation (behavioural cloning + DAgger), optionally refined by residual SAC that learns bounded corrections a = clip(π_base + δ·π_residual) on a frozen base.

Teacher-Student Residual RL Strategy

Phase 2

May 29, 2026

Post-mortem: critic divergence at 445k steps

The long stage-1 run collapsed after ~250k steps: critic loss grew from O(1) to O(10⁶), the auto-tuned entropy temperature rose by two orders of magnitude, and episode return fell below its starting level; the run terminated at 445,700 steps. Root cause: an over-long horizon (γ = 0.999 ≈ 20 s of bootstrapping) combined with unclipped shaped rewards let Q-targets grow without bound. Fixes carried forward: γ = 0.99, reward clipping, LayerNorm value networks. No comparable divergence occurred again.

Debugging Q-Explosion SAC

Phase 2

May 20, 2026

Curriculum SAC with LayerNorm networks

A two-stage curriculum was formalised: stage 1 on an empty track (31-dim observation), stage 2 with 36 opponent rangefinders (67-dim) via input-layer weight expansion. LayerNorm after every hidden layer of both actor and critic — kept in every later network, including the final deliverable — plus observation and reward normalisation stabilised early training.

Curriculum LayerNorm SAC

Phase 2

May 18, 2026

Telemetry pipeline: 81-channel logging at 50 Hz

Every subsequent breakthrough in the project was found in data, so logging was built before further training: an 81-column per-tick car log (all sensors, actions, rewards) and a training-statistics log every 100 steps (actor/critic losses, entropy temperature, Q-value statistics, buffer size, FPS). Gigabytes of runs from this pipeline back every chart in this section.

Telemetry Infrastructure

Phase 2

May 11, 2026

Action-space redesign: automatic gearbox, 2-D control

Early agents learned gear selection as a third action channel and wasted most of their exploration on drivetrain mistakes. Gear control was moved into the environment as an RPM-scheduled automatic box, reducing the action space to [steer, accel/brake] ∈ [−1, 1]². The reward was rebuilt around per-step progress (Δ distance raced) plus a time cost, replacing a projected-speed formula that rewarded crawling as much as racing over a fixed horizon.

Action Space Reward Shaping Auto-Gear

Phase 1

May 9, 2026

Algorithm selection: SAC over evolutionary search

Two families were prototyped: evolutionary strategies and off-policy actor–critic RL. Soft Actor-Critic (Haarnoja et al., 2018) was selected for its sample efficiency — TORCS runs in real time, so every environment step is expensive — and entropy-driven exploration. A sweep over MLP capacities (256×256×128, 256×256×256, 512×512×512) showed no benefit from larger networks; the smallest architecture was kept for all later stages.

SAC Architecture Haarnoja et al.

Phase 1

May 4, 2026

TORCS environment and SCR client bring-up

Project foundations: TORCS 1.3.7 with the SCR server patch, a UDP client (snakeoil3) exchanging telemetry and actuator commands at 50 Hz (20 ms per tick), and a Gymnasium-style environment wrapper. The car is the car1-ow1 open-wheel model; the target circuit is Corkscrew (Laguna Seca), 3,602 m.

  • Observation: 19 track-edge rangefinders + speed, heading, track position, RPM, gear, wheel speeds
  • Command: steer, accel, brake, gear — returned within the 20 ms tick budget
  • Episode reset, off-track and damage termination handled by the wrapper
TORCS SCR Environment

Phase 1

Mar 26, 2026

Project Inception: Foundations of ML and RL

Our journey began with a comprehensive exploration of Machine Learning and Reinforcement Learning fundamentals. To build a robust theoretical foundation, we immersed ourselves in academic literature, industry publications, and expert-led video lectures. Additionally, we successfully completed the mandatory IBM Granite Models for Software Development certification. This intensive preparation allowed us to trace the evolution of key algorithms—from early perceptrons to Evolutionary Strategies, Proximal Policy Optimization (PPO), and Soft Actor-Critic (SAC).

ML RL PPO SAC IBM Granite