Skip to content

Latest commit

 

History

History
154 lines (140 loc) · 12.4 KB

File metadata and controls

154 lines (140 loc) · 12.4 KB
______     _                           _     
| ___ \   (_)                         ( )    
| |_/ / __ _ ___  ___  _ __   ___ _ __|/ ___
|  __/ '__| / __|/ _ \| '_ \ / _ \ '__| / __|
| |  | |  | \__ \ (_) | | | |  __/ |    \__ \
\_|  |_|  |_|___/\___/|_| |_|\___|_|    |___/
_____  _ _                                   
|  _ \(_) |                                  
| | | |_| | ___ _ __ ___  _ __ ___   __ _    
| | | | | |/ _ \ '_ ` _ \| '_ ` _ \ / _` |   
| |/ /| | |  __/ | | | | | | | | | | (_| |   
|___/ |_|_|\___|_| |_| |_|_| |_| |_|\__,_|   

PrisonersDilemmaSWHS

Official Rules (Monty Python edition):

The classic version of the official rules featuring Monty Python jokes. "And now for something completely different..."

To participate in the Prisoner's Dilemma competition, you must contribute a Python module. Modules for the competition will be placed together in a project sub directory named "tournament". During the competition, the program will run with the parameters "-d tournament".

.\iterated-dilemma.py -d tournament

See the README file for more information on running a Prisoners Dilemma Tournament.

RULES:

1.

Thy program shalt collude or betray. Thou shalt return "c" or "b", no more, no less. "c" or "b" shall be the answers thou shalt return, and the answers of thy program shall be "c" or "b". "a" shalt thou not return, nor either answer thou "d", excepting that thou then proceed to "c" or "b". "e" is right out! Once the answer "c" or "b", being collusion or betrayal, be chosen, then returnest thou thy answer towards thy foe.

2.

While thy enemy may be naughty in thy sight, Thou must not tempt thy enemy to stray. Therefore thy program must not manipulate thy opponents response, or any score values.

3.

You or your program may not make changes to the competition code, as it represents the violence inherent in the system. You've got it right, you're being repressed.

4.

You or your program may not make changes your competitors code. (Nobody expects the Spanish Inquisition!)

5.

You or your program may not add code or files which remain outside of the "tournament" directory after the program has completed. (No spam!)

6.

One person is allowed only one entry file, and you may not add players that do not represent people. (The person administering your tournament may add players, such as the examplemodules.)

7.

You may not change the interpretation of "c" or "b" during the competition or add additional acceptable answers. Strange people on the internet, distributing letters, is no basis for a system of government!

  _________________________
     ||   ||     ||   ||
     ||   ||, , ,||   ||
     ||  (||/|/(\||/  ||
     ||  ||| _'_`|||  ||
     ||   || o o ||   ||
     ||  (||  - `||)  ||
     ||   ||  =  ||   ||
 SoS ||   ||\___/||   ||
     ||___||) , (||___||
    /||---||-\_/-||---||\
   / ||--_||_____||_--|| \
  (_(||)-| S123-45 |-(||)_)

To Compete using GitHub:

  1. Using Git, make a Branch of this Prisoners Dilemma repository.
  2. On your Branch, create your Module in the 'tournament' directory.
  3. When your Module is complete, Commit your final changes to your branch.
  4. On your Branch Update from Default Branch.
  5. Create a Pull Request to have your Branch merged to your tournament's master repository.

Good luck

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&
#########%%%%%%%%###########&%%%%%%%###########%%%%%%%%###########%%%%%%%%###########%%%%%%%%############%%%%%%%###########%%%%%%%############%%%%%%%%#########
((((((((((((#%#((((((((((((((((#%%((((((((((((((((#%#(((((((((((((((#(&((((((((((((((((##(((((((((((((((((#(&((((((((((((((((##&((((((((((((((((#(&((((((((((((
&&&&&&&&&&&%@&&&&&&&&%#(//*//#%%@@/*/(#%&&&&&&&%@&&&&&&&&&&&&&&&&&(&&&&&&&&&&&&&&&&&&&&@#%&&&&&&&&&&&&&&&&@(&&&&&&&&&%#(//**/(#&@@%*//(%&&&&&&&&@(&&&&&&&&&&&&&
&&&&&&&&&&&%@&&(/******,,,,%@#%#@(.,.,,,*/(#&&&%&&&&&&@&&&&&&&&&&&(&&&&&&&&&&&&&&&&&&&&@#%&&&&&&&&&&&&&&&&&&@(&&/////**,,,,*@@#&@@.,..,,*//(&&&&@(&&&&&&&@&&&&&
&&&&&&&&&&&%%(/,,,,,..,*((((/#%(,,,,,,..,,,,,.,,#%*...,,*%&&&&&&&&(&&&&&&&&&&&&&&&&&&&&@#&&&&&&&&&&&&&&&&&@(&(/,,,,,,.,*/(#(/(#&,,,,,.....,,,.,,/(&.....*/&&&&&
&&&&&&&/&@#%&@@&(*,,,,,,,,,,,#%(,,,,,,,,,,,,,,,,#%*,,,,*/&&&&&&&&&(&&&&%&%&&%&&&%&&&&&&%&%&&&&&&&&&&&&%&%/(@&(&@@/,,.,,,,,,,,/#&,,,,,,,,,,,,,,,,/(&.,,,,/&&&&&&
&&&&&%****(/#%/,,,,,,,,,,,,,. .#%(,,,,,,,,,,%,,,,,#%*,,,,/#///////(##(&(//////(%#//////###(//////(/#//**/(/(&,,,,,,,,,,,,,.  /#&,,,,,,,,,,*(,,,,/(&,,,,*/&&&&&&
&&&&/(/,.,,.#%/,,,,,,,,,.     ,#%(,,,,,,,,,.@@,..%#%@,,.,*/........#*(&.......*%*......*#%*#......//(,.,,,*(&,,,,,,,,,.     ,/#&,,,,,,,,,,#@#,,#@(&(.,,/#&&&&&&
&&/.,.,,,,,.#%/,,,,,,,,. .   .,#%(,,,,,,,,,*@**@@@#%*.,.*/,........#*(&.......*%*......*#&*#...*(,,,,,.,,,*(&,,,,,,,,, .   ../#&,,,,,,,,,,@#,&@@@(&.,,**%&&&&&&
,,,,,,,,,,,,#%/,,,,,,,,,. .,.  #%/.,,,,,,,,##%*,.,#%*,,**//........#*(&.......*%*......*#&*#./.,,,,,,,,,,.@(&,,,,,,,,,.  ,.  *#& ,,,,,,,,*/&(,.,/(&.,**/#&&&&&&
,,,,,,.,,,,,#%#,,,,,,,,,,  ,,,,#%(,,,,,,,,,,,/%@@@#%***,,*/,.......#*(&.......*%*......*#**#//,,,,,,..,,,.@(&,,,,,,,,,.  .,,,/#&,,,,,,,,,,,*#@@@#(&,**,//&&&&&&
*,,,,*@@@@#%(&*.,,,,,,,..,,,,#%(,,,,,,,.,,,,.,,,#%*,...,//,........#*(&.......*%*......*#&..(///*,,,,.@@@@@%((/,,,,,,,,..,,,,/#&,,,,,,,,,..,,,,,/(&.,,,,*/&&&&&
**,,,/@&/*#%#&*,,.,,,,,.,,,,,#%(,,..,,,,,,******#%/*******/........#*(&.......*%*......*#&*#//*/*,,,@@(**(&%/,,,,,,,,,..,,,.,/#&,,,.,,,,,,******((&******/#&&&&
#***,,,,,,,(#%/,,..,,,,,,,,,,*/#%%%%%##(*##########%#######(.......#*(&.......*%*......*#&*#..(//**,,,,,,,@(&,,,.,,,,,,,,,,,*##&%&&&./&&&&&&&&&&((&&&&&&&@@@@@@
@(****,,,,,(#%/,,,,,,*(%%#####%#%%###/****/########%%########......#*(&.......*%*......*#&*#...(*/**,,,,,,&(&,,,,,,*(%&&&&&&&&&&&(.....%&&&&&&&&((&&&&&&&&&@@@@
@%**,.,,,,,.#%/*(%%%#######/##%(%%#/********#######%%########/.....#*(&.......*%*......*#&*#...(*/,,,,,,,,*(&,(%&%&&&&&&%.&&&&&(........*&&&&&#,&(&&&&&&&&&@@@@
@(**,,,,,,/%#%%#(*#####(***#####%#************###/#%##########.....#*(&.......*%*......*#&*#...(//,,,,..,%@(&&/.(&&&&%...(&&&&............*&&,#%&(&&&&&&&&&&@@@
@%*/,*%%#####%((####/*****###//#%#**************/%#%//#########....#*(&.......*%*......*#&*#...(*/*,#&&&&&%(&,%&&%*.....*&&(./#&..............,%%(&./%&&&&&&&@@
@@%%####(***#%(******#@%******/#%#*******@@*******#%/******(#%%....#*(&.......*%*......*#&*#....#&&&&%/...,(&.......@@......./#&.......&@/......*(&......,(&&@@
//(/********#%(******%@&******/#%#*******@@/******#%/*********(*/,.#*(&.......*%*......*#&*#..*.(,........,(&......*@@......./#&.......@@#......*(&..........,.
//(*********#%(******/@/******/#%#*******&@*******#%/*********#*%/.#*(&.......*%*......*#&*#./.**.........*(&.......@%......./#&,......%@,....../(&.........,.#
(*/*******,,#%(,,*************/#%#**************,*#%/,,,******/*/,.#*(&.......*%*......*#&*#..*..*......,,*(&,,............../#&,.............,,/(&,,,......(.,
@@@%*****,,,#%(,,,***********#/(%#*//**********,,*#%/,,,*****(.....#*(&.......*%*......*#&*#.....,,....,,,*(&,,,...........#,/#&..*..........,,,/(&,,,,....*@@@
@@@@#****,,,#%(,,,***********(%#%#*************,,*#%/,,,****/......#*(&.......*%*......*#&*#....../,...,,,*(&,,,...........,###&.............,,,/(&,,,,...,@@@@
@@@@@%,***,,#%(,,*************/#%#****************#%/,,****(.......#*(&.......*%*......*#&*#.......*,...,,*(&,,............../#&,..............,/(&,,....,@@@@@
@@@@@@@*,***#%(***************/#%#********/%******#%/*****/........#*(&.......*%*......*#&*#........./,...*(&................/#&,........#,.....*(&....,#@@@@@@
@@@@@@@@@/,*#%(***************/#%#********/@%/****#%/*,*(..........#*(&.......*%*......*#&*#..........//,,*(&................/#&.........%%#....*(&.,,%@@@@@@@@
@@@@@@@@@@@/#%(***************/#%#*****#&(********#%/*(#(..........#*(&.......*%*......*#&*#........../%,(*(&................/#&,....*%/........*(&,%@@@@@@@@@@
@@@@@@@@@@@@#%(,,,************/#%#/*************,*#%,.,#(..........#*(&.......*%*......*#&*#........../%,.,(&,,,............./#&*,............,,/(&@@@@@@@@@@@@
@@@@@@@@@@@@#%@@@@(*,*,*******/#%#********,,,,/%#%,.,#(............#*(&.......*%*......*#&*#........../%,.,(&(%@#,,,,,,....../#&........,,,,,#@@@(&@@@@@@@@@@@@
@@@@@@@@@@@@#%@@@@@@@@@&%(**,,*#%(,,,**/(&@@@@@@#%,.,#(............#*(&.......*%*......*#&*#........../%,.,(&@@@@@@@%/*,,,,,,/#&,,,,,*(%@@@@@@@@@(&@@@@@@@@@@@@
@@@@@@@@@@@@#%@@@@@@@@@@@@@/***#%#***&@@@@@@@@@@#%,.,#(............#*(&.......*%*......*#&*#........../%,.,(&@@@@@@@@@@#,,,,,/#&,,,/@@@@@@@@@@@@@(&@@@@@@@@@@@@
@@@@@@@@@@@@#%@@@@@@@@@@@&****/#%#****#@@@@@@@@@#%,.,#(............#*(&.......*%*......*#&*#........../%,.,(&@@@@@@@@@*,,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@@@@@@@@@%**(&,  ,   .,,,,,,,//#&,,,,,@@/,./@@@,,/(&*#@@@@@@@@@@
@@@@@@@@@(*,#%/.. .,..,,,,,,,.*#%(,,,,,/@*,,,,,,,,#%**/@@@@@@@@@@@@@@(&@@@@@@@@@@@@@@@@@#%@@@@@@@@@@@@@#***(&,.  ,..,,,,,,,,//#&,,,,,,@/.,,,,.,,/(&,/#@@@@@@@@@
&***&,**(***(%/.,...   ,,,,,,.*#%(,,,,,.,,.,,,,,,,#%***#***(/*,*/@@(&@@@@@@@@@@@@@@@@@#%@@*./#,.,(.../,..#&,....   .,,,,,,//#&,,,,,,,,,,,,,.,,/((..,(..,&..,&
/***(***(***(%/,,,,,,,,,,,,,,.*#%(,,,,,,,,,,,,,,,,#%***(*******/***%@(&@@@@@@@@@@@@@@@@@#%@&...*...*...*...#&,,,,,,,,,,,,,,,//#&,,,,,,,,,,,,.,,,/((...*.../...*
/***(**/#(//*(/,,,,,,,,,,,,,,.*#%(,,,,,,,,,,,,,,,,#*//(#/******/***%@(&@@@@@@@@@@@@@@@@@#%@%...*...*..,/*,..(,,,,,,,,,,,,,,,//#&,,,,,,,,,,,,,,../*.,*/(.../...*
#/*/#*(*,*****#((((((((((((((((#%%(((((((((((((((((*****,(*#(**#(**#((&((((((((((((((((###..*(../#.*,,....*((((((((((((((((##&((((((((((((((((#.....,,*.#,.,#
%%%%%%%%&&%%%#%%%%%%%%%%%%%%&%%%%#%%%%%%%%%%%%%%#%%%%%%&%%%%%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%&%%%%%%%%%%%%%#%%%#&%%%%%%%%%%%%%%%%%%&%%%%%%%%%
 ---.----.__..----.----| _|_||___||___||___||___||___||___||_|_ |
    |        |    |    | -.-..---..---..---..---..---..---..-.- |--.-
 ---'--.-----'----'--.-|  | ||   ||   ||   ||   ||   ||   || |  | `|
       |:           (| |  | ||   ||   ||   ||   ||   ||   || |  |--'-
       |:.           | | _|_||___||___||___||___||___||___||_|_ |
 ------'----.-.,----.'-| -.-..---..---..---..---..---..---..-.- |-.--
        ,/) |       |  |  | ||   ||   ||   ||   ||   ||   || |  | |`
 ----.---8--'--.----'--|  | ||   ||   ||   ||   ||   ||   || |  | |
     |   8     |:      | _|_||___||___||___||___||___||___||_|_ |-'--
     | ,)//    |:.     | -.-..---..---..---..---..---..---..-.- |:.
 ----'-`=;'--.-'-.----.|  | ||   ||   ||   ||   ||   ||   || |  |--.-
       //   /_ _( \    |  | ||   ||   ||   ||   ||   ||   || |  | /|
 ---.-//----)/\,'_/----| _|_||___||___||___||___||___||___||_|_ | `|
    |/|     `;=.(      | -.-..---..---..---..---..---..---..-.- |--'-
 (  |`.`.   |`,-/      |,-'-||---||---||---||---||---||---||-'-.|
 -`-'-.`.`-.';'=`.-..--'-.--------.-------------.--.-------.----'--.-
      |  `-./.}{-'\.)    |        )             |   `)     |       \
      |    :`-}{-''||    |:.      |   ,_        |          |:.     |
 ---'`'-.--|`-}{-'||)----'-.------'--'.,`--.----'--------.-'-------'-
        |  :`-`'-'/)|      |               |:.           |
 -.-----'--;`.}{,`.||----,-'--------.------'---.--------,'--.,-------
  |:     ,'/.`..'_(/(    |:         |          |             \
  |:.  ,',' |`--`.('))   |:.        |          |             |:
 -'--,' <.._|__,. >`,----'----------'--------.,'-------------'----SSt
     ``----....(','
            _,'>'
            )/
            `'