Dawkins' Blind Watchmaker: breed recursive ink creatures by choosing a child.
Each biomorph grows from a genome: eight genes set the vectors of eight compass directions, a depth gene sets how many times every branch forks, and the drawing is mirrored left to right. Extra genes from Dawkins' 1988 paper on the evolution of evolvability add body segments, gradients along the segments, and top-bottom or four-fold symmetry. The parent sits in the middle of the graph paper with its offspring around it, each a visibly different shape a few gene steps away, with the changes noted in pencil and inked branch by branch. Left alone, the autopilot breeds like Dawkins' weasel program toward a creature it has in mind (a beetle, lantern, tree, bat or snowflake), and the lineage strip records every step from a single stroke.
Try it. Click a child to make it the parent, or use the arrow keys and Enter. Click any ancestor in the lineage (or press Backspace) to go back and take a different path. T switches the autopilot's target and R starts over from a single stroke.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Recreate Richard Dawkins' "Blind Watchmaker" biomorphs with JavaScript and the HTML canvas element: I breed little drawn creatures by repeatedly choosing one of a parent's mutant children. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.
Start simple:
- A genome is nine integers: g1 to g8 in the range -9 to 9, and a depth from 1 to 8.
- Build two arrays of eight direction vectors from the genes so the drawing is left-right symmetric: dx = [-g2, -g1, 0, g1, g2, g3, 0, -g3] and dy = [g6, g5, g4, g5, g6, g7, g8, g7].
- Draw recursively: tree(x, y, length, dir) draws a line from (x, y) to (x + length * dx[dir], y + length * dy[dir]), then calls itself from the end point with length - 1 and directions dir - 1 and dir + 1 (wrapping around 8). Start with tree(0, 0, depth, 2).
- Lay out a 3 by 3 grid: the parent in the middle, eight children around it, each a copy of the parent with one random gene changed by +1 or -1. Scale every drawing to fit its cell.
- When I click a child, it becomes the new parent and a fresh set of children is bred.
Once that works, make it beautiful:
- Style it like ink on cream graph paper: draw the grid lines once to an offscreen canvas, use a dark blue ink color and thicker lines near the trunk.
- Animate new children being inked in branch by branch.
- Keep a strip of small thumbnails of every ancestor at the bottom, and let me click one to go back to it.
Explain the key ideas in short code comments, especially why small mutations plus repeated selection add up. When you're done, tell me how to open it and suggest three directions I could take it next, such as segmentation and symmetry genes, an autopilot that breeds toward a target shape, or colored biomorphs.