Out of the grid, something emerges

By Jonatan Hildén — 

Changing the genetic carpet from drawing pixels to drawing connected lines produce some exciting webs. A smaller interspaced 5 × 5  grid creates some fun space invaders. The fitness function quite quickly decides on a best fit for symmetry. All the images here display the best child of each generation.

spaceinvader

Some webbed carpets, 5 × 5  grid.

toms_geneticpattern_lines01

toms_geneticpattern_lines_fastfit

Single “best offspring” of the algorithm, with constrained connector length.

toms_geneticpattern_lines_largegrid01

A larger grid; the length of the connectors is constrained to one tenth of the gridwidth:

toms_geneticpattern_lines_largegrid02

This is the result of the same 30 × 30  grid as above, but with a pathlength of one fifth of the element width. If the length of the connectors are not constrained, the final generation for a large grid will generally be filled with white lines when all the different points are connected.

toms_geneticpattern_lines_largegrid03

So far, these results are really fascinating. Next on the schedule is more experimenting with the parameters of the genetic algorithm, and trying different ways of displaying the output, like coloring. It would also be neat to try outputting not only the best candidate, but the entire population for the algorithm. I’m also curious to see what more Tom comes up with from looking at the genetic algorithms – I hope I’m able to pick up some understanding from all of this too, so that I eventually can work with the genetic algorithms myself.