A BoxCar2D implementation in Python. The aim of the cars in this simulation is to start from the top left corner and reach the goal at the bottom right, as quickly as possible. The Genetic Algorithm is used to optimize the cars after every generation.
You can check out the GIFs from the simulation here.
Python 3.6+
(Arcade runs on Windows, Mac OS X, and Linux. Arcade requires Python 3.6 or newer. It does not run on Python 2.x though Pymunk runs on both versions of python.)
You will only need to install the arcade and pymunk libraries for graphics and physics simulation. Matplotlib is used to plot the best score across generations to provide a fair idea about the performance of the model.
More information on arcade here.
More information on pymunk here.
More information on matplotlib here.
pymunk==5.6.0
arcade==2.3.10
matplotlib==3.2.1
I've included them in requirements.txt
To start the program, simply run the following command
python main.py
This project is licensed under the MIT License - see the LICENSE.md file for details.