A well-known example of this is the flocking behavior of birds. We have all seen the precise patterns when certain species of birds fly as a group. They all seem to stay together without bumping into each other. The group splits up when facing an obstacle in their path and then elegantly come together again. It can be shown that a very simple rule or algorithm can produce this complex, and seemingly orchestrated, pattern. This algorithm only requires a couple of simple rules to follow, and only depend on the location and movement of a few of the neighboring birds. Program these rules into little dots in a computer simulation, and the dots fly around in stunningly realistic patterns, mimicking nature. Once you find the algorithm, it is easy to imagine that a similar algorithm is encoded in each bird’s brain as a neuronal circuit.
For it to be an instinct, it also must be inherited. That is, somehow a pattern in the bird’s genetic code must be able to create the specific neuronal circuit in the bird’s brain during its development. That is, we need two different emergent phenomena to pull off this amazing trick. A pattern in the genetic code must express itself in such a way that the net result is a particular set of neurons are placed in a specific part of the brain, and they are connected to each other in a specific circuit. The genetic code cannot be a photographic image of the neuronal pattern, but a recipe that can generate the pattern. The second emergent behavior is how the neuronal circuit can express itself through sensory inputs and muscle movement to execute that flocking behavior.
All this is imaginable to me. Now let’s take a slightly more complex instinct. We have all seen spider webs. When a baby spider gets into our room through a tiny crack in the window and spends the rest of its life in the isolation of our room, it still knows how to spin a perfect web. The environment is utterly novel to the creature. There were no bookshelves and books, no flowerpots and plastic when the species evolved, and yet it adopts perfectly. It finds a suitable corner, and one day starts spinning its web. Clearly this is instinctive.
This is where my imagination fails me. Do we know what type of algorithm can generate something as complex as a spider’s web? It is a perfect example of geometry and mechanical construction. At every stage of its construction the structure must be stable and strong. As each small thread is added, the forces at play are changing, and yet the structure remains viable. The initial anchor points for radial spines must be well chosen to give the structure stability, but the geometry of the surrounding space in unique to the spider. Yet, it makes the right choices, and the web is built.
I am almost sure there has been work done in this area, and scientists know roughly how such an algorithm can be written, but I have not found such literature yet. It is simply mind boggling to imagine that evolution has created millions of such algorithms, and some instinctive behaviors are orders of magnitude more complex than that of building a spider’s web. Yet, I know it has happened, and it was the handiwork of the blind process of evolution. Are we smart enough to discover the underlying algorithm behind each complex instinct we see in nature? Is that even the right approach to understand this phenomenon? Is there a different way to look at the problem that we haven’t discovered yet? These are just lazy musings on my part as I don’t have the training, nor the energy, to explore these. I would just like to know more from people who devote their lives to such things.
Beyond the algorithm part, I am not sure how much research has happened that can explain the process of building a complex neuronal circuit based on some genetic code. This, in my imagination, is an even more complex process. The process has to depend on the chemistry between different types of proteins, and ultimately boil down to molecular forces between different configuration of atoms. It is elating to realize how much more we know now than just 400 years ago, and at the same time humbling to realize that there is so much more to know. There is so little that we know, and that’s what makes life worth living.