15 Aug 2026

Mazda

I started this work on a Ferrari F40. That car is fast and easy to throw away. I wanted a longer, cleaner train on the same track, so I went back to the Mazda. Same method. Same circuit. A car that is easier to keep on the road while the program learns.

The project is still OpenChamber. The car is a Mazda MX-5. The track is Monza. Training runs on the graphics card in this computer. Built on AssettoCorsaGym.

How it works

AC hotlap
 → sensors @ 25 Hz
 → gym env
 → PPO (CUDA)
 → vJoy controller → AC
  • The game sends the car’s speed and position
  • The program steers and uses the pedals through a virtual controller
  • If the car leaves the track, it is placed back on the road

Setup

CarMazda MX-5
TrackMonza
AlgoPPO · MlpPolicy
DeviceCUDA
This run1,000,000 timesteps
Folderppo_miata_monza

Where it is now

About 619,000 of 1,000,000 steps. 2,814 episodes. About 21 steps a second. The best episode scored 708. Peak speed so far is 29. Most laps still end early. The average of the last 15 episodes is 6.3. That is better than the first ten, which sat around 1.3, but it is still learning.

Steps~619k/ 1M
Episodes2814
Throughput~21fps
Peak speed29

Episode reward

  • First 10 (mean) 1.3
  • Current MA15 6.3
  • Best episode 708

Track

Monza track outline
Monza, from the sim track config

Learning

Learning curve
Return vs steps, and early vs late reward
Stint distance
How long the car stays on track (speed times episode length)

Run it

.\.venv\Scripts\python src\train.py \
 --car ks_mazda_miata \
 --track monza \
 --timesteps 1000000 \
 --run runs\ppo_miata_monza

The F40 notes are here.

Numbers and figures from this machine at write-up time. They will move as training continues.

← Teaching a model to drive