Discover the best of the web!
Learn more about Digg by taking the tour.
The Prisoners' Dilemma
serendip.brynmawr.edu — Cooperate or compete? A game studied by people in a variety of disciplines, including biology, sociology and public policy.
- 456 diggs
- digg it
- Lenbot, on 05/15/2008, -4/+6hmmmm couldn't find a good strategy anyone else find something good?
- centerblack, on 05/15/2008, -1/+17Always cooperate.
- centerblack, on 05/15/2008, -0/+8At least for this game, the AI waits for you to defect first.
- pugs909, on 05/15/2008, -0/+4tit for tat
- jondo85, on 05/17/2008, -0/+1Apparently that is the, or one of the best strategies for the dilemma; there was a programming contest a couple of years ago where everyone submitted their strategies - the winner always co-operated until the other player defected, then always defected.
Co-operation people!
- Jektal, on 05/15/2008, -0/+7Yeah, as I remember it, the "tit for tat" strategy is basically:
By default: Cooperate. If they try to rob you, rob them back, if they switch back to cooperating, do the same.
- centerblack, on 05/15/2008, -0/+8At least for this game, the AI waits for you to defect first.
- quomen, on 05/15/2008, -7/+8Always compete, it's called the dominant strategy in economics. Read my reply to lucidguru for more.
- quomen, on 05/15/2008, -3/+3Ok for a short version, you can't control what the other person is going to do. They could try to screw you or try to hold hands with you. Regardless of the decision that you make, the best choice for you is to compete. If they try to screw you then you both come out with 1, which is better than 0. If they try to be nice then you come out with 5, which is much better than his 0. If you conduct this game with real humans you'll see that this is the case (rather than trying to predict the website's cooperation algorithm)
- bobotheking, on 05/15/2008, -1/+6Have fun with your 14 gold coins. In the meantime, I will be enjoying my 42.
- pugs909, on 05/15/2008, -1/+6did you try always competing vs this AI which uses the tit-for-tat strategy, genius?
- quomen, on 05/15/2008, -2/+4Yes, I did. I win every time.
How about you find a computer than can accurately predict the strategies of real humans (lots of them).
Don't forget the point of this game is to achieve the greatest well being for yourself, regardless of what the opponent does. "Winning" will always be achieved by picking the dominant strategy. Because it's the most dominant strategy, both competitors will most likely always pick it after the first round. This is called a Nash Equilibrium.- Mejogid, on 05/15/2008, -0/+6Except it's not about getting more than the "AI" - it's about getting the greatest possible number of coins. It's not possible to get less than a tit-for-tat strategy - the worst you can do is draw.
- auto98, on 05/15/2008, -1/+1true, but that doesn't mean it is the BEST choice
- Future2, on 05/20/2008, -0/+2quomen you're right that if this game was played once the NE is don't cooperate, and the payoffs would be (1,1). This is the nature of a PD game. When PD games are iterated though, trigger strategies (eg: tit-for-tat) can form a NE. Whether or not the trigger strategy forms a NE is dependent on the discount factor of both players. This game assumes a discount factor of 1 for both players (each round is worth the exact same as the previous).
- quomen, on 05/15/2008, -2/+4Yes, I did. I win every time.
- auto98, on 05/15/2008, -0/+5actually the best strategy is to cooperate first time, then after that do what your opponent did the time before (tit for tat as stated above)
Obviously this is assuming there is no teams or whatnot- thebigbradwolf, on 05/15/2008, -0/+0Depends on your goal, I suppose. If you always cooperate you both average 3.0 coins per turn, if you both choose differently, and then switch, you both average 2.5 coins per turn. If you can manage to always betray and have your opponent never betray, you get rich, but there's less overall wealth.
- quomen, on 05/15/2008, -3/+3Ok for a short version, you can't control what the other person is going to do. They could try to screw you or try to hold hands with you. Regardless of the decision that you make, the best choice for you is to compete. If they try to screw you then you both come out with 1, which is better than 0. If they try to be nice then you come out with 5, which is much better than his 0. If you conduct this game with real humans you'll see that this is the case (rather than trying to predict the website's cooperation algorithm)
- isntreal, on 05/15/2008, -1/+4tit for tat
- amdahlj, on 05/15/2008, -2/+5Tit for tat is the foundation of all the best strategies in iterated pd. If it isn't iterated, always defect.
- Tanath, on 05/15/2008, -0/+1No, this isn't an indefinitely iterated game, nor is it a single iteration. The best strategy seems to be to cooperate until the end, then defect to avoid retaliation. If the computer player weren't playing a predictable tit-for-tat strategy this might not have been the case.
- solistus, on 05/17/2008, -0/+1The game randomises the end turn a bit. If you miss by one, you end up gaining a slight relative advantage and no absolute advantage (you get your 5-0 and then a 1-1, so you still get 6 but deprive the other of 5). If you miss by more than one, you can maintain an increasingly small relative advantage, but you have an absolute loss (i.e., both players have less than 3/turn, but you have more than the AI). In most formulations of the PD, this is considered an undesirable outcome for both parties; the logic becomes much different if relative advantage is the goal, and always defect becomes the only viable strategy (cooperating can never provide a single point of relative gain). The more iterations, the less likely a late defection will be rewarded. I guess over infinite repetitions, the optimal strategy would be to spend a long time figuring out the probabilities of various numbers of total turns, then calculate the optimal turn to defect based on that.
- Tanath, on 05/15/2008, -0/+1No, this isn't an indefinitely iterated game, nor is it a single iteration. The best strategy seems to be to cooperate until the end, then defect to avoid retaliation. If the computer player weren't playing a predictable tit-for-tat strategy this might not have been the case.
- solistus, on 05/17/2008, -0/+2Tit-for-tat has been mathematically demonstrated to be the optimal strategy for IPD (that is, prisoner's dilemma with repetition). If you always defect, a TFTer will switch to defecting too, and you both do poorly. The best any strategy can possibly do in a classic IPD scenario is tie a TFTer. This is discussed elsewhere on the linked site, if you bother to read it.
quomen repeats one of the most common game theory false assumptions. Competition is, by definition, sub-optimal. It involves consuming resources (or in this case, expected value) to take other resources in a zero-sum environment. Cooperation uses resources in ways that complement each other to increase expected value. Competition in macro-economics is an example of egoist cooperation; each agent is out to maximise gain, but game relationships between agents are based on preset frameworks of cooperation. This is why business partners accomodate each other and attempt to create a mutually beneficial partnership rather than opposing each other for potential immediate gain at every turn. If you try to "always defect" in economic exchanges, you will very quickly discover that it is a very sub-optimal aproach. In the 'real world,' where you have at least partially free associations with many potential players, the prisoner's dilemma tends toward establishing cooperative norms (e.g., rule of law and property rights to allow functioning economic exchange).
- centerblack, on 05/15/2008, -1/+17Always cooperate.
- rlray216, on 05/15/2008, -2/+8This is awesome. Best submission of the day, IMO.
- Tanath, on 05/15/2008, -0/+1If you want some good reading & explanation behind this, I recommend The Evolution of Cooperation, by Robert Axelrod. He's the one who figured out the tit-for-tat thing (and then wrote the book about it).
- lucidguru, on 05/15/2008, -1/+3Hawk vs Dove
- zephc, on 05/15/2008, -2/+5There are two kinds of people: sheep and sharks. Anyone who's a sheep is fired. Who's a sheep? Sharks are winners and they don't look back 'cause they don't have necks. Necks are for sheep.
- roodammy44, on 05/15/2008, -0/+2Shark population = some nearing extinction
Sheep population = More sheep than humans
Looking at it like that, being aggressive is a bad strategy.
But also looking at it through evolutionary biology, tit for tat is nature's way of deciding who we should be altruistic to and who not to.
We can keep track, socially, of around 150 people who we can remember who has been bad to us in the past and who has been good.
If they have been bad, we treat them bad. If they have been good, we treat them good.
Therefore being a "social shark" will only get you misery your entire life, unless you only spend your time around people who don't know you.- zephc, on 05/16/2008, -0/+2Jeez, its a Futurama quote, Poindexter.
- roodammy44, on 05/15/2008, -0/+2Shark population = some nearing extinction
- Tanath, on 05/15/2008, -0/+1Someone's read The Selfish Gene.
- zephc, on 05/15/2008, -2/+5There are two kinds of people: sheep and sharks. Anyone who's a sheep is fired. Who's a sheep? Sharks are winners and they don't look back 'cause they don't have necks. Necks are for sheep.
- lucidguru, on 05/15/2008, -6/+25The best strategy is to cooperate up until the end and then compete and steal the last round. The problem is that you don't know when that last round will come. Cooperation is the most profitable way to go. Competing every round gets you 5 to start but only 1 after every round. And alternating between competing and cooperating gets you 2.5 per round.
- quomen, on 05/15/2008, -6/+12The dominant strategy is actually to compete. The problem with your idea is that, even in a game where the player knew how many rounds they were going to play, they are going to try predict the actions of another person. Supposed that you are trying to play nice with your competitor so that you can trick them in the last round. How do you know that the competitor won't do the same thing too? You don't, so most likely he is thinking of that strategy. What's the next best idea? Maybe try to trick the person in round 9, instead of round 10 (the last one), because you're trying to predict what they are going to do. However, he would do that too and also compete in round 9. This can go on forever. However, the more rounds you have, the more likely you'll both come to an [unspoken] collusive agreement. This has been played out in millions of economics experiments.
- jim3008, on 05/15/2008, -1/+2yup, i second that
- Tanath, on 05/15/2008, -0/+2No, the best strategy is dependent on the game actually being played. This implementation is different from the scenario you're discussing, particularly in that it is playing a predictable strategy. The best strategy is tit-for-tat, until the end, and then defect at the end to avoid retaliation.
The interesting thing though, is that on average, across the entire span of all players, it's tit-for-tat strategy will still do better. - solistus, on 05/17/2008, -0/+1What are you talking about? You start by saying the dominant strategy is to compete (which is false), then you seem to conclude that the likely outcome is cooperation (which is correct).
The prisoner's dilemma is only a dilemma if you're concerned with absolute and not relative gain. The only way to have relative gain is defection, so always compete is the only strategy if relative gain is the goal (or, more likely, an entirely different decision model and incentive structure would exist in such a case that would not match that of the PD).
Given that we're concerned about absolute gain, the ONLY way that defecting at the end pays off is if you do it on the right turn and your opponent does not. Randomising the number of turns means that, unless you are confident that you will be right most of the time and never too far wrong (you lose a lot of absolute value for every turn after you defect), it's never correct to defect. If the number of turns is known, then the last round is functionally equivalent to a non-iterative PD, in which case, assuming you have no contextual knowledge to make a prediction based on, defection is correct. However, in most IPDs, this is not factored in; it's sort of an irrelevant detail of how some IPDs are formulated, which is why many theoretical applications assume an unspecified or infinite number of iterations. The point is to evaluate long-term reactive strategies. Non-iterative PD is about as strategic as non-iterative rock-paper-scissors (incidentally, iterative RPS is an unsolved game and thus far more complex than IPD ; ).
- quomen, on 05/15/2008, -4/+3While cooperating every round will bring about the greatest total well being and player surplus, that's not how human minds work. Humans are going to play the dominant strategy, which means that people will pick the outcome that works best for them no matter what the other player does in the game. So if the other player decides to cooperate then what would be the best for me? To compete of course for 5 gold. How about if the other player chooses to compete? The best strategy is again to compete, because 1 gold is better than 0. Even when there is communication between two players, it's very difficult to maintain a trust because collusive agreements are usually non-binding. However, you could impose penalties for a violator, but that's a completely different game altogether. It does seem like a waste to society, picking that dominant strategy does lead to dead weight losses, but hey, it's a game. You can't have two winners in a market society.
- celticspringers, on 05/15/2008, -0/+2"that´s not how human minds work"
Really? I think there are a number of factors that incentivise co-operation in repeat PD games.
1) Reciprocal altruism: There is an opportunity for making one’s choices conditional on those of one’s partner – threatening defection in return for defection. It is rational to resist temptations to defect rather than face the damage of long term mutual non-cooperation. This is Axelrod´s fundamental argument.
2) Evolutionary psychology has shown that human behaviour is better understood in terms of strong reciprocity: we have a hard-wired predisposition to cooperate, a throwover from our hunter-gatherer evolution.
3) Reputation ( i.e. to threaten dire consequences or future benefits). Creates a presumption of credible threats.
Of course, in PD games, the ending must be unknown to both parties otherwise backward induction (where players know there is no incentive to cooperate) will unravel strategic incentives back to the beginning. But I think rational choice assumptions of behaviour are very limited.
- celticspringers, on 05/15/2008, -0/+2"that´s not how human minds work"
- amdahlj, on 05/15/2008, -1/+2If you are playing iterated pd, use a tit-for-tat based strategy. Otherwise, always defect. That's the bottom line.
- quomen, on 05/15/2008, -1/+2Did you not read what I said? I said that when you play more than once you're more likely going to reach a collusive strategy. And where did you get defect from?
Edit: nvm I see it in the wikipedia article. ok then, thanks Prof. Wiki. - Tanath, on 05/15/2008, -0/+1The best strategy depends not only on the game being played, but on the other strategies being used. If the others' strategies are predictable, that changes things. In the case of this implementation, it is sufficiently predictable, and there are superior strategies.
- quomen, on 05/15/2008, -1/+2Did you not read what I said? I said that when you play more than once you're more likely going to reach a collusive strategy. And where did you get defect from?
- quomen, on 05/15/2008, -6/+12The dominant strategy is actually to compete. The problem with your idea is that, even in a game where the player knew how many rounds they were going to play, they are going to try predict the actions of another person. Supposed that you are trying to play nice with your competitor so that you can trick them in the last round. How do you know that the competitor won't do the same thing too? You don't, so most likely he is thinking of that strategy. What's the next best idea? Maybe try to trick the person in round 9, instead of round 10 (the last one), because you're trying to predict what they are going to do. However, he would do that too and also compete in round 9. This can go on forever. However, the more rounds you have, the more likely you'll both come to an [unspoken] collusive agreement. This has been played out in millions of economics experiments.
- axisofphilippe, on 05/15/2008, -12/+3To rape, or not to rape?
- Conway, on 05/15/2008, -1/+12http://en.wikipedia.org/wiki/Prisoner%27s_dilemma
- sononame, on 05/15/2008, -1/+7Is this this John Nash's Game Theory?
- quomen, on 05/15/2008, -0/+15John Nash didn't create the Game Theory, he came up with the "Nash Equilibrium" which is the point where neither of two players of a game have anything to gain from changing their strategy. You were close though. lol basic econ coming to digg ftw.
- jeebus, on 05/15/2008, -4/+1 She never gets old! Marcee can't be real; she never gets old!
- mirot, on 05/15/2008, -4/+8The best strategy is to first cooperate, and then copy what your opponent did on the previous round.
- digghasnoethics, on 05/15/2008, -0/+7It was called "Tit for Tat" on the programme I saw. Multiple simulation runs between different strategies showed that this one was the best out of those tested. International commerce could be said to run by the same strategy.
- amdahlj, on 05/15/2008, -1/+1Tit-for-tat is the basis of the best strategies for iterated pd. For non-iterated pd, always defect.
- harrykipper, on 05/15/2008, -6/+1start cooperating, cooperate for 10-12 moves, then defect.
strong proven strategy. - harrykipper, on 05/15/2008, -4/+0OK, serendip's strategy is to always repeat your move. So, in order to win over serendip the best strategy is to start cooperating, then after a number of moves defect, then keep defecting. The best strategy to maximize social wealth (yours+serendip's coins) is to always cooperate
- Tanath, on 05/15/2008, -0/+2Actually, if you predict the end too soon, and defect, then it's better to alternate with a player using tit-for-tat.
- Flashman, on 05/15/2008, -0/+3Is there a version of this online where we can play against one another?
- isntreal, on 05/15/2008, -1/+3I wrote this program last semester in java... I'll try to find it and make it an applet.
- taradisiac, on 05/15/2008, -4/+5Police are known to lie about what evidence they have and being bullies. If I actually committed a crime and chose an associate for that, we would know better than being scared of them.
- yellowswan, on 05/15/2008, -3/+0The strategy I've found to exhibit the most efficacy in producing both a ≥3.00 coin average, while acquiring more than Serendip (in my brief play through this morning) involves Competing at first, next Cooperating until the 9th turn and then Competing once more, Cooperating until the 14th turn, and finally selecting Compete.
Once at this juncture the game seems to have a 50% chance of ending or continuing, if it continues it will conclude as I outlined above, If not then simply Cooperate until the 19th and Compete, and so on and so forth (5 turn intervals, I haven't gotten the program to allow me too far with this strat).
Not foolproof or entirely effective, but it has produced the best results for me yet. Anyone else topping ≥3.20? - fastspawn, on 05/15/2008, -0/+1Hi! I tried this interesting game. A lot of people here claim that competing is the dominant strategy. I am no economist, so I would not claim to know anything. What i did was cooperating all the way and won. My average was of course 3 coins gained thus
How does competing work since you will get only 1 coin average if both compete, or 2.5 average if computer and you alternate between compete and cooperate. - Makaveli604, on 05/15/2008, -0/+1Also: Philosophy, Political Science, and Economics use the Prisoners' Dilemma..
all first term classes of mine, was very eery. - Sh0rtcake, on 05/15/2008, -2/+1we JUST did this exercise in my negotiation class on tuesday. it's so hard because you want everyone to cooperate, but then everyone always re-nigs and chooses the lesser of the losses.
- YourDoom123, on 05/16/2008, -0/+1reneges?
- nick111, on 05/15/2008, -5/+5Unfortunately this game is used to demostrate a theory which underpins a philosophy which belongs in the same dustbin as eugenics.
Personally I trust as a matter of principle. ***** rational actors. There is nothing less interesting than self-interest. - noctiferis, on 05/15/2008, -4/+1I LOVE the fact that if you cooperate all the time the answer is 42 XD
- EatUrKids, on 05/15/2008, -0/+1"Not bad, but I'll bet you can do better."
He believes in ME!!! - Math, on 05/16/2008, -3/+1This explains pretty effectively the US's current stance on global warming:
- Nobody co-operates = v. bad outcome for all.
- Everybody co-operates = good outcome for all.
- Everybody co-operates, but one or two parties don't = poor outcome for most, but very good outcome (big economic advantage) for the parties that choose to compete. - TheoBloom, on 05/16/2008, -0/+0The root of most conflicts.
I've learnt them in the university, but forget how important it is. Easy to understand, to trust, but hard to follow. - MrESaulved, on 05/16/2008, -1/+1These dilemmas prove very little, the initial conditions are never the same and the "mysterious" outcomes or "threats" have varied impact from person to person making it more of a cultural study than math puzzle. Also, you're 'competing' against an algorithm that you can learn from and it can't learn from you. So you can (too) easily tailor your behavior to the function.
If these types of problems were to be anything more than back-page columns for Omni and Discover magazine, you would have both parties adapting as the game progressed, and random shifts in the rules. Otherwise it's merely soduku. - rilus, on 05/16/2008, -0/+1Tit for tat
- maldovix, on 05/17/2008, -0/+0The best solution is to use a mixed strategy which to play cooperate with a probability approaching 0.5 from the left while S plays cooperate/NC with a probability of .5, however this is not a sustainable nash equilibrium--tadaa, prisoner's dilemma.
- Narpas, on 05/18/2008, -0/+2Why are we prisoners in the first place? Cooperate until the very end, then mug Serendip and take all his coins. Presto! 6 coin average!
- flinzo, on 05/20/2008, -4/+0http://myvix.com/ Iron Man 5 game
- MarioSuperFam, on 05/24/2008, -0/+0This is an interesting game. I've found a strategy that works 50% of the time. If you hit the button without selecting anything, no one gets gold but the next round starts. If you have gold, though, and you press the button without choosing anything, you both go back to zero. So, all you need to do is alternate between taking the competition and doing nothing, and you'll win half the time.
- markdr123, on 05/24/2008, -0/+1Welcome to Game Theory!
- jprez, on 05/25/2008, -0/+1this is really dumb... same outcome everytime. lets get some god games in the playable games section
Digg is coming to a city (and computer) near you! Check out all the details on our