Brandon Roots
  • INTERACTIVE
  • FILM
  • ABOUT
  • CONTACT
April 12, 2021

Genetic Algorithms

broots ITP, Nature of Code

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:

  • Diagram from GenerativeDesign.org

Scenario

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.

Measuring Fitness

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

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.

Week 8: Final Project Ideas Solar Fractal Plant: Update

Related Posts

Fractal Plant – Foiled by  Registers

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Foiled by Registers

Since receiving the PCBs and successfully soldering the board together I have been trying to rewrite code for the I2C port expander. This has been immensely difficult! The Inkplate Arduino Library makes considerable use of an “Mcp” class, which is written to work with the MCP23017 GPIO expander IC. These chips are quite difficult to […]

“Handling” Playtest Week

Handling, ITP

“Handling” Playtest Week

Last week we attended “Playtest Thursday” on the second floor of 370 Jay St with our games. I came away from the experience with some very specific feedback. Seeing a number of people play the game showed me things I didn’t anticipate. Some folks approached the cabinet and immediately treated it as a touch screen. […]

Fractal Plant – Beta Build

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Beta Build

The boards arrived! Amazingly within an hour of one another. Based on the experience I think that JLCPCB is a better value. With shipping OSHPark was $55.50 for 3 boards. JLCPCB was $26.36 for 10 boards. Aside from a higher cost OSHPark also left sharp bits of tabs around the edges of the boards which […]

Recent Posts

  • Fractal Plant – Foiled by  RegistersFractal Plant – Foiled by Registers
    May 9, 2022
  • “Handling” Playtest Week“Handling” Playtest Week
    May 5, 2022
  • Fractal Plant – Beta BuildFractal Plant – Beta Build
    April 24, 2022
Brandon Roots