Josephbakulikira / Self-Driving-Car---python-Genetic-Algorithm

Spline , Curve editor with pygame ( catmul rom spline ) with pygame python

Home Page:https://www.youtube.com/c/Auctux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Self Driving Car python


YOUTUBE CHANNEL

Subscribe for support


Requirements

  • pygame : pip install pygame
  • pickle : pip install pickle-mixin
  • neat : pip install neat-python

Controls

- "R"                   : to show boundary lines
- "F"                   : to show wireframe mode
- "Q"                   : to change the Theme
- "Esc"                 : to quit without saving the tracks modification
- "Enter(Return) or P"  : to the parameter panel
- "WASD or Arrows keys" : to control the car

Bugs (Unsolved Issues)

For a much better ai of self driving car , you should try to get maybe four output for brake, accelerate, left and right instead of just left and right as i did. Although this might take a lot of time to train but it definetly the better way to do it.

  • The car control still need a little bit of work.
  • The AI only decide if it will go right or left, to get a much better ai should decide by itself when to accelerate , when to brake and so on if you have a time and find a solution you can make a pull request.

Screenshot (41) Screenshot (40)

If you want a track with a higher resolution and a higher control point , you can change this parameters in the constants file Screenshot (20)

Also When you load your saved data try to check if the N_points and spline_resolution are the same with the variables of the saved tracks, if they are not the same this might cause the saved track to look weird , to solve that issue you just have to change the n_points and spline resolution in the constants file to the value store the SavedTrack["variables"], ... if you have a time to solve that issue you can always make a pull request .

Screenshot (23) Screenshot (21) Screenshot (22) Screenshot (24)

sorry for the 🍝 code , enjoy✌️

About

Spline , Curve editor with pygame ( catmul rom spline ) with pygame python

https://www.youtube.com/c/Auctux


Languages

Language:Python 100.0%