Evolving strategies for an Iterated Prisoner's Dilemma tournament

Heads up to readers: this is a long article with lots of code samples and interactive charts. If you're reading on a mobile device, you might want to save this one until you can get to a wider screen! It may take a while to load all the charts.

Introduction

This is a longish post about using a simple evolutionary algorithm in Python to create a strategy for playing the famous Prisoner's Dilemma game (actually, the version known as Iterated Prisoner's Dilemma, hereafter referred to as IPD). If you're not already familiar with the Prisoner's ...

more ...

Which is harder, walking or flying?

One of the nice things about having a reliable knowledge of the relationships between groups of organisms is that it lets us figure out when different traits have evolved. This can be of great practical importance – for instance, if we see that a particular mutation has evolved independently in several species that are all parasites, then it suggests that the mutation might be important for parasitism. It also lets us make more general statements about the history of life on earth – for example, we can say with great certainty that complex eyes have evolved independently multiple times.

Another trait that ...

more ...