CoCalc Public Filesaxelrod.htmlOpen with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
Views : 56
Description: Jupyter html version of axelrod.ipynb
Compute Environment: Ubuntu 18.04 (Deprecated)
axelrod
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 [ ]: