项目作者: Josephbakulikira

项目描述 :
Spline , Curve editor with pygame ( catmul rom spline ) with pygame python
高级语言: Python
项目地址: git://github.com/Josephbakulikira/Self-Driving-Car---python-Genetic-Algorithm.git


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

  1. - "R" : to show boundary lines
  2. - "F" : to show wireframe mode
  3. - "Q" : to change the Theme
  4. - "Esc" : to quit without saving the tracks modification
  5. - "Enter(Return) or P" : to the parameter panel
  6. - "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)

" class="reference-link">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)

" class="reference-link">Screenshot (24)

sorry for the 🍝 code , enjoy✌️