This projects aims to model plant evolution through natural selection. It does this by simulating an environment in which plant like entities grow and reproduce, while competing for light and space.
In normal genetic algorithms there are distinct stages or generations:
- Generate a random population.
- Test them all using a fitness function.
- Select a fit portion of the population, based on the fitness function.
- Create the next generation from the fit individuals, usually by copying them and adding small mutations to some.
In this program however there is no fitness function and there are no set generations. Instead the fitness of an individual can be considered to be how many offspring it manages to have. There is no equivalent to generations because, as in real life, some plants will outlive others and successfully have offspring before or after each other.
In any situation where you have variation in a population, inheritable traits, mutation and variable survival you will get evolution, it is unavoidable and can be applied in any situation in which those traits all exist together.
Try it yourself: Evolving-Plants.jar
Source code (MIT License): Github



- Create custom genomes and save them for use in the simulation.
- Select plants and view their genome, modify it, plant some of their offspring.
- Leave it to run with different starting configurations and see how it affects the evolution of the plants.
- Observe how small population sizes can lead to sub optimal design due to genetic drift.
- Observe how niches can be formed by large plants, a thick canopy can lead to small plants that cannot survive in direct light.
- Observe how a high mutation rate leads to a population of mangled forms, ill suited for their environment.