Non-programming books for programmers: The Selfish Gene

Posted by Louis Brandy on 07 March 2010

My wife loves fiction. It's not my thing. I've tried, but I struggle to read fiction. There are some novels that I've heard are beloved by my fellow programmers (Cryptonomicon for one), and I'd love to hear any other suggestions along this line.

For me, though, my heart belongs to nonfiction. Especially science. One book, in particular, stands above the rest. I've read The Selfish Gene, by Richard Dawkins, twice and, for me, it's quite simply the most interesting book I've ever read.

If you haven't read it...

If you are anything like me (a programmer and general science nerd) and you haven't read it, this is approximately what you'll be thinking:
I understand evolution pretty well, and I don't really need to read a book to understand evolution. Besides, evolution is kind of boring -- the fittest survive, and pass on their genes, problem solved. I'd rather read about physics.

---me (and maybe you), before reading

Let me try to put into words how wrong this was. First, and foremost, this book made me realize how absolutely little I've actually thought about evolution, and how absolutely fascinating evolutionary biology is. This book is basically a series of mental experiments to explain the biological world through game theory. The organisms are playing a giant game, and those with the best strategies will survive. Please note that the "best" strategies often depend on what strategies everyone else is using. Therefore, a population will then tend towards evolutionary stable mixes of strategies. You will have repeated WTF moments as he makes the most unintuitive animal behaviors (ie, strategies) suddenly make perfect sense.

Second, let me say, that as a programmer, you have a VERY UNIQUE perspective that makes evolutionary biology (and the arguments in the book) extremely fascinating (more on this in a bit). Last, and maybe most importantly, for me, it is fairly safe to say that if I had read this book in high school, instead of recently, I'd probably have become an evolutionary biologist, and not a programmer. It was that interesting.

A quick overview

In the book, Richard Dawkins basically argues for an evolutionary understanding from a "gene's eye view". In other words, everything in evolution makes sense if you think of genes as the unit of selection, and not individuals nor groups. Most of the book is set against the backdrop of Dawkins arguing against a competing theory known as group selection. Now, I am no evolutionary biologist, so I'm not going to weigh in too much on who is right (as I understand it, Dawkins is "mostly" right but there is some controversy at the edges), but the book itself makes so many fascinating arguments that it's worth the read for that alone.

It is amazing how much the gene's eye view of the problem changes the game. It can, to some extent, put your life into perspective. From a gene's perspective, keeping you alive until you reproduce is a good thing. Keeping you alive for too long after is a bad thing, because you are now competition for your children. You are nothing but a survival mechanism built for and by your genes. At some point, your genes would prefer if you'd just die.

Certain behaviors are, seemingly, difficult to explain from a naive understanding of the theory of evolution. The primary one (one that is discussed at length) is altruism in the animal kingdom. It would seem that given the whole survival of the fittest thing, altruism would usually be a bad idea. Dawkins argues extensively, using numerous examples, of exactly how altruism helps particular genes reproduce. Or, and more to the title, how "selfish" actions by a gene (the gene looking out for only itself) leads to altruistic actions in the individual.

A giant exercise in game theory

Dawkins goes on to make plausible explanations for all sorts of phenomonan that you've probably never even considered as requiring an explanation. Here's a great example: you might be able to think of a good evolutionary explanation for why sexual reproduction came about (Dawkins gives you the usual reason, if you can't), but can you think of a sound reason why nature settled on two sexes? Why not just one (anyone can mate with anyone?) Why not three? Or Four? The answer Dawkins gives is a bit speculative, but fascinatingly plausible. [note: much of the book is Dawkins' summary of other people's work on these various issues... I don't want to give the impression that all of these discussions are his original work]

The basic argument goes as follows. In the beginning of sexual reproduction among early organisms, all sex cells were basically the same. This meant any pair of sex cells could merge and become a new organism (ie, there was just one sex). Larger sex cells had an advantage over smaller ones, as it started the new organism off with a larger food supply. Over time, these cells get bigger, last longer, and are more well protected. These large sex cells are increasingly expensive to produce, but they provide the future offspring with the best start. This opens up the gene pool to exploitation from a "selfish" strategy. If you could produce extremely small, extremely cheap sex cells in large numbers, you could mate and piggyback on the "expensive" large sex cells. So some organisms began flooding the area with these cheap cells, and succeeding by piggybacking. And from here, the two types of organisms continue to diverge, generating the two sexes we see today.

So while you might argue that an all-female population would be more successful (because the males are "cheating"), an all-female population is inherently unstable. A single male introduced to this all-female world will succeed at reproducing at an alarming rate (note: this argument takes place long before animals had the ability to properly "choose" their mate, and this "choosing" and it's impact on evolution are discussed at length, with amazing results). Evolution is not creating the most fit populations, but the most stable.

This, by the way, forms the genesis of all sorts of sex-related differences seen throughout the animal kingdom: monogous preferences from females, promiscuity from males, male competition for females (in winner-take-all harem-like arrangements), and so on. And here's an interesting follow-up: if one male can produce enough sex cells for multiple females, what is the optimal sex ratio? Almost all animals hover around 50/50, but why? Why couldn't, for example, 75% female, 25% male work? Dawkins tries to explain this too!

Abstract evolution

The arguments made in the book just appeal right to the core of a computer programmer who is constantly thinking in optimizations, algorithms, and mathematics. As I said before, the entire book really reads as an attempt to explain various natural phenomenon through a combination of game theory, and the world of the genes. As a computer scientist, you cannot help but see yourself writing programs to test ideas that Dawkins puts forward. You cannot help but see the parallels in Dawkins arguments to computer algorithms. When Dawkins discusses, briefly, how computer programming is a secret passion (he might say vice) of his, you will immediately understand it "from the other side". The two disciplines are so incredibly similar. For the exact same reason I am drawn to his arguments, he is drawn into computer science. The two fields have such interesting mental overlap.

The most fascinating take away from the book is a view of evolution not as a property intrinsic to life, but as an emergent property of certain types of systems. Perhaps most famously, this is the book that Richard Dawkins invents the word meme. A meme, in his context, is an "organism" that spreads not through the natural world, but in our own minds. In other words, memes are ideas, and some are more fit to "reproduce" from brain to brain. These memes exist in an enviornment (our culuture, history, morals, and so on), and adapt as necessary to continue surviving.

I'm less fascinated by memes themselves as I am about what memes represent. The existance of memes is basically Dawkins' way of saying that evolution is an emergent property of a certain type of system. It follows directly from a set of axioms: given some form of descent with modification, and some non-random selection of those descendants, then evolution not only will happen, but must happen. Any system that fits that requirement will have evolution occurring. These systems will strive towards "organisms" that are stable within their "environment". In other words, evolution is not just a theory of life but a direct and unavoidable consequence of the rules of the game.

← On Debt Collectors Never trust a programmer who says he knows C++ →

© louis brandy — theme: midnight by mattgraham — with help from jekyll bootstrap and github pages