Skip to content

alexesmet/driving-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Driving Algorithm

I'm trying to implement an algorithm without resorting to machine learning and neural networks, just math.

Current behaviour

Cars are able to drive a constant speed and follow a straight or circular line.

Demonstrative animation

Plans:

  • lower car speed before turns to increase available steering speed
  • avoid crashes

Physics

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.

Choice of the instruments

  • 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.

About

Trying to teach a computer how to drive a car.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages