Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Basic prisoner's dilemma?

Reply
Thread Tools

Basic prisoner's dilemma?

 
 
Daniele Futtorovic
Guest
Posts: n/a
 
      04-18-2011
On 18/04/2011 22:33, Lew allegedly wrote:
> As a matter of good habit, I also suggest using interface-typed
> parameters to the method, but that is not germane to the point of
> your example.


I hesitated to make it a Queue to better prove the point.


> Inevitably my mind starts spinning coder fantasies even on these toy
> examples:


So does mine on similar occasions, but on this here matter that would be
missing the important point, which is the model the prisoner's dilemma
represents as well as what's an evolutionary stable strategy. I didn't
modify the original code to make it cleaner, like using an enum value as
the return and interface types, because I'd daresay it's more important
to understand what's behind the prisoner's dilemma than knowing how to code.

> - "What if we keep a rolling buffer of choices of size N rather than
> recording all history?"


Not necessarily. It would limit strategies if they couldn't look back as
far as they wanted, for the sake of algorithmic efficiency, which isn't
the point here at all.

> - "What if there were a third response possible (thus more reason to
> use an enum), say, 'PREVARICATE'?"


No. There are variants of the prisoner's dilemma, in different settings.
What's important is that the choice be to cooperate or not, that it be
a non-zero-sum game, and that the length of the game be not known.


> - "What would that even mean?"


> - "What if the choices were more like Rock-Paper-Scissors?"


That's a zero-sum game.

> - "What is the reward / cost for each combination of choices?"


Factors may vary. Different weighing will slightly affect how quickly an
evolutionary stable strategy emerges. One and I believe the canonical
example is:
Both cooperate: both get three
One betrays: betrayer gets five, betrayed gets naught.
None cooperates: both get one

> - "What if that reward / cost increased or decreased with k, the
> number of game rounds played so far?"


It's important that the "passes" be interchangeable, non-ordered (if you
see what I mean).

> - "What is the terminating condition of the game?"


There must be none. If you're ever in a prisoner's dilemma kind of
situation, and know that there are only a limited number of passes left,
there is only one viable strategy: betray.

--
DF.
An escaped convict once said to me:
"Alcatraz is the place to be"
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      04-18-2011
ODaniele Futtorovic wrote:
> Lew allegedly wrote:
>> - "What is the terminating condition of the game?"


> There must be none. If you're ever in a prisoner's dilemma kind of
> situation, and know that there are only a limited number of passes left,
> there is only one viable strategy: betray.


Thank you for those informative answers, but the last one leaves me wondering
still about the terminating condition of the game. Obviously if there's a
payout (3/3, 5/0, 1/1), there must be an ending. What you've described is
that the players cannot know when that ending will occur, but surely it must
still eventually occur?

So one of the terminating conditions, or attributes of those conditions, is
player ignorance. What are the rest?

This time I don't ask that you feel obligated to answer this question - I will
certainly do the research. I am deeply grateful that you answered the other
questions - your answers were focused and helpful. But I had asked them
primarily to indicate the kinds of questions one might ask, whatever their
answers, and like the one I ask in this post, answers lead in turn to even
more questions.

For example, and I just offer it as an example and not something one is
required to answer just now, what is the effect of changing the payouts? What
if partial information were leaked to the prisoner's about release times, but
the prisoner has to guess how valid that information is? What if the
information about the other prisoner's responses is distorted, as happens in
real-life prisoner situations?

And I remain curious about game choices other than COOPERATE or BETRAY.

I plan to read up on all this now that the forum has sparked my interest.

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedi.../c/cf/Friz.jpg
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      04-18-2011
On 4/18/2011 3:37 PM, Lew wrote:
> ODaniele Futtorovic wrote:
>> Lew allegedly wrote:
>>> - "What is the terminating condition of the game?"

>
>> There must be none. If you're ever in a prisoner's dilemma kind of
>> situation, and know that there are only a limited number of passes left,
>> there is only one viable strategy: betray.

>
> Thank you for those informative answers, but the last one leaves me
> wondering still about the terminating condition of the game. Obviously
> if there's a payout (3/3, 5/0, 1/1), there must be an ending.



The payout in a traditional prisoner's dilemma is 2.5 years in jail if
the prisoner betrays, and 5.25 years in prison if he doesn't. That's
assuming equal chances of his partner in crime choosing to betray or not.

It's 0 years if he betrays and his partner doesn't, or 5 years each if
they both betray. Average: 2.5.

It's 6 months if neither betrays, or 10 years if only his partner does.
Average: 5.25.


> What
> you've described is that the players cannot know when that ending will
> occur, but surely it must still eventually occur?


The trick is knowing that there are no rounds left. If you know that,
then the best strategy at the last round is to betray, because there's
no way your partner can retaliate. However, if you and your partner
both know when the last round is, then you'll both betray.

But if you know that you'll both betray on the last round, then there's
no incentive to cooperate on the n-1 round. So betray on that round
too. And then for the n-2 round, and the n-3 round, etc. Until you
might as well betray on all of them.


> So one of the terminating conditions, or attributes of those conditions,
> is player ignorance. What are the rest?



It's knowing when the rounds terminate that makes the difference.
Normally, the prisoners don't know how many rounds they'll go through.
But the rounds do terminate, usually after a fixed number of iterations.
But the prisoners don't know, it's "blind," someone else makes that
determination.


> And I remain curious about game choices other than COOPERATE or BETRAY.
>
> I plan to read up on all this now that the forum has sparked my interest.
>


The Wikipedia article is pretty good.

 
Reply With Quote
 
Michael Wojcik
Guest
Posts: n/a
 
      04-19-2011
Daniele Futtorovic wrote:
>
> If you're interested in the topic apart from the programming aspect, I
> *very* strongly suggest you read Dawkins' "Selfish Gene" and "Blind
> Watchmaker". Even if you're not, by the way -- those are IMHO must-reads.


Another nice work on the subject, particularly for someone with just a
casual interest who's looking for a light treatment, is William
Poundstone's _Prisoner's Dilemma_, which combines an introduction to
and history of game theory with biographical anecdotes about von
Neumann, Nash, and others.

--
Michael Wojcik
Micro Focus
Rhetoric & Writing, Michigan State University
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TurboTax Basic vs. Taxcut Basic? Sharp Dressed Man Computer Support 1 01-12-2009 12:52 PM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Re: Python interpreter in Basic or a Python-2-Basic translator. rrr@ronadam.com Python 0 05-02-2005 01:48 PM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments