Skip to content

MZaFaRM/PetriPixel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PetriPixel

Home Screen

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.

Key Features

Laboratory

  • 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.

Requirements

  • 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)

Installation & Setup

📥 Get the Latest Release (Recommended)

For the easiest setup, download the latest standalone runner from the Releases section. No additional installation is required—just run the executable!

🛠 Run from Source

If you want to run the project from source, follow these steps:

1. Install Prerequisites

Windows Users: If you encounter errors during installation, install Visual Studio C++ Build Tools and ensure you select "Desktop development with C++" during installation.

2. Clone the Repository

git clone https://github.com/MZaFaRM/PetriPixel.git
cd PetriPixel

3. Create & Activate a Virtual Environment (Optional but Recommended)

python -m venv venv
source venv/bin/activate  # On macOS/Linux
venv\Scripts\activate      # On Windows

4. Install Dependencies

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

5. Run the Project

python main.py

Guides & Wiki

Check out the project wiki.

Video

Watch the demo

References

"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.

License

This project is licensed under the MIT License. See the full license text here.