### Re: Genetic algorithm, prisonner's dille

```Aren't you game writers required to take some Game Theory classes?

There is a a good explanation of it provided in the file.

The Prisoner's Dilemma involves two players (prisoners). They have an option
to squeal on the other. If both remain silent, they both go free. If only
one talks, that one goes free and the other goes to jail. If both talk, both
go to jail. The grid looks something like this:

P1 talks      P1s silent
+---------------------------
P2 Talks   | {win,lose}    {lose, win}
P2 Silent  | {win,lose}    {win, win}

The tuple is {P1 result, P2 result}.  Classically, values for {win, lose}
are {1,0}, but other values will bring other results.

What's a prisoner to do? Should they trust the other, or not?

If the each player assumes that the other is a 'rational' player, and
assumes that they have the same values in the grid, they will both realize
that the optimal move is for both to remain silent, giving a win/win
situation.

As far as genetic algorithms are concerned, this is an easy problem to
represent, since you easily represent the total state space in 2 cells for
each player's reaction. You can either breed 2 seperate populations of
prisoners and compete them against each other, or the same population and
give them a state space of 4.

With it's ability to slice and splice, Euphoria is especially suited to
working with genetic algorithms. It sure beats building the strings with
BASIC's MID\$.

-- David Cuny
```