Living Land

Grazers eat the green food. Hunters eat the grazers. An animal with enough energy has a young, and the young gets the genes of its parent with small changes. You do not control an animal: change the land, and see what evolves.

Connecting

The land lives.

The animals over time

GrazersHunters

The genes now

GeneGrazersHunters

The average of each gene of the animals that live now. A number in color changed from the first animals.

Processes are born and die

Each animal is a gen_boid process. A young is a new process that its parent starts. An animal with no energy stops, and the world removes it.

The weights of the rules are genes

The rules of an animal (stay close, flee, seek food, chase) come from its genes at its birth. So do its speed and how far it sees. A fast animal with good eyes uses more energy.

A rule that is a function

A grazer goes to the nearest food that it sees: handle_sense/2 adds the food to what the grazer perceives, and a function of the grazer is one of its rules.

A boid calls a boid

A hunter that touches a grazer calls the process of the grazer. The grazer gives its energy and stops. When two hunters touch it, only one gets the meal.

Read the code of the showcase.