Please sign in to access this page

Prey&Predator simulation (also a project to help me introduce my self to neural networks)

Prey&Predator simulation (also a project to help me introduce my self to neural networks)

3 devlogs
17h 35m
Created by Mahit Marri

Prey objects have to run around and get food to survive long enough to reproduce. Predator objects do the same but their food is the prey.

Timeline

Duplicated the prey class to create a predator one. The predators are bigger and reproduce by eating prey. The predators also need to eat the prey to survive. The prey no longer have the sleep feature and I fixed the edge stickiness by making it loop around like pacman. And each time a new child object is made (for predator or prey), it has a small chance for its speed or reproduction requirement to change.

They can now reproduce via mitosis and I have added a basic nn using numpy based on a YouTube tutorial on them. Here are somethings I want to fix/add by the next devpost:

-The prey getting stuck on the edges
-Some of them getting frozen when they are exactly in between two food objects
-Maybe add inheritable traits like speediness (so the fastest prey gets the food instead of the closest one)

So far I have added prey objects that move randomly until they detect food nearby. There's an energy system and they fall asleep to recharge when they run out. Going to work on reproduction next ( :( Even green pixels have more game than me).