While developing the concept for my final project, a solar powered virtual plant, I have been considering whether integrating a genetic algorithm would be useful. Already I have been planning to include some randomness to the generation of fractal trees through a random seed, however lets take a moment here to explore how a genetic algorithm might work with the project.
Genetic algorithms can be used to generate solutions to problems that don’t necessarily have a single answer. The process looks something like this:
The scenario I am imagining is developing the virtual plant to evolve to best fit its environment. Bright light could encourage the development of plants that grow more rapidly, while dim lighting might encourage slower growth or in engineering terms more hibernation and infrequent updates.
There are three key components to genetic algorithms based on the theory of evolution including heredity, selection, and variation.
Phenotype and Genotype
“Genotype” is an organism’s full hereditary information. “Phenotype” is an organism’s actual observed properties, such as morphology, development, or behavior. This distinction is fundamental in the study of inheritance of traits and their evolution.https://en.wikipedia.org/wiki/Genotype–phenotype_distinction
The genes of an organism are inherited from its parents. These are the key variables that are carried over and mutated in future generations. In a plant these characteristics are passed along through seeds. For the virtual plant the available resources would have the most direct impact on its development.
A plant with a genotype that doesn’t fit its environment would likely result in an unhealthy plant. A fast growing plant in low light would likely be leggy, while a plant tolerant of low light would likely have its leaves burned in bright light.
There are a number of factors that could be use to gauge the “fitness” of a plant. In life real plants must compete for resources, such as light and nutrients. Additionally plants are often dependent on animals for reproduction, both for pollination and spreading their seeds. There are also a whole host of environmental factors that a plant must confront to survive. Extreme cold and heat. Excessive rain and draught. Pests.
Some measure would need to be applied to the virtual plant to gauge its fitness. The measures of success for the plant could range form attributes like leaf surface area, its ability to grow around obstacles, or its ability to collect resources through root growth.
Mutation is necessary to generate variety. A system without mutation will likely stagnate before generating all possible outcomes.
For a virtual plant I would likely include a high mutation rate to give the project the most interesting results possible. Also, unless I were to include a large virtual plant population with some ability to mix genes, mutation would be the sole method of introduction variety to the population.