Inspired by the works of @PrimerBlobs, @davidrandallmiller, and @3Blue1Brown, I’ve wanted to build something like this for a long time My BTech final project felt like the perfect excuse to finally do it.
So, here’s PetriPixel—my attempt at creating a digital petri dish where you can create organisms by customizing their phenotypic and genotypic traits (like neural networks, size, color, and defense mechanisms) and release them into an environment to see how they interact.
P.S. If you liked the project, a ⭐ would mean a lot.
-
Create Various Creatures
- Define their physical traits—size, shape, and defensive features.
- Set their behavioral traits—how they respond to food, threats, and each other.
-
Observe Their Interactions
- See how they navigate their environment, whether they compete, cooperate, or simply coexist.
-
Watch Them Evolve
- Over generations, successful traits persist while others disappear, shaping the next wave of creatures.
- Display: 1920×1080 resolution
- Python: 3.x
- Operating System: Tested on Windows and Linux
- Dependencies (if running from source): See requirements.txt (also requires Visual C++ Build Tools on Windows)
- RAM: Minimum 4 GB (8 GB recommended)
For the easiest setup, download the latest standalone runner from the Releases section. No additional installation is required—just run the executable!
If you want to run the project from source, follow these steps:
- Python (>= 3.x) – Download here
Windows Users: If you encounter errors during installation, install Visual Studio C++ Build Tools and ensure you select "Desktop development with C++" during installation.
git clone https://github.com/MZaFaRM/PetriPixel.git
cd PetriPixel
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
Before proceeding, ensure pip
, setuptools
, and wheel
are up to date:
pip install --upgrade pip setuptools wheel
Now, install the required dependencies:
pip install -r requirements.txt
python main.py
Check out the project wiki.
"Simulating Natural Selection" – Primer Blobs (YouTube)
Gave me inspiration for the project itself.
"I programmed some creatures. They Evolved." – David Randall Miller (YouTube)
Gave me ideas on how to implement the neural network aspects.
"Neural Networks" – 3Blue1Brown (YouTube)
Taught me a good chunk about building Neural Networks.
This project is licensed under the MIT License. See the full license text here.