If you repeat this basic recipe a few more times, what you end up with looks remarkably like a real plant.
You can change the rules slightly, and get different sorts of plant. You can also add refinements such as varying the angles of the branches, and making the stem segments longer according to how many turns old they are.
These algorithms are known as L-systems, and the computer-generated L-plants are now used in movie special effects as realistic looking vegetation.
In 1985, Richard Dawkins wanted to demonstrate pure natural selection, much as The Game of Life had demonstrated pure cell interactions. He decided to write a program that used L-systems to generate plants. He picked nine variables for the system–length of “stem” pieces, angles, and so on; and he started with a random L-plant. The software “mutated” the nine parameters of the initial plant, and displayed the nine “offspring” in a grid. Dawkins would select one of them, and nine more variants would be bred from that specimen, and so on. He called the shapes “biomorphs”.
After a while, though, Dawkins noticed biomorphs that had lines that crossed back on themselves. In fact, a few had protrusions that looked rather like legs or wings sprouting from tight clusters of lines that looked like bodies. Although he hadn’t designed the code to draw anything but plants, suddenly he was breeding insect shapes!
Before long the biomorph bestiary had expanded to include spiders, birds, frogs, alphabet letters, castles, spacecraft, and even a chalice shape which Dawkins named the “Holy Grail”.
The biomorph world teaches us that when a hyperreal world is given natural selection, the results can be extremely unexpected. Similar lessons were to be learnt later on in the field of software engineering; but first, we need to take a detour back to the early days of computers.