Simulating an ecosystem in a 2D grid world using PyQt5.
Inspiration for this project came from watching:
- Sebastian Lague's Coding Adventure: Simulating an Ecosystem
- Primer's Simulating Natural Selection
The supported platforms are currently Linux and Windows 10. To run the simulation you will need to have the following installed:
- python3 (>3.6)
- pip3
- numpy
- PyQt5
- git (reccomended)
If you would prefer not to install git and clone the repo, you can download the files from the main repository webpage by selecing the green Code
and then Download ZIP
.
sudo apt install git python3 python3-pip
git clone https://github.com/kpdudek/EvolutionSimulator.git
pip3 install PyQt5 numpy
Download python >3.7 from the Microsoft Store and then use pip3 (included in the Microsoft Store download) to install PyQt5 and numpy.
Install git as described here
git clone https://github.com/kpdudek/EvolutionSimulator.git
pip3 install PyQt5 numpy
After installation, launch the simulation by navigating to the EvolutionSimulator
repo you just cloned (or downloaded) and then executing the main.py
file as follows:
/path/to/EvolutionSimulator> python3 main.py
A window will open with a randomly generated map. To adjust the simulation settings, press 1
to show the simulation controller.
Select Tile: left mouse button
Camera Pan: WSAD, right mouse button and drag
Center Camera: C
Open Simulation Controller: 1