-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_fixedmem.py
More file actions
30 lines (28 loc) · 1.23 KB
/
test_fixedmem.py
File metadata and controls
30 lines (28 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3
"""Test script to make sure the fixedmem player behave correctly"""
# All the "simpleplayers" can be implemented as depth 0 or 1 fixedmem players
from ast import literal_eval
from fixedmem import FixedMemPlayer, imp_simple_player
from tournament import Tournament
if __name__ == '__main__':
tourn = Tournament(rounds=8)
tourn.verbosity = 3
player = imp_simple_player('male', 'contrary')
tourn.add_player(player)
print('name {} hist_params {} action_params {}'.format(player.name, player.hist_params, player.action_params))
player = imp_simple_player('male', 'alt')
#tourn.add_player(player)
player = imp_simple_player('male', 'titfortat')
#tourn.add_player(player)
player = imp_simple_player('male', 'coop')
#tourn.add_player(player)
player = imp_simple_player('female', 'dom')
#tourn.add_player(player)
player = imp_simple_player('female', 'random')
#tourn.add_player(player)
player = imp_simple_player('female', 'random')
tourn.add_player(player)
player = imp_simple_player('female', 'coop')
#tourn.add_player(player)
print('name {} hist_params {} action_params {}'.format(player.name, player.hist_params, player.action_params))
tourn.resolve()