Skip to content

prasadchandan/evolve_a_car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evolve a Car

Use genetic algorithms to evolve a car. The framework currently uses Box2D for the physics engine, pyglet for rendering and imgui for the UI.

The code to 'evolve' the cars from generation to generation has not yet been implemented. This is a work in progress.

Quite a lot of the code in the project is derived from the python Box2D examples.

How to run

  1. Install Poetry
  2. Install the dependencies run poetry install
  3. On macOS follow the instructions below to fix OpenGL issues
  4. Run application poetry run src/app.py

Known Issues

  1. On macOS Big Sur OpenGL is not found see discussion on StackOverflow for details.
  • Temporary Fix:
    • Find virtual environment path poetry show -v
    • Open <venvpath>/lib/OpenGL/platform/ctypesloader.py
    • Replace line fullName = util.find_library( name )
    • With line fullName = "/System/Library/Frameworks/{}.framework/{}".format(name,name)

Demo

Evolve a Car Demo GIF

Credits

  1. Box2D Examples
  2. Hack Font
  3. Gidole Font

About

Use genetic algorithms to evolve a car

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published