CoCalc Public Filesaxelrod.ipynbOpen with one click!
Authors: Harald Schilly, William A. Stein
Views : 49
Description: Jupyter notebook axelrod.ipynb
Compute Environment: Ubuntu 18.04 (Deprecated)
In [2]:
import axelrod as axl players = [axl.Cooperator(), axl.Defector(), axl.TitForTat(), axl.Grudger(), axl.AntiTitForTat()] players.append(axl.Random()) tournament = axl.Tournament(players) results = tournament.play()
Playing matches: 100%|██████████| 21/21 [00:00<00:00, 313.39it/s] Analysing: 100%|██████████| 210/210 [00:00<00:00, 2012.78it/s] Finishing: 100%|██████████| 25/25 [00:00<00:00, 3649.51it/s]
In [6]:
plot = axl.Plot(results) _=plot.winplot()
In [5]:
_ = plot.payoff()
In [ ]: