Algorithmic Inelegance

/ by PZ Myers /

Complexity in living things is a product of the lack of direction in evolutionary processes, of the accumulation of fortuitous accidents, rather than the product of design.

Fruit flies show how general and global patterning mechanisms can be shaped by evolution into particular, specific, and local control. Illustration by Alison Schroeer

Many years ago, I wrote software to supplement my income, and I know well the satisfaction of writing code, seeing it execute, and seeing functionality unfold on the computer screen. There’s something deeply appealing about making logic manifest and producing tools that do intense computational work for you at the click of a button; there can also be something deeply obsessive about being able to hone software to make it more elegant and efficient and, to the programmer’s eye, more beautiful. The designers of software usually aspire to economy of code, clarity in its operation, and powerful algorithms that, with mathematical and logical beauty, do the work of generating a sophisticated result. We tend to look down on the “kludge,” the clumsy addition to fix a problem, or the brute force approach of working case by case to force a desired result (although, to be sure, I’ve seen enough code to know that the awkward hack is ubiquitous).

Now I’m a full-time developmental biologist, and unsurprisingly, I see similar expectations in myself and in my colleagues. We don’t have the power to design embryos, but we do analyze the “code”—the genetic instructions and the operation of the developmental programs that take the egg from embryo to adult. We look for algorithmic elegance and simple procedures that lead to the impressive complexity of form, and sometimes we see it; there is often a kernel of clean, simple molecular interactions that lay down a framework for the organism. However, what we more often see is the action of the invisible hand of evolution: the evidence of random accidents that have been incorporated into the code, of elaborations built of bricolage, a collage of bits and pieces assembled into a larger structure. Life is a collection of kludges taped together by chance and filtered by selection for functionality; it all works magnificently well, but if you look under the hood you are simultaneously appalled by the sheer inelegance of the molecular gemisch and impressed with the accumulation of complexity.

For instance, the segmentation of animals in development is a lovely example of the formation of a simple pattern—the body is built of repeating, nearly identical elements, stacked one after the other. Scientists anticipated that perhaps the rules for building the same thing over and over would involve only a few genes working together to create a repeating spatial pattern, and that we could see this as an emergent property of regularities and rules. In vertebrates, which seem to retain the primitive pattern of segmentation to a relatively greater degree than many other animals, we see a set of clock-like rules in operation. The cyclic production of a few genes, like analogues of a gene named hairy, produces a pattern of stripes of activation of genes in the Notch pathway that set up the boundaries of each segment. This is a clean solution; a few genes with oscillating levels of expression over time set aside pieces of the embryo, one by one, that make each segment. Of course, even in these “simple” vertebrates, we also find layers and layers of genes, with narrow and specialized functions, carrying out overlapping and complementary roles—it’s much more complicated than can be summarized in a simple paragraph. Simply put, evolution has encrusted the process with many elaborations.

In flies, those paradigmatic models of genetics and development, that process of elaboration has been carried to an extreme. Any algorithmic elegance in the ancestral arthropod has been lost in favor of detailed, segment-by-segment hardwiring of the specification of the body plan. If a fly were software, it’s software that has been patched and patched, and patches have been put on patches, until almost all vestiges of the original code have been obscured in the tweaks. It’s the antithesis of planning and design—it’s ad hoc co-option and opportunistic incorporation of chance enhancements. It’s evolution.

How can evolution lead to increasing complexity and specialization of the developmental circuitry? Consider the ancestral mechanism for making segments: A molecular clock ebbs and flows, ticking off a new partition with each cycle. This mechanism converts time into a pattern in space. In development, time is often at a premium, though: In some lineages, the evolutionary pressure is on accelerating the rate of development to increase the rate of reproduction. The clock can be adjusted to run faster and faster, but there are limits: Increasing the rate can increase errors, as well, negating the advantages of speed with failures in successful completion in development. Molecules and cells can only respond so fast to fluctuations in the levels of regulatory genes without the whole process smearing into incoherence. Mutations that create shortcuts, that set up parts of the pattern independent of the clock, can become highly advantageous.

Imagine that an organism has a generic, clocklike mechanism that partitions off identical segments, one after the other, to make a pattern like this: head, A, A, A, A… tail, where “A” represents a particular regulatory gene that defines the form of a single segment, and each A is turned on sequentially over time from the front to the back. A duplication event (a very common process in genetics) produces a copy of the A gene, which initially does nothing more than add a little redundancy to the process. But the new copy of A (let’s call it B) can evolve independently of the original and acquire new functions, such as activation in an adjacent region when A is switched on—that is, every time A is activated, so is B, at essentially the same time. Now our animal can build segments twice as fast: head, A-B, A-B… tail.

Evolution can optimize this still further. The regulatory circuitry for A or B can acquire, by chance, sensitivity to other conditions in the animal, such as the concentration of some other gene product, or the absence of a particular gene product, or the activity of a gene in an adjacent tissue. If that regulatory change switches on one of the segmental genes in a place where the clocklike circuit would have activated it anyway, it’s all to the good: It makes the segmental pattern more robust. Any addition to the circuit that happens to flick gene A or B on in the appropriate place can persist and eventually take over the job of the clock, at least in that one location. As more and more dedicated regulatory elements accumulate, the original elegant algorithm becomes superfluous and can fade away—selection can favor genetic pathways that establish the pattern quickly rather than sequentially, and the organism is rewarded with faster development built on a framework of dedicated special purpose patches defining each segment.

This is precisely what we see in the fruit fly. It doesn’t build its segments sequentially at all: instead, gene products interact in complex ways, with broad bands of segmental genes refining themselves rapidly by early interactions to establish a pattern of segmental stripes almost all at once. When the individual segmental genes are examined, they are found to each have stacks of logical switches to turn them on in dedicated patterns in specific places in the animal—each stripe is specified by a hard-coded set of regulatory elements.

The complexity of developmental regulation isn’t a product of design at all, and it’s the antithesis of what human designers would consider good planning or an elegant algorithm. It is, however, exactly what you’d expect as the result of cobbling together fortuitous accidents, stringing together helpful scraps into an outcome that may not be pretty, but it works. That’s all evolution needs from developmental processes: something that works well enough, no matter how awkward or needlessly complex it may seem.

Originally published January 7, 2008

Tags complexity design structure

Share this Stumbleupon Reddit Email + More


  • Ideas

    I Tried Almost Everything Else

    John Rinn, snowboarder, skateboarder, and “genomic origamist,” on why we should dumpster-dive in our genomes and the inspiration of a middle-distance runner.

  • Ideas

    Going, Going, Gone

    The second most common element in the universe is increasingly rare on Earth—except, for now, in America.

  • Ideas

    Earth-like Planets Aren’t Rare

    Renowned planetary scientist James Kasting on the odds of finding another Earth-like planet and the power of science fiction.

The Seed Salon

Video: conversations with leading scientists and thinkers on fundamental issues and ideas at the edge of science and culture.

Are We Beyond the Two Cultures?

Video: Seed revisits the questions C.P. Snow raised about science and the humanities 50 years by asking six great thinkers, Where are we now?

Saved by Science

Audio slideshow: Justine Cooper's large-format photographs of the collections behind the walls of the American Museum of Natural History.

The Universe in 2009

In 2009, we are celebrating curiosity and creativity with a dynamic look at the very best ideas that give us reason for optimism.

Revolutionary Minds
The Interpreters

In this installment of Revolutionary Minds, five people who use the new tools of science to educate, illuminate, and engage.

The Seed Design Series

Leading scientists, designers, and architects on ideas like the personal genome, brain visualization, generative architecture, and collective design.

The Seed State of Science

Seed examines the radical changes within science itself by assessing the evolving role of scientists and the shifting dimensions of scientific practice.

A Place for Science

On the trail of the haunts, homes, and posts of knowledge, from the laboratory to the field.


Witness the science. Stunning photographic portfolios from the pages of Seed magazine.

Sites by Seed Media Group: Seed Media Group | ScienceBlogs | Research Blogging | SEEDMAGAZINE.COM