@@ -18,10 +18,10 @@ that summarises the results of the tournament::
1818 >>> summary = results.summarise()
1919 >>> import pprint
2020 >>> pprint.pprint(summary)
21- [Player(Rank=0, Name='Defector', Median_score=2.6... , Cooperation_rating=0.0, Wins=3.0, Initial_C_rate=0.0, CC_rate=... ),
22- Player(Rank=1, Name='Tit For Tat', Median_score=2.3... , Cooperation_rating=0... , Wins=0.0, Initial_C_rate=1.0, CC_rate=... ),
23- Player(Rank=2, Name='Grudger', Median_score=2.3... , Cooperation_rating=0... , Wins=0.0, Initial_C_rate=1.0, CC_rate=... ),
24- Player(Rank=3, Name='Cooperator', Median_score=2.0... , Cooperation_rating=1.0, Wins=0.0, Initial_C_rate=1.0, CC_rate=... )]
21+ [Player(Rank=0, Name='Defector', Median_score=2.6, Cooperation_rating=0.0, Wins=3.0, Initial_C_rate=0.0, Original_index=1, CC_rate=0.0, CD_rate=0.0, DC_rate=0.4000000000000001, DD_rate=0.6, CC_to_C_rate=0, CD_to_C_rate=0, DC_to_C_rate=0, DD_to_C_rate=0 ),
22+ Player(Rank=1, Name='Tit For Tat', Median_score=2.3000000000000003 , Cooperation_rating=0.7 , Wins=0.0, Initial_C_rate=1.0, Original_index=2, CC_rate=0.6666666666666666, CD_rate=0.03333333333333333, DC_rate=0.0, DD_rate=0.3, CC_to_C_rate=1.0, CD_to_C_rate=0, DC_to_C_rate=0, DD_to_C_rate=0 ),
23+ Player(Rank=2, Name='Grudger', Median_score=2.3000000000000003 , Cooperation_rating=0.7 , Wins=0.0, Initial_C_rate=1.0, Original_index=3, CC_rate=0.6666666666666666, CD_rate=0.03333333333333333, DC_rate=0.0, DD_rate=0.3, CC_to_C_rate=1.0, CD_to_C_rate=0, DC_to_C_rate=0, DD_to_C_rate=0 ),
24+ Player(Rank=3, Name='Cooperator', Median_score=2.0, Cooperation_rating=1.0, Wins=0.0, Initial_C_rate=1.0, Original_index=0, CC_rate=0.6666666666666666, CD_rate=0.3333333333333333, DC_rate=0.0, DD_rate=0.0, CC_to_C_rate=1.0, CD_to_C_rate=1.0, DC_to_C_rate=0, DD_to_C_rate=0 )]
2525
2626It is also possible to write this data directly to a csv file using the
2727`write_summary ` method::
@@ -32,11 +32,11 @@ It is also possible to write this data directly to a csv file using the
3232 ... csvreader = csv.reader(outfile)
3333 ... for row in csvreader:
3434 ... print(row)
35- ['Rank', 'Name', 'Median_score', 'Cooperation_rating', 'Wins', 'Initial_C_rate', 'CC_rate', 'CD_rate', 'DC_rate', 'DD_rate', 'CC_to_C_rate', 'CD_to_C_rate', 'DC_to_C_rate', 'DD_to_C_rate']
36- ['0', 'Defector', ... ]
37- ['1', 'Tit For Tat', ... ]
38- ['2', 'Grudger', ... ]
39- ['3', 'Cooperator', ... ]
35+ ['Rank', 'Name', 'Median_score', 'Cooperation_rating', 'Wins', 'Initial_C_rate', 'Original_index', ' CC_rate', 'CD_rate', 'DC_rate', 'DD_rate', 'CC_to_C_rate', 'CD_to_C_rate', 'DC_to_C_rate', 'DD_to_C_rate']
36+ ['0', 'Defector', '2.6', '0.0', '3.0', '0.0', '1', '0.0', '0.0', '0.4000000000000001', '0.6', '0', '0', '0', '0' ]
37+ ['1', 'Tit For Tat', '2.3000000000000003', '0.7', '0.0', '1.0', '2', '0.6666666666666666', '0.03333333333333333', '0.0', '0.3', '1.0', '0', '0', '0' ]
38+ ['2', 'Grudger', '2.3000000000000003', '0.7', '0.0', '1.0', '3', '0.6666666666666666', '0.03333333333333333', '0.0', '0.3', '1.0', '0', '0', '0' ]
39+ ['3', 'Cooperator', '2.0', '1.0', '0.0', '1.0', '0', '0.6666666666666666', '0.3333333333333333', '0.0', '0.0', '1.0', '1.0', '0', '0' ]
4040
4141
4242The result set class computes a large number of detailed outcomes read about
0 commit comments