mirror of
https://github.com/taxicomics/PrisonersDilemma.git
synced 2026-08-26 23:44:25 +02:00
commit with optional input parameters
This commit is contained in:
@@ -35,4 +35,19 @@ def random_positive_leaner(game_data,player_nr):
|
||||
if random.randint(0,10)<6:
|
||||
choice=True
|
||||
#your cool code ended here
|
||||
return choice
|
||||
|
||||
def i_hate_certain_numbers(game_data,player_nr):
|
||||
opponent_nr=1-player_nr
|
||||
hated_numbers=[7,13,17,23]
|
||||
#for ease of use this is index of the opponents value
|
||||
choice=True
|
||||
#this function should return either true(coorperate) or false(defect)
|
||||
|
||||
#your cool code goes here
|
||||
round_nr=len(game_data)
|
||||
if round_nr in hated_numbers:
|
||||
choice=False
|
||||
|
||||
#your cool code ended here
|
||||
return choice
|
||||
Reference in New Issue
Block a user