<commit_before># Prisoner's Dilemma (in PHP)

To satisfy my own curiosity, I coded an Iterated Prisoner's Dilemma in PHP. I programmed over a dozen different strategies, and pitted them against one another.

## Example Usage

Here's the simplest example usage:
```php
<?php

  	require_once(APPPATH . '/libraries/prisoners_dilemma.php');

		$prisoners_dilemma = new Prisoners_dilemma();
    
    $info = $prisoners_dilemma->run(25000, 20);

  	die(print_r($info));

?>
```

The result should look something like this:
<commit_msg>Update master<commit_after># Prisoner's Dilemma (in PHP)

To satisfy my own curiosity, I coded an Iterated Prisoner's Dilemma in PHP. I programmed over a dozen different strategies, and pitted them against one another.

## Example Usage

Here's the simplest example usage:
```php
<?php

  	require_once(APPPATH . '/libraries/prisoners_dilemma.php');

	$prisoners_dilemma = new Prisoners_dilemma();
    
	$info = $prisoners_dilemma->run(25000, 20);

	die(print_r($info));

?>
```

The result should look something like this:

{'fraction_non_alphanumeric': 0.1062618595825427, 'fraction_numerical': 0.013282732447817837, 'mean_word_length': 4.733695652173913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '434953', 'n_tokens_mistral': 378, 'n_tokens_neox': 336, 'n_words': 113}