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
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.
Episode reward
Track
Learning
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