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.
- Install Poetry
- Install the dependencies run
poetry install
- On macOS follow the instructions below to fix OpenGL issues
- Run application
poetry run src/app.py
- 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)
- Find virtual environment path