Monday, July 2, 2012

You selfish pig!

Ok, so the story goes as follows:

You are on a plane on the aisle seat. At the window is guy in a business suit. Quiet and seemingly very annoyed. You don't like him. In the middle, a proverbial little old lady is sitting. In contrast to the guy in the window, she seems rather chirpy. In the middle of the flight she starts talking to the both of you: "Fellows... you know what? My husband was in the steel business and he died last year, leaving me with a fortune. I'm bored and I want some fun. I'll tell you what. I'll give $100,000.00 and if you can decide how to split it, you can have it. If not, you both get nothing."

For the first time in the flight the guy at the window seems interested. "My name is Dick. What's the catch?" he says. "Ok Dick", the lady continues. "You can decide how the money should be split and if the handsome fellow next to me agrees, you can have the money, okay?". "Sure!", Dick says. "I'll take $99,000.00 and the guy in the aisle can have the other $1,000.00"

So what do you do? Can you feel Richard Dawkins' selfish gene stirring in your loins? Logically, you should always accept, because you have nothing to lose. Right?Strangely, the majority of people starts declining at around 60% (i.e. 60% for the proposer and 40% for the decider).

I was wondering what a computer will do with this... I set up the experiment as follows: A hundred thousand agents playing the game in a tournament fashion. Pick two random agents, let them play, repeat (they play one game, one the decider, the other the proposer). Each agent evolves two values. One value (the "proposition") is the value it will propose and the "decision-threshold", which is the minimum it will accept. Therefore, for a [0.9, 0.6] pair, the agent will propose 90% of the money for itself and will only accept a minimum cut of 40%, when it has to decide. I allowed this to evolve (population size of 100,000). After several generations, quadrillions of games, the most successful agent was as follows:

 P:0.73 D:0.85

This means, proposing a 73%-27% split and declining any selfish agent that wants more then 85% was optimal. Hell, this was not at all expected! I repeated the experiment several times, each time with similar results. The decision-threshold was always slightly higher, but the proposition threshold seemed to be fairly stable at around 0.7-0.9. How come? Can computers really be selfish too?

EDIT: After further experimentation, I found that the TOTAL money distributed amongst individuals tend to increase (i.e. the group improves as a whole) - and rather quickly as well.

If I initialise all agents to the most narsistic value of (P,D)=(1,0), which means I want all the money and if you don't propose I get everything, I say no.  The total money made by each generation changes as follows (generation; total money):



After which it stabilises.  This is completely emergent as I never test the total money made by the population.

4 comments:

  1. We need some visual aids Jaco!

    ReplyDelete
  2. Current working theory is it may be related to the actions of the "communities" as a whole - rather than the invidual actions themselves.

    It's almost the same as the human behaviour - punish the excessively greedy agents (wanting more than 85%) and trying to be slightly selfish yourself (accepting 25 or so %) - this has the effect of maximising your own profits but harshly punishing the excessively selfish agents and thus ostracising that behaviour - much like human communities tended to do over the ages (with psychopaths etc.)

    Very interesting, but still just a theory. Let's hear some other thoughts, and perhaps some more data (a scatter plot of the different agent's P and D values will allow us to see if there are any communities for example).

    ReplyDelete
  3. On its way... I've added a plot of something I've called the "emergent fitness" of the population (don't know if this concept exists).  Anyway, I will provide an animation showing the migration of the population soon.

    ReplyDelete
  4. I'm looking forward to more visualisations. LOL @ "Can you feel Richard Dawkins' selfish gene stirring in your loins?"

    ReplyDelete