INITIALIZING NEURAL CORE INICJALIZACJA RDZENIA NEURONOWEGO
Technical Case Study
A full engineering account of how we built a neural driver for TORCS — from exploratory reinforcement learning to an Optuna-tuned analytic teacher distilled into a 429 KB network.
Read the full report (PDF, 14 pages)We document the end-to-end development of a neural-network driving agent for the Corkscrew circuit (Laguna Seca, 3,602 m) in TORCS, interfaced through the SCR protocol at 50 Hz. The project progressed through five stages — from exploratory Soft Actor-Critic baselines, through a curriculum with LayerNorm-stabilised networks (which exposed a critic divergence), to a residual-RL stack whose five-layer failure cascade we diagnosed and repaired.
The final pipeline optimises a 54-parameter analytic teacher with a distributed Optuna search (~15,000 trials) and distills it into a 109k-parameter MLP via behavioural cloning and DAgger. The delivered network (bc_v6.pth, 429 KB) scored a 92.04 s standing-start lap under submission conditions. A residual Soft Actor-Critic policy on top of the same frozen network reaches the same ~92 s, so the result stands on both imitation learning and reinforcement learning.
| Agent | Best lap [s] |
|---|---|
| From-scratch SAC (S1) | ~105–115 |
| DAgger NN (S3) | 106.96 |
| Teacher v3 (2,210 trials) | 118.81 |
| Teacher v5 (gear + decoupling) | 91.24 |
| Teacher v6 (racing line) | ≈88.8 |
| Submitted network bc_v6.pth (imitation) | 92.04 |
| Residual SAC on the same base (RL) | ≈92 |
The submitted network is scored under stricter physics (fuel + damage); the teacher search ran with them disabled for throughput.
The full paper covers the MDP formulation, all equations, the reward function, the five-bug residual post-mortem, and the complete bibliography.
Open the PDF