On the Origin of Fishies


On the Origin of Fishies is a program using neural networks to control fish on a search for food pellets. Fish can only survive for a limited amount of time, and each second they survive adds a point to their score. Eating a food pellet will reset their death timer, as well as increasing their score. The weights and biases in the neural networks are randomly assigned at the beginning of the simulation. Once a fish dies, new fish have a chance of inheriting the weights and biases of another living fish, starting from the fish with the highest score. If no fish is selected by this random chance, a completely random fish will emerge. This process is a loose nod toward Darwin's idea of natural selection, with the title bearing similarity to his work, On the Origin of Species.

Below is a 10 minute capture of the program running:

Here is the very beginning of the simulation, starting from when all fish are completely random:

And here is after the simulation has been running for some time:

GitHub Repository


Prerequisites include: