Brainy Creatures
This project simulates the evolution of virtual creatures through natural selection. Each creatures has a dense, feedforward neural network with a hyperbolic tangent activation function. This network takes inputs from the creatures surrounding world, such as the direction and distance to the nearest creature, the level of vegetation on the tile below the creature, and the creature’s current speed. The neural net’s outputs determine whether the creature takes various actions: move, spin, graze, or bite. These actions all take energy, which creatures can gain from grazing on vegetation or biting other creatures. Creatures die when they loose all their heath from bites, or when they run out of energy. When creatures gather enough energy, they produce offspring. These offspring are similar to the parent but with slight mutations to the weights and biases of their neural net, as well as other characteristics like size and color. The offspring are usually born smaller and mature as they eat. Creatures appear as colored circles, with a second indicator circle inside. The indicator gets darker as creatures gain energy, or turns red to indicate that the creature is currently biting. When the population of creatures gets too low, new creatures are added in batches.
Check the project out here