4D4850 / KotH-Floating-Dilemma

Floating Point Prisoners Dilemma. Includes undocumented features
GNU General Public License v3.0
0 stars 1 forks source link

Order of contestants has heavy influence on the outcome #5

Open agtoever opened 3 years ago

agtoever commented 3 years ago

The order of the contestants heavily influences the outcome of the simulation.

For example, these contesters:

contestants = [
    ("Cooperator", coop.strategy, coop.plan),
    ("Random Alternator", randalt.strategy, randalt.plan),
    ("Tit for Tat", tit_for_tat.strategy, tit_for_tat.plan)]

Give these results:

Cooperator, 70536.03394303459
Random Alternator, 80167.49738315983
Tit for Tat, 35023.28920166848

Conclusion: Tit for Tat is a clear loser. Now if I run this:

contestants = [
    ("Tit for Tat", tit_for_tat.strategy, tit_for_tat.plan),
    ("Cooperator", coop.strategy, coop.plan),
    ("Random Alternator", randalt.strategy, randalt.plan)]

I get the following results, there Tit for Tat is a winning (almost on par with Cooperator) and Random Alternator is a clear loser...

Tit for Tat, 70748.14924454261
Cooperator, 70135.536053608
Random Alternator, 40062.00788461829
agtoever commented 3 years ago

I wrote an alternative controller, which is more compact and also addresses both issues reported by me. Please see this repo.

A design choice I made (which works different from your implementation) is that after two contestants play their rounds, I assign 2 points to the winner or 1 point to each if they both play equal. This could be easily adjusted (see this line and the next one).