Genetic Algorithm Pattern Generator for EggBot

David Bliss posted about using a genetic algorithm to create designs for the EggBot using Processing. He says, “Each design is a sine wave with eight different parameters.”

Each time the program is run, an initial population is created with 50 individual designs — each with random values assigned to the eight parameters. You then rate each individual design before evolving the next generation. The algorithm chooses individuals to carry on to the next generations (highly rated designs are more likely to be carried forward, but low rated designs may still be used).

Each of the eggs in the photo above was printed from the same program with waves evolved from random seeds.

He has shared his code on Github for this project, as well as earlier ones.