Sows confined in gestation crates. These highly social and intelligent beings spend most of their lives in this condition, as if they were already sausages.
© Balint Porneczi/Bloomberg via Getty Images.
Organisms are Algorithms
How can we be sure that animals such as pigs actually have a subjective world of needs, sensations and emotions? Aren’t we guilty of humanising animals, i.e. ascribing human qualities to non-human entities, like children believing that dolls feel love and anger?
In fact, attributing emotions to pigs doesn’t humanise them. It ‘mammalises’ them. For emotions are not a uniquely human quality – they are common to all mammals (as well as to all birds and probably to some reptiles and even fish). All mammals evolved emotional abilities and needs, and from the fact that pigs are mammals we can safely deduce that they have emotions.16
In recent decades life scientists have demonstrated that emotions are not some mysterious spiritual phenomenon that is useful just for writing poetry and composing symphonies. Rather, emotions are biochemical algorithms that are vital for the survival and reproduction of all mammals. What does this mean? Well, let’s begin by explaining what an algorithm is. This is of great importance not only because this key concept will reappear in many of the following chapters, but also because the twenty-first century will be dominated by algorithms. ‘Algorithm’ is arguably the single most important concept in our world. If we want to understand our life and our future, we should make every effort to understand what an algorithm is, and how algorithms are connected with emotions.
An algorithm is a methodical set of steps that can be used to make calculations, resolve problems and reach decisions. An algorithm isn’t a particular calculation, but the method followed when making the calculation. For example, if you want to calculate the average between two numbers, you can use a simple algorithm. The algorithm says: ‘First step: add the two numbers together. Second step: divide the sum by two.’ When you enter the numbers 4 and 8, you get 6. When you enter 117 and 231, you get 174.
A more complex example is a cooking recipe. An algorithm for preparing vegetable soup may tell us:
1. Heat half a cup of oil in a pot.
2. Finely chop four onions.
3. Fry the onion until golden.
4. Cut three potatoes into chunks and add to the pot.
5. Slice a cabbage into strips and add to the pot.
And so forth. You can follow the same algorithm dozens of times, each time using slightly different vegetables, and therefore getting a slightly different soup. But the algorithm remains the same.
A recipe by itself cannot make soup. You need a person to read the recipe and follow the prescribed set of steps. But you can build a machine that embodies this algorithm and follows it automatically. Then you just need to provide the machine with water, electricity and vegetables – and it will prepare the soup by itself. There aren’t many soup machines around, but you are probably familiar with beverage vending machines. Such machines usually have a slot for coins, an opening for cups, and rows of buttons. The first row has buttons for coffee, tea and cocoa. The second row is marked: no sugar, one spoon of sugar, two spoons of sugar. The third row indicates milk, soya milk, no milk. A man approaches the machine, inserts a coin into the slot and presses the buttons marked ‘tea’, ‘one sugar’ and ‘milk’. The machine kicks into action, following a precise set of steps. It drops a tea bag into a cup, pours boiling water, adds a spoonful of sugar and milk, and ding! A nice cup of tea emerges. This is an algorithm.17
Over the last few decades biologists have reached the firm conclusion that the man pressing the buttons and drinking the tea is also an algorithm. A much more complicated algorithm than the vending machine, no doubt, but still an algorithm. Humans are algorithms that produce not cups of tea, but copies of themselves (like a vending machine which, if you press the right combination of buttons, produces another vending machine).
The algorithms controlling vending machines work through mechanical gears and electric circuits. The algorithms controlling humans work through sensations, emotions and thoughts. And exactly the same kind of algorithms control pigs, baboons, otters and chickens. Consider, for example, the following survival problem: a baboon spots some bananas hanging on a tree, but also notices a lion lurking nearby. Should the baboon risk his life for those bananas?
This boils down to a mathematical problem of calculating probabilities: the probability that the baboon will die of hunger if he does not eat the bananas, versus the probability that the lion will catch the baboon. In order to solve this problem the baboon needs to take into account a lot of data. How far am I from the bananas? How far away is the lion? How fast can I run? How fast can the lion run? Is the lion awake or asleep? Does the lion seem to be hungry or satiated? How many bananas are there? Are they big or small? Green or ripe? In addition to these external data, the baboon must also consider information about conditions within his own body. If he is starving, it makes sense to risk everything for those bananas, no matter the odds. In contrast, if he has just eaten, and the bananas are mere greed, why take any risks at all?
In order to weigh and balance all these variables and probabilities, the baboon requires far more complicated algorithms than the ones controlling automatic vending machines. The prize for making correct calculations is correspondingly greater. The prize is the very survival of the baboon. A timid baboon – one whose algorithms overestimate dangers – will starve to death, and the genes that shaped these cowardly algorithms will perish with him. A rash baboon – one whose algorithms underestimate dangers – will fall prey to the lion, and his reckless genes will also fail to make it to the next generation. These algorithms undergo constant quality control by natural selection. Only animals that calculate probabilities correctly leave offspring behind.
Yet this is all very abstract. How exactly does a baboon calculate probabilities? He certainly doesn’t draw a pencil from behind his ear, a notebook from a back pocket, and start computing running speeds and energy levels with a calculator. Rather, the baboon’s entire body is the calculator. What we call sensations and emotions are in fact algorithms. The baboon feels hunger, he feels fear and trembling at the sight of the lion, and he feels his mouth watering at the sight of the bananas. Within a split second, he experiences a storm of sensations, emotions and desires, which is nothing but the process of calculation. The result will appear as a feeling: the baboon will suddenly feel his spirit rising, his hairs standing on end, his muscles tensing, his chest expanding, and he will inhale a big breath, and ‘Forward! I can do it! To the bananas!’ Alternatively, he may be overcome by fear, his shoulders will droop, his stomach will turn, his legs will give way, and ‘Mama! A lion! Help!’ Sometimes the probabilities match so evenly that it is hard to decide. This too will manifest itself as a feeling. The baboon will feel confused and indecisive. ‘Yes ... No ... Yes ... No ... Damn! I don’t know what to do!’
In order to transmit genes to the next generation, it is not enough to solve survival problems. Animals also need to solve reproduction problems too, and this depends on calculating probabilities. Natural selection evolved passion and disgust as quick algorithms for evaluating reproduction odds. Beauty means ‘good chances for having successful offspring’. When a woman sees a man and thinks, ‘Wow! He is gorgeous!’ and when a peahen sees a peacock and thinks, ‘Jesus! What a tail!’ they are doing something similar to the automatic vending machine. As light reflected from the male’s body hits their retinas, extremely powerful algorithms honed by millions of years of evolution kick in. Within a few milliseconds the algorithms convert tiny cues in the male’s external appearance into reproduction probabilities, and reach the conclusion: ‘In all likelihood, this is a very healthy and fertile male, with excellent genes. If I mate with him, my offspring are also likely to enjoy good health and excellent genes.’ Of course, this conclusion is not spelled out in words or numbers, but in the fiery itch of sexual attraction. Peahens, and most women, don’t make such calculations with pen and paper. They just feel them.