@@ -18,15 +18,36 @@ Installation
1818Usage
1919=====
2020
21- ::
21+ Running a match:
22+
23+ .. code-block :: python
24+
25+ >> > import axelrod_fortran as axlf
26+ >> > import axelrod as axl
27+ >> > p1 = axlf.Player(' k31r' )
28+ >> > p2 = axlf.Player(' k33r' )
29+ >> > match = axl.Match((p1, p2), turns = 5 )
30+ >> > match.play()
31+ [(C, C), (C, C), (C, D), (C, D), (C, C)]
32+
33+ Reproducing Axelrod's second tournament:
34+
35+ .. code-block :: python
36+
37+ import axelrod as axl
38+ from axelrod_fortran.strategies import characteristics
39+ from axelrod_fortran.player import Player
40+
41+ players = [Player(name) for name in characteristics.keys()
42+ if characteristics[name][" original_rank" ] is not None ]
43+
44+ print (len (players), " players" )
2245
23- >>> import axelrod_fortran as axlf
24- >>> import axelrod as axl
25- >>> p1 = axlf.Player('k31r')
26- >>> p2 = axlf.Player('k33r')
27- >>> match = axl.Match((p1, p2), turns=5)
28- >>> match.play()
29- [(C, C), (C, C), (C, D), (C, D), (C, C)]
46+ tournament = axl.Tournament(players, repetitions = 100 )
47+ results = tournament.play(processes = 4 )
48+ results.write_summary(' summary.csv' )
49+ plot = axl.Plot(results)
50+ plot.save_all_plots(" second_tournament" )
3051
3152 Contributing
3253============
0 commit comments