Skip to content
Piyush Verma
DEFIANZ / ENGINEERING NOTES / 03

Learning to steer. Examples & rewards.

Two ways to acquire a steering policy: imitate an expert’s examples, or explore actions and learn from rewards. Train either one from scratch in your browser.

0 / 300 TRAINING BATCHES
−3 m+3 m
Lateral error1.50 m
Policy steering0.0°
Test stateReady / paused
Mean squared imitation error / rad²
StartLatest
Test lateral error / metres
StartLatest
SUPERVISED LEARNING

Learn from examples.

δθ = 0.35 tanh(w · [e/3, ψ/0.7, 1])

Gradient descent fits a three-weight steering policy to 128 synthetic expert examples per batch. The expert uses a saturated lateral / heading feedback law; the displayed loss is measured on each training batch.

UNDER THE HOOD

What you’re seeing.

Connection to my work: RL / IL were among the navigation approaches I compared. This deliberately small experiment makes the learning distinction visible; it does not reproduce a team policy or establish driving performance.

Imitation: target δ = clip(−0.24 e − 0.85 ψ, ±0.35). Random states generate fresh labeled examples. The plot reports training loss, not generalization error. Testing from another starting offset provides a limited check of the learned behavior.

Reinforcement: reward = 1 − 0.7 e² − 2 ψ² − 0.1 δ², with −25 at a lane exit. Episodes last up to 140 steps. Learning is noisy and does not guarantee improvement on every episode. A finished 200-step test is a toy demonstration, not evidence of autonomous racing readiness.

Educational reconstructions of ideas from my work. Demo results are computed here; they are not team test results.