Movement logic

Movement in the evolution simulation is governed by a priority-based decision system that balances multiple competing needs. Each organism evaluates its current individual situation and chooses movement based on what it needs most urgently.
Since every individual organism s different, but exists in the same context, their movement naturally forms into loosely governed groups, creating an emergent herd movement, similar to bird murmurings.
Fear
Organisms act on fear of threats, violence, and being away from others of their own species. This happens when they're outnumbered by other species or when they encounter potential predators. Fear influences movement decisions, ensuring survival takes precedence.
Fear-based movement creates natural herding behaviors where organisms of the same species cluster together for protection. Threatened organisms move toward known safe locations where their species congregates, creating defensive formations and territorial boundaries. Organisms prefer to venture out away from a larger group if someone else is with them.
Survival
When organisms are in danger, they flee toward safety, often seeking out others of their own kind for protection. This creates natural herding behaviors where similar organisms cluster together. The fleeing behavior overrides all other movement decisions, ensuring survival takes precedence.
Energy seeking
Organisms become strategic foragers when they need energy. They remember where they've found food before and return to those locations. If they're at a known food source, they stay put. If not, they move toward remembered feeding grounds. Only when they have no memory of good locations do they explore randomly.
Social
Reproduction creates complex movement patterns. When ready to reproduce, organisms first look for compatible partners nearby. If none are available locally, they travel to areas where their species congregates, creating natural mating grounds.
Organisms also prefer to rest among their own kind. If they find themselves surrounded by different species, they'll move toward areas where their species is more common. This creates natural territorial boundaries and species segregation.
Knowledge
Organisms have memory - they remember where they've found food, where they've encountered others of their species, and where they've been safe. This knowledge guides their movement decisions, creating efficient foraging patterns and social networks.
Energy constraints
Every movement has consequences. Moving requires energy, so organisms must balance the benefits of reaching a goal against the cost of getting there. This creates realistic patterns where organisms don't move constantly but instead make strategic decisions about when and where to go.
The energy cost of movement also creates natural selection pressure. Organisms that move efficiently have an advantage over those that waste energy on unnecessary movement. This drives the evolution of more sophisticated movement strategies over time.
Emergent behaviors
From these simple movement rules emerge complex, lifelike behaviors. Organisms naturally form territories, establish migration routes, and create social networks. They develop foraging strategies that balance exploration with exploitation. They exhibit predator-prey dynamics where some organisms flee while others pursue.
The movement system creates a dynamic, ever-changing world where the distribution of organisms constantly shifts in response to changing conditions. Food sources become depleted and new ones are discovered. Populations grow and disperse. Species compete for space and resources.
This emergent complexity makes the simulation fascinating to watch. Simple rules about where to move create rich, realistic behaviors that mirror what we see in natural ecosystems.