These wiggles compete to reach a bunch of berries, while avoiding hitting the red squares.
Wiggles that hit a red square have their code replaced with (possibly a mutation of) the last wiggle to have caught the berries. This provides the three necessities of life: reproduction, variation and selective pressure.
The code consists of seven instructions, each of which is a number from 1 to 9, representing an instruction to be executed. Some of the instructions are conditional, advancing the program pointer an extra step in some conditions.
Better (but slower) adaptation might be possible by reducing the mutation rate; I haven't given this system much time to stabilize.