Simulating cars learning to drive on different maps based on NEAT-python and Pygame. Includes a GUI in PyQt and a CLI in Typer. Includes many useful extensions of PyQt widgets, and implements some basic UI elements in Pygame using my abstract PyUiElement class.
- Clone the repository:
git clone https://github.com/lmProgramming/SelfLearningCars
- Navigate to the project directory:
cd SelfLearningCars
- Install dependencies:
pip install -r requirements.txt
- Build cython code:
python cython_setup.py build_ext --inplace
To start the GUI application, run:
python main.py
To start the CLI application, run:
python cli.py
- A GUI, that allows you to start the simulation, manage maps and manage NEAT checkpoints
- A graphical simulation of cars driving around the map
- Map managing: creating a new map, editing it or deleting it
- Loading a saved NEAT checkpoints
- Test drive a map
- CLI interface, that allows you to do pretty much everything specified above
- The simulation also shows a graph of scores over time and it allows to click a car to see it's neural network
- ScrollableGallery - a small extension for PyQt
- PyUiElement, PyInputBox, PyButton, PyImage, PyPlot and more - my Pygame UI extensions
WTFPL
I know that Pygame will sometimes not create a window, for example, if you go back to main menu after creating a new map, and then do a test drive, and then try to create another map, the window might not be created. Probably a bug on my part.