Draw the rest of the Hummingbird

Updated on Saturday, February 19, 2022

Generation three thousand of a genetic algorithm learning to draw a hummingbird

A genetic algorithm learns to draw a hummingbird:

The video is an animation of three thousand generations of evolution. It starts with a random mix of line segments which are then mutated by adding or removing lines and by changing the start, end and color of existing lines. Each generation has 32 individuals. The best individual is mutated to create the next generation.

For this implementation the best or fittest individual is the one with the least error on a pixel by pixel comparison to a stock art drawing of a hummingbird. Because I care more about the shape than completely filling in the drawing an error outside the figure is penalized three times more than a gap inside the figure.

Color is mutated each generation but not selected for, so it's just changing randomly.

(Related: Can I move to a Better Simulation Please?; Life, Non-locality and the Simulation Hypothesis; Better related posts with word2vec (C#))

(You might also like: Cheek Cells, Methylene Blue Stain; Grape Plasma; Help make London a National Park)

(All Etc Posts)

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.

I Thought He Came With You is Robert Ellison's blog.

Newsletter

Related

A risk free simulation