/PrisonersDilemma

Let's see if Cooperation is an Evolutionary End-State, via The Prisoner's Dilemma and Genetic Algos!

Primary LanguagePHPMIT LicenseMIT

Prisoner's Dilemma Project

TravisCI Maintainability Test Coverage

The Prisoner's Dilemma Project is meant to see if evolutionary pressures alone are enough to arrive at an optimal solution to this age old philosophical thought experiment.

It uses the PHP Evolver genetic algorithm framework.

Installation

Via Composer

composer create-project hopeseekr/prisoners-dilemma

Usage

# Play the classic Prisoner's Dilemma yourself against a completely irrational opponent.
./dilemma play

# Run the Genetic Algorithm to see how Nature would evolve a strategy, assuming everyone is *purely* rational.
./dilemma evolve:classic

image

Testing

No tests have been created. I'm very open to contributions.

phpunit --testdox

Contributors

Theodore R. Smith theodore@phpexperts.pro
GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
CEO: PHP Experts, Inc.

License

MIT license. Please see the license file for more information.