Archive for April, 2012

Just a bit of fun: rock-paper-scissors

So now that I have my few lines of Python written, I obviously want to have a play with it. What would happen if instead of playing Iterated Prisoner’s Dilemma, they were playing Rock Paper Scissors?

There’s no iteration here, and no chance to choose a “mixed” strategy (e.g. randomly choosing each with 1/3 probability). Just three strategies: rock, paper, scissors.

So I figured: either it’s going to go around in cycles, or converge to a point where each strategy is stuck at 1/3. Since the problem feels time-reversible I’d expect cycles. And what do we get?

Continue reading ‘Just a bit of fun: rock-paper-scissors’


Group Selection

This was inspired by last week’s Less Wrong discussion.

First of all, taboo “group selection” – it seems to be responsible for too many cached thoughts.

The game is iterated prisoner’s dilemma. There is a large population, and random individuals from the population have to play IPD against each other. Over time they will accumulate a “utility” (just the sum of all the scores from the different games they played) and this utility is exponentiated to determine the number of asexual offspring that individual will have in the next generation.

We would expect successful strategies to dominate in the population, but also that whether a strategy is “successful” depends on the mix of strategies present in the rest of the population.

The payoffs are as follows:

  D C
D 1,1 3,0
C 0,3 2,2

So on each turn, if both players defect then they both score 1. If they both cooperate they both score 2. If one cooperates and the other defects then the defector scores 3 and the cooperator scores 0. Each game lasts for 10 turns.

If this was real life then we could imagine the creatures evolving all kinds of strategy. But I’m only modelling three possible strategies:

  • Always defect
  • Always cooperate
  • Tit-for-tat. Always cooperate on the first turn and then on subsequent turns, do whatever the other player did on the previous turn.

I’ve made some modelling simplifications here:

  • There is no mutation
  • Individual interactions are not modelled. Instead I compute a matrix of how well each strategy scores against each other, then work out how the populations of different strategies will change based on the mix of other strategies.
  • The total population is held constant. (This would correspond to there being some resource which is both tightly constrained and fully utilised by the population).
  • There are discrete time steps.

So what happens?

Continue reading ‘Group Selection’