I'm trying to implement an algorithm without resorting to machine learning and neural networks, just math.
Cars are able to drive a constant speed and follow a straight or circular line.
- lower car speed before turns to increase available steering speed
- avoid crashes
Algorithm can't change speed or steering directly, it only has access to accelleration, brakes, and steering wheel. Maximum speed, accelleration, steering wheel speed are all capped and controlled by physics engine. Steering is a bit simplified: it is expressed as a number of degrees car turns when it drives one pixel forward.
- rust is a programming language I'm willing to master
- nannou library was used to implement simplest graphical representation as fast as possible, in order to focus on the algorithm.
- toml was used to read road structure and initial driving situation. I wanted a short syntax, but didn't want to implement my own file.