RolePlay onLine RPoL Logo

, welcome to Community Chat:Religion

19:01, 1st May 2024 (GMT+0)

A prisoner's Dilemma competition.

Posted by TychoFor group 0
katisara
GM, 2951 posts
Conservative human
Antagonist
Mon 26 May 2008
at 16:30
  • msg #5

Re: A prisoner's Dilemma competition

Just so people are clear, a good strategy will say explicitly:
1)  What your first move is (and optionally, your second, third, fourth, etc.)
2)  After the first move, how you react to your opponent (so for instance, say 'for each round, I do the opposite of my opponent'.

So examples would be:
'I start with B.  Every following round I do the opposite of my opponent, except every third round, where I choose A.'

Or 'All even rounds, I choose B, all odds I choose A'

Or 'I choose AABBAABBAA for the first 10 rounds, then copy whatever my opponent did last round'.
katisara
GM, 2953 posts
Conservative human
Antagonist
Tue 27 May 2008
at 13:02
  • msg #6

Re: A prisoner's Dilemma competition

Alright, I'll toss out one for fun.


We also have Bart who has said tit for tat with forgiveness - I'm going to assume he starts with B?  And approximately 1 out of 20 (and fewer later) he'll revert to B again.
Tycho
GM, 1421 posts
Tue 27 May 2008
at 13:33
  • msg #7

Re: A prisoner's Dilemma competition

Cool, thanks Katisara!

For Bart's forgiver model, I'll use the following:
first round B
all other rounds: what opponent did previous round BUT if opponent picked A last round, this will still pick B (102-n)*.05 percent of the time.  (ie, 5% chance of forgiveness in 2nd round, decreasing linearly to 0% in round 102).

Bart, if you're not happy with that method (or even if you are!) feel free to make another entry.

Everyone else:  Start coming up with entries!  The more we have, the more fun/interesting it will be.  These need not be complicated (but can be if you like).  Simple strategies are interesting too.
Rose
player, 13 posts
Wed 28 May 2008
at 21:47
  • msg #8

Re: A prisoner's Dilemma competition

Well, how can I not be in?

I've always played it in class too.
Tycho
GM, 1425 posts
Thu 29 May 2008
at 10:21
  • msg #9

Re: A prisoner's Dilemma competition

Cool, thanks Rose!

Still hoping for more entries, though.
This message was last edited by the GM at 10:25, Thu 29 May 2008.
Rose
player, 14 posts
Thu 29 May 2008
at 21:15
  • msg #10

Re: A prisoner's Dilemma competition

PM
Tycho
GM, 1427 posts
Fri 30 May 2008
at 09:35
  • msg #11

Re: A prisoner's Dilemma competition

PM
Rose
player, 16 posts
Fri 30 May 2008
at 21:10
  • msg #12

Re: A prisoner's Dilemma competition

PM
Tycho
GM, 1429 posts
Mon 2 Jun 2008
at 10:28
  • msg #13

Re: A prisoner's Dilemma competition

Time for the results of the first prisoner's dilemma competition!  Many thanks to those who submitted strategies.  A few more would have been nice, but we got enough to have a good go of it, and if people are more interested after this, we can have another one.

First I'll introduce all the strategies that were used in the competition.  There were 5 submitted by me (4 'standard' strategies, and one non-standard), and three others submitted by you guys, for a total of 8 strategies competing with one another.  In no particular order (or, rather, the order they happen to have been written into my code), they are:

The monkey:
  This is one of the 4 'standard' strategies I added.  I makes it's choice each round completely randomly, with a 50-50 chance of each option

The saint:
  Another of the 4 'standard' strategies I added.  This one picks B (cooperate) every round, no matter what.

The rat:
  The third of the 4 'standard' strategies I used.  This one picks A (defect) every round, no matter what.

tit4tat:
  The fourth standard stragey.  It picks B (cooperate) in the first round, and in every round does whatever the opponent did the round before.  In other words, if the opponent cooperated last round, tit4tat cooperates this round.

niceguy:
  This was my non-standard entry, or what I would have submitted if someone else were running it.  Similar to tit4tat, it picks B (cooperate) the first 2 rounds, and in every other round, cooperates if the opponent has cooperated in either of the previos 2 rounds.

opposite:
  This was submitted by katisara.  It cooperates in the first round, and in all other rounds does the opposite of what the opponent did last round.  So if the opponent cooperated last round, this strategy will not defect this round.

forgiver:
  Submitted by Bart, this is similar to the tit4tat strategy, except that in any round when it would normally pick A (defect), there is a chance it will instead cooperate.  This chance starts at 5% in the 2nd round, and decreases linearly to 0% at turn 102.

rememberer:
  Submitted by Rose, this strategy picks B (cooperate) in the first 2 rounds, then plays standard tit4tat until round 12.  At that point, the strategy will cooperate if the opponent has cooperated in all of the previous 10 rounds, otherwise, it defects.


All that strategies played between 100 and 200 games with each of the other strategies (but not against itself), and scored points based on the results.  The total score was divided by the number of games played, to get an average score per game for each strategy (this was done so that strategies that ended up playing more games could be accurately compared to those that had played fewer games).  The results were as follows:

tit4tat:     2.5428
opposite:    2.4741
rememberer:  2.4290
forgiver:    2.4143
niceguy:     2.3864
monkey:      2.3363
rat:         2.3304
saint:       1.9231

Tit4tat wins, and a number of other strategies are fairly close below it.  The saint strategy does quite poorly.  Of the player-submitted strategies, katisara's opposite did the best.  Of particular interest, the rat strategy did rather poorly (this point was the original motivation for the contest--Mr. Crinkles take notice!), scorely about the same as the purely randome 'monkey' strategy.

Since the code was all written, and playing around with it didn't take much time, I figured I'd try a few more things out.  For the next round, I let the strategies play against themselves as well.  The original reason for not allowing this was to prevent players from submitting sacrificial strategies which would make another of their strategies perform better.  Since no one submitted these kinds of team strategies, the rule was no longer needed.  The results of that competition were:

remember:    2.5839
forgiver:    2.5630
tit4tat:     2.5113
niceguy:     2.4914
monkey:      2.3810
opposite:    2.3788
rat:         2.3687
saint:       2.0182

In this round, strategies that did well against themselves got a little extra boost.  This time, Rose's rememberer strategy achieved a very impressive score, and even managed to beat tit4tat!  Bart's forgiver strategy came in a close second, and also beat tit4tat.  Both of these are 'nice' strategies (as are tit4tat, niceguy, and saint) in that they don't defect before the opponent does, but interestingly, are based on somewhat opposite concepts.  Rose's remember has a long memory, and punishes any defects in the past 10 moves with defection.  Conversely, Bart's forgiver has a short (1 move) memory, and even makes it shorter by randomly forgiving past defections some of the time.

Since there was a random component to the results (due to random number of games played, and the very random nature of the monkey strategy, and to a lesser extend of the forgiver strategy), I thought I should repeat the competition a few more times to see if the results were consitant.  Three more rounds gave these results:

remember:    2.5392  2.5269  2.5518
tit4tat:     2.5061  2.5259  2.5481
forgiver:    2.5319  2.5051  2.5066
niceguy:     2.3833  2.4906  2.4257
opposite:    2.3843  2.2710  2.3919
monkey:      2.3612  2.3742  2.3612
rat:         2.2446  2.3532  2.1837
saint:       1.9742  2.0920  2.1374

Things seemed pretty consistent, though in repeated trials tit4tat came out slightly ahead of the forgiver strategy 2 of 3 times, and the monkey strategy managed to beat the opposite strategy in one of 3 trials.  Rose's rememberer strategy did continue to beat tit4tat consistantly, though, which is quite impressive.  Of note, all of the top 4 entries were 'nice' strategies, and all but one of the bottom 4 were not (however, the very lowest, 'saint', was a 'nice' strategy).

To make things even more intersting, I decided to run a series of competetitions with a natural selection angle to it.  I started with a 'population' of 40 strategies, consisting of 5 of each of the strategies we've seen so far.  After each competition, I increased the number of strategies which had the best score by 1, and decreased the number of strategies which had the worst score by 1.  In other words if the best scores were obtained by the 'monkey' strategies, I would add one more of them to the 'population', and if the worst scores were obtained by 'niceguy' I'd removed one of their members from the population.  Eventually, some groups would die out, and others would come to dominate.  Here's how the population changed over time:

monkey   5 5 5 5 5 5 5 5 5  5  5  5  5  4  3  3  2  1  0
saint    5 4 3 2 2 2 2 2 2  2  2  2  2  2  2  2  2  2  2
rat      5 5 5 5 4 3 2 1 0  0  0  0  0  0  0  0  0  0  0
tit4tat  5 6 6 6 7 7 7 8 9 10 10 11 12 12 12 13 14 15 16
niceguy  5 5 5 5 5 5 5 5 5  5  5  5  5  5  5  5  5  5  5
opposite 5 5 5 5 5 5 5 5 5  4  3  2  1  1  1  0  0  0  0
forgiver 5 5 5 5 5 5 5 5 5  5  5  5  5  5  5  5  5  5  5
remember 5 5 6 7 7 8 9 9 9  9 10 10 10 11 12 12 12 12 12
At this point, all remaining strategies were 'nice' and thus every game consisted of both sides picking B, and every strategy had the same average score of 3 points per game, and there was no further change in the population.

Throughout the game, the top scores were very similar, and it was mostly an issue of random chance whether tit4tat or rememberer did the best in a given round.  Forgiver was usually quite close as well.  Early on, saint did poorly, and it's population dropped rapidly, but it did not go extinct.  As more 'nice' strategies took over the population, rat had a harder and harder time of it, and soon drove itself to extinction (it also suffered from the lower population of saints, from which it derived most of its points).  After this, monkey and opposite started to suffer, as the 'nice' strategies found more and more cooperative players.  In the end, only 'nice' strategies remained.


Okay, that's probably enough for the first go around.  Hopefully you guys found it interesting and entertaining.  If people are interested in having another one, just let me know.  The codes are all written, so the 'work' is done, and it's now simple to run competitions.  Changing the rules to try different concepts is pretty straight forward, so it need not be as basic as this one was.  Let me know what you guys think!
katisara
GM, 2966 posts
Conservative human
Antagonist
Mon 2 Jun 2008
at 12:47
  • msg #14

Re: A prisoner's Dilemma competition

Wow, very interesting.  Thanks for putting the time in on this!
Tycho
GM, 1430 posts
Mon 2 Jun 2008
at 13:10
  • msg #15

Re: A prisoner's Dilemma competition

No problem, glad you enjoyed it.  It was actually rather fun to code up, since the code I write day to day is much more number-crunching focused, and much more of a pain to debug/test, etc.  And seeing how it all played out was very interesting too.  To be honest, I didn't think Rose's strategy would do all that well, since it seemed likely to 'over punish' compared to tit4tat.  But since it cooperated with all the nice strategies, and then pretty much didn't cooperate at all with any of the 'not-so-nice' ones (monkey and opposite in particular), it cut its loses against those very nicely.
Rose
player, 17 posts
Mon 2 Jun 2008
at 22:31
  • msg #16

Re: A prisoner's Dilemma competition

Thanks very much for coding it up, Tycho. The results were really interesting. On a personal note, I liked it lots and who says 'nice girls don't win' *wink*
Tycho
GM, 1455 posts
Tue 10 Jun 2008
at 09:50
  • msg #17

Re: A prisoner's Dilemma competition

Just thought I'd check to see if, after having seen how it works, people would be interested in doing another of these?  Now that I've got all the codes written up, it's pretty simple to run more tests.  We could change the rules a bit (allow multiple, cooperative entries perhaps?), or leave them as they are.  It'd be purely for entertainment value, rather than to prove any point (though feel free to try to prove any points, if you like!).  Anyone think they can beat Rose's rememberer strategy?  Does anyone think they can come up with a "not-nice" strategy that can win in the long run?
Bart
player, 291 posts
LDS
Wed 11 Jun 2008
at 23:12
  • msg #18

Re: A prisoner's Dilemma competition

How about a tit4tat that, instead of starting with a cooperation, starts with a defection?
Rose
player, 19 posts
Thu 12 Jun 2008
at 20:50
  • msg #19

Re: A prisoner's Dilemma competition

Statistically, tit for tat is always going to do well. It's just built that way for prisoner's dilemma. The real trick would be finding a new twist that was strong. (Without using sacrifical lambs that is)
katisara
GM, 3027 posts
Conservative human
Antagonist
Fri 13 Jun 2008
at 14:42
  • msg #20

Re: A prisoner's Dilemma competition

Or alternatively, since we all already know the 'answer' to Prisoner's dilemma, create a different situation with different variables (maybe something where it's competitions between three players at a time instead of two) and see how that changes things.
Rose
player, 20 posts
Mon 16 Jun 2008
at 20:21
  • msg #21

Re: A prisoner's Dilemma competition

That sounds like fun, tweak the game up a bit. I'd be happy to play.
Tycho
GM, 1478 posts
Thu 19 Jun 2008
at 10:53
  • msg #22

Re: A prisoner's Dilemma competition

I'm up for it, if someone comes up with the rules for a 3 player version.
Sciencemile
player, 158 posts
Opinion is the default
for most everything I say
Sat 21 Jun 2008
at 22:28
  • msg #23

Re: A prisoner's Dilemma competition

There is currently a "Test" similar to this in a online game I play, and it works like this:

There is an establishment known as a Bureaucracy; The Leader recruits 3 managers, who in turn recruit 3 foremen, who in turn recruit 3 initiates.  Each member recieves 1 point plus another point for every member they recruited.

 1 Leaders      4 points each Round
 3 Managers     4 points each Round
 9 Foremen      4 points each Round
27 Initiates    1 points each Round


The Key to passing the test is to either accumulate enough points to pass, or for your Bureaucracy to pass.

For you to pass, you must accumulate 500 points.
For the Bureaucracy to pass, it must accumulate 1,500 points.

On any round, any member of the Bureaucracy may choose to "Seize Power", making him the new leader, kicking out anyone above him and stealing the points that they have accumulated.
katisara
GM, 3060 posts
Conservative human
Antagonist
Sun 22 Jun 2008
at 00:22
  • msg #24

Re: A prisoner's Dilemma competition

Is there any penalty to siezing power?  I don't understand why people wouldn't just do it every round.  Or is it that you only get points for the people you personally recruited, and not for anyone anyone else below you recruited?
Sciencemile
player, 159 posts
Opinion is the default
for most everything I say
Sun 22 Jun 2008
at 10:17
  • msg #25

Re: A prisoner's Dilemma competition

There is, at least in the game; Seizing power (aside from making everyone in the game shun you), would result in you being unable to enter any further Bureaucracies, thus ending in a failure should you be unable to win with the siezure.

Say I am a Foreman:  by Seizing Power, I displace all people above me, taking their points.  However, if an Initiate (who is now a Manager, since I am the Leader), can in turn do a seize and take my points as well.  I gain no points by seizing the Bureaucracy if I am the leader, since I would not be kicking anyone out.

Thus, the Leader's primary goal is to attain a Bureaucracy Pass, and as the line of succession goes down the pyramid, the temptation to attempt a quick, Personal win is larger.
katisara
GM, 3064 posts
Conservative human
Antagonist
Sun 22 Jun 2008
at 10:52
  • msg #26

Re: A prisoner's Dilemma competition

Is there a limit to the resource pool?  You said you need 500 points to win, but we only have like 3 people playing, so that would be a cap of around 12 points.
Sciencemile
player, 161 posts
Opinion is the default
for most everything I say
Sun 22 Jun 2008
at 11:23
  • msg #27

Re: A prisoner's Dilemma competition

The time limit would be three weeks with maximum players and one Bureaucracy, though the time can be changed depending on how long you'd like the game to be, each day representing a round.  Scores are calculated every Sunday, either individuals or Bureaucracies passing if they meet the point requirement.  Usually, more players can individually pass than Bureaucracies can Bureaucracy pass (but Bureaucracies can contain a larger number of people, thus guaranteeing more wins on the whole)

As a Forum Game, this would mean that:

1.) Each Day, each person's scores would be added to according to their position.

2.)Each Separate Thread would represent a different Bureaucracy

3.)A leader can control who he recruits as his managers, but his managers are not (by game laws) restricted from recruiting who they want.

4.) A player who has seized power may choose to maintain the Bureaucracy, or hand it over to someone else, retaining their points while denying anyone from seizing from them in additional turns.

5.) A player without a Bureaucracy may be recruited by any Bureaucracy, his position determined by who recruits him.
___________________________________
Bart
player, 305 posts
LDS
Mon 23 Jun 2008
at 04:31
  • msg #28

Re: A prisoner's Dilemma competition

So, two people can work together to definitely win and split the pot between them.

The Beaurocracy is going along and the leader is at 490 points or so.  The first doublecrosser joins the group, siezes leadership, then recruits his cohort.

One more round passes and the new leader gains 500 points, making him the winner.  He retires with his winnings, possibly splitting them with the cohort.  Why have the cohort at all?  Because, on that last turn, if somebody else siezes the day to steal all 500 points and make them the winner, the cohort can turn around and sieze the day back, making certain that the group is the winner.

In any case, the prime strategy would seem to be to either wait until the last moment and get yourself hired on as the bottom guy, then sieze the day, or find yourself a partner who agrees to never hire anyone himself, thus ensuring that he's the bottom guy on his line.
Tycho
GM, 3491 posts
Tue 15 Nov 2011
at 18:45
  • msg #29

Re: A prisoner's Dilemma competition

Link to article

Saw the above article today, and thought it might interest people.  It's by some ethics professors who have run ethical/game-theory scenarios for their ethics classes and have noticed a pretty major shift on how students "play" in these games very recently.  The games would basically offer people the choice to play cooperatively (everyone gets a benefit), or selfishly (one player gets a big payout, but at the expense of other players), and their grade would be linked to the results.  In the past many people would tend to play selfishly, making the competitive option non-viable.  More recently they're finding that students are going for the cooperative strategy, working together because they view it as more ethical.  They at first thought it was a fluke event, but then tested it at different universities, and even online where people can't communicate face-to-face, expecting the "old" results to come out again, but the same cooperative strategies still were more common.  The author views this as a cultural shift brought about in part by the financial collapse (ie, people are less likely to buy into the "every man for themselves" or "greed is good" mindset now than they were back when people were making killings in internet or housing bubbles), and then goes on to suggest that the occupy movement is a further reflection of that shift towards more collective mindsets.  I don't think the article gives enough info to really judge the hypothesis one way or the other, but it's certainly interesting.  What do you guys think?  Anything to it, or is the author reading too much into a classroom experiment with students?  (In grad school I once went to a talk where the speaker had used students as test subjects and justified this by saying that "to a decent first approximation, students behave like humans").
Sign In