GAPoly

Generative art · Genetic algorithms

Art through genetic algorithms

I taught a genetic algorithm to paint: it starts from chaos, mutates and crosses, generation after generation, until the picture resembles the original, whether a photo or a work of art.

01 — Gallery

Works

02 — Method

From chaos to likeness

Every image starts from elements scattered at random. For thousands of generations the best ones are picked, tweaked and crossed, until the photograph resurfaces.

  1. Selection

    Among the candidate images, those closest to the photograph win in small tournaments.

  2. Crossover

    Sometimes two parents swap part of their elements; other times the child is a copy.

  3. Mutation

    Every child changes a little: an element moves, changes colour, a new one arrives or one disappears.

  4. Repeat

    The best ones move on to the next generation. The error drops, the photo emerges.

Drawing techniques

The same algorithm, different elements. Each leaves a recognisable mark on the photo.

    03 — About

    The project