An architect designs a great cathedral. Then, through a hierarchical chain of command, the building operation is broken down into separate departments, which break it down further into sub-departments, and so on until instructions are finally handed out to individual masons, carpenters and glaziers, who go to work until the cathedral is built, looking pretty much like the architect’s original drawing. That’s top-down design.
Bottom-up design works completely differently. I never believed this, but there used to be a myth that some of the finest medieval cathedrals in Europe had no architect. Nobody designed the cathedral. Each mason and carpenter would busy himself, in his own skilled way, with his own little corner of the building, paying scant attention to what the others were doing and no attention to any overall plan. Somehow, out of such anarchy, a cathedral would emerge. If that really happened, it would be bottom-up architecture. Notwithstanding the myth, it surely didn’t happen like that for cathedrals. But that pretty much is what happens in the building of a termite mound or an ant’snest – and in the development of an embryo. It is what makes embryology so remarkably different from anything we humans are familiar with, in the way of construction or manufacture.
The same principle works for certain types of computer programs, for certain types of animal behavior, and – bringing the two together – for computer programs that are designed to simulate animal behavior. Suppose we wanted to understand the flocking behavior of starlings. What is remarkable about the starlings’ behavior is that, despite all appearances, there is no choreographer and, as far as we know, no leader. Each individual bird is just following local rules.
The numbers of individual birds in these flocks can run into thousands, yet they almost literally never collide. That is just as well for, given the speed at which they fly, any such impact would severely injure them. Often the whole flock seems to behave as a single individual, wheeling and turning as one. It can look as though the separate flocks are moving through each other in opposite directions, maintaining their coherence intact as separate flocks. This makes, it seem almost miraculous, but actually the flocks are at different distances from the camera and do not literally move through each other. It adds to the aesthetic pleasure that the edges of the flocks are so sharply defined. They don’t peter off gradually, but come to anabrupt boundary. The density of the birds just inside the boundary is no less than in the middle of the flock, while it is zero outside the boundary. As soon as you think about it in that way, isn’t it wondrously surprising?
The whole performance would make a more than usually elegant screensaver on a computer. You wouldn’t want a real film of starlings, because your screensaver would repeat the same identical balletic moves over and over, and therefore wouldn’t exercise all the pixels, equally. What you would want is a computer simulation of starling flocks; and, as any programmer will tell you, there’s a right way and a wrong way to do it. Don’t try to choreograph the whole ballet – that would be terribly bad programming style for this kind of task. I need to talk about the better way to do it because something like it is almost certainly how the birds themselves are programmed, in their brains. More to the point, it is a great analogy for how embryology works.
Here’s how to program flocking behavior in starlings. Devote almost all your effort to programming the behavior of a single individual bird. Build into your robots-starling detailed rules for how to fly, and how to react to the presence of neighboring starlings, depending on their distance and relative position. Build in rules for how much weight to give to the behavior of neighbors, and how much weight to give to individual initiative in changing direction. These model rules would be informed by careful measurements of real birds in action. Endow your cyber-bird with a certain tendency to vary its rules at random. Having written a complicated program to specify the behavioral rules of a single starling now comes the definitive step that I am emphasizing in this chapter. Don’t try to program the behavior of a whole flock, as an earlier generation of computer programmers might have done. Instead, clone the single computer starling you have programmed. Make a thousand copies of your robo-bird, maybe all the same as each other, or maybe with some slight random variation among them in their rules. And now `release’ thousands of model starlings in your computer, so they are free to interact with each other, all obeying the same rules.
If you’ve got the behavioral rules right for a single starling, a thousand computer starlings, each one a dot on the screen, will behave like real starlings flocking in winter. If the flocking behavior isn’t quite right, you can go back and adjust the behavior of the individual starling, perhaps in the light of further measurements of the behavior of real starlings. Now clone up the new version a thousand times, in place of the thousand that didn’t quite work. Keep iterating your reprogramming of the cloned-up single starling, until the flocking behavior of thousands of them on the screen is a satisfyingly realistic screensaver. Calling it ‘Boids’, Craig Reynolds wrote a program along these lines (not specifically for starlings) in 1986.
The key point is that there is no choreographer and no leader. Order, organization, structure – these all emerge as by-products of rules which are obeyed locally and many times over, not globally. And that is how embryology works. It is all done by local rules, at various levels but especially the level of the single cell. No choreographer. No conductor of the orchestra. No central planning. No architect. In the field of development, or manufacture, the equivalent of this kind of programming is self-assembly.
The body of a human, an eagle, a mole, a dolphin, a cheetah, a leopard frog, a swallow: these are so beautifully put together, it seems impossible to believe that the genes that program their development don’t function as a blueprint, a design, a master plan. But no: as with the computer starlings, it is all done by individual cells obeying local rules. The beautifully ‘designed’ body emerges as a consequence of rules being locally obeyed by individual cells, with no reference to anything that could be called an overall global plan. The cells of a developing embryo wheel and dance around each other like starlings in gigantic flocks. There are differences, and they are important. Unlike starlings, cells are physically attached to each other in sheets and blocks: their `flocks’ are called ’tissues’. When they wheel and dance like miniature starlings, the consequence is that three-dimensional shapes are formed, as tissues invaginate in response to the movements of cells; or swell or shrink due to local patterns of growth and cell death. The analog – I like for this is the paper-folding art of origami, suggested by the distinguished embryologist Lewis Wolpert in his book The Triumph of the Embryo; but before coming to that I need to clear out of the war some alternative analogies that might come to mind – analogies from among human crafts and manufacturing processes.
Excerpted from ‘The Greatest Show on Earth’ by Richard Dawkins