Evan Sheehan | Generative Art Proposal | Darwinian Egg Drop

by Evan @ 4:08 pm 20 February 2012

For my generative project I am planning to do an egg drop simulation. The egg drop, for those that may not know, is a staple activity in most public elementary school science curriculums. The challenge is to design and build a container that will protect a raw egg when dropped from a specific height.

I recall doing this several times throughout my education as a child. Each time I zealously over-designed my solutions, and I don’t believe I ever successfully protected the eggs from harm. I intend to conquer this challenge once and for all by having a computer design my solutions for me.

Initial Concepts

Predator-prey simulation using flocking

I explored several different simulation ideas initially. They were all largely based on flocking algorithms. My original idea (bottom-right) was a simulation that used flocking algorithms to mimic an environment of predators and their prey. The idea was to track the populations of each species and compare that to the predicted behavior according to the Lotka-Volterra equation.

Evolve flocking creatures within an ecosystem

My second idea (bottom-left) was to create an evolutionary ecosystem where the animals (the triangles) were competing for food (the dots). Every X clock cycles the fitness of each animal is evaluated and they breed, evolving new animals. Parameters that would vary across creatures might be things like their maximum speed, propensity to wander, and their sensitivity to food.

Simulated dog fight

A third idea (top-right) was to create a dog-fight simulation. Possibly once an entire side of the battle had been defeated, you could evaluate the fitness of each ship and recombine them to create a new generation of ships and watch the battle evolve that way. Otherwise you might just watch the ships chase each other around the screen and be able to tune the parameters manually to see what different effects they have.

Evolutionary Egg Drop

At some point during all of this, I had the idea for the egg drop simulation. The idea of revisiting this design challenge from my childhood was so appealing that I immediately abandoned my desire to play with flocking algorithms in order to pursue it.

Evolving Egg Cartons

Containers can vary by rigidity, size, and wind resistance

One of the first things I began to consider is what qualities of a potential egg container could be made variable such that a variety of containers can be generated and bred together. One common solution to this problem in reality is a parachute, so wind resistance is an obvious quality that can probably be easily mimicked. Another common solution is to wrap the egg in a lot of packing material to dissipate the force of impact. I can probably create a similar effect by suspending the egg inside the container using springs of varying length and rigidity.

Evaluate fitness to evolve not just a solution, but an efficient solution

It’s not enough to consider a solution fit if the egg survives. That could easily lead to boring solutions that just increase the wind resistance or springiness of the container until the egg survives. I want a variety of spring lengths, rigidity, and wind resistance for the solutions, so I think I’ll need to develop some kind of measure of efficiency in addition to ensuring the survival of the egg. My hope is that this process will converge on local maxima contingent upon the random initial conditions, rather than always evolving the same solution.

I can penalize high wind resistance by trying to minimize the amount of time it takes the egg to reach the ground. I will also attempt to assign some cost to having overly long springs. The spring rigidity may not need special consideration in the fitness function: if the springs are too loose, the egg will bang into the ground; if the springs are too rigid, they’ll just transmit the force directly to the egg and break it.

Toxiclibs Implementation

I’m looking at Toxiclibs to implement this simulation. Toxiclibs gives me springs, gravity, and 2D meshes. My hope is that by subclassing some of these tools, I can access the data I need to evaluate a container’s fitness and breed new ones. By Thursday I hope to have at least a 2D mesh egg that breaks when dropped. If I can implement at least this much, I should have a sense for how much trouble I’m in on this project.

2 Comments

  1. This looks like a great idea to explore. Before you go into it in detail, make sure to check around for prior work in this specific area. Also, Golan suggests that you try to keep it simple for now as it would be easy at this point to go overboard for a 2 week project. Simplify some of your elements and variables, then go into more detail later on if you want to re-explore this for your final project.

    I’d also like to see you build and test at least one evolved sample for your documentation …

    Comment by dan — 21 February 2012 @ 12:25 am
  2. I read “Simulated Dog Fight” and assumed that it was an actual dog fight. I was like “How cruel!”

    Comment by John Brieger — 21 February 2012 @ 4:02 pm

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2023 Interactive Art and Computational Design, Spring 2012 | powered by WordPress with Barecity