Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3117

Re: Basic prisoner's dilemma?

From Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Basic prisoner's dilemma?
Date 2011-04-18 23:50 +0200
Organization A noiseless patient Spider
Message-ID <ioibmv$ie9$1@dont-email.me> (permalink)
References <d97822e4-ee7c-458d-8818-07007fb714e8@k3g2000prl.googlegroups.com> <iohs19$f1g$1@dont-email.me> <iohsn8$hri$1@news.albasani.net> <ioi390$90n$1@dont-email.me> <ioi771$d8u$1@news.albasani.net>

Show all headers | View raw


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"

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Basic prisoner's dilemma? theglazeb <theglazeb@gmail.com> - 2011-04-17 19:51 -0700
  Re: Basic prisoner's dilemma? Lew <noone@lewscanon.com> - 2011-04-17 23:15 -0400
    Re: Basic prisoner's dilemma? Esmond Pitt <esmond.pitt@bigpond.com> - 2011-04-18 13:54 +1000
      Re: Basic prisoner's dilemma? theglazeb <theglazeb@gmail.com> - 2011-04-17 22:08 -0700
        Re: Basic prisoner's dilemma? Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-04-17 23:47 -0700
        Re: Basic prisoner's dilemma? markspace <-@.> - 2011-04-18 00:14 -0700
  Re: Basic prisoner's dilemma? rossum <rossum48@coldmail.com> - 2011-04-18 13:01 +0100
  Re: Basic prisoner's dilemma? Bent C Dalager <bcd@pvv.ntnu.no> - 2011-04-18 13:38 +0000
  Re: Basic prisoner's dilemma? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-18 19:22 +0200
    Re: Basic prisoner's dilemma? Lew <noone@lewscanon.com> - 2011-04-18 13:34 -0400
      Re: Basic prisoner's dilemma? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-18 21:26 +0200
        Re: Basic prisoner's dilemma? Lew <noone@lewscanon.com> - 2011-04-18 16:33 -0400
          Re: Basic prisoner's dilemma? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-04-18 23:50 +0200
            Re: Basic prisoner's dilemma? Lew <noone@lewscanon.com> - 2011-04-18 18:37 -0400
              Re: Basic prisoner's dilemma? markspace <-@.> - 2011-04-18 15:51 -0700
    Re: Basic prisoner's dilemma? Michael Wojcik <mwojcik@newsguy.com> - 2011-04-19 16:14 -0400

csiph-web