These are chat archives for drvinceknight/agent-based-learn

1st
Sep 2015
cesaresparza
@cesaresparza
Sep 01 2015 11:29
Hi @drvinceknight
Vince Knight
@drvinceknight
Sep 01 2015 12:39
Hi Cesar, I'm on a train so signal isn't great. Type away and I'll answer when I can
cesaresparza
@cesaresparza
Sep 01 2015 12:46
Ok, thank you. I followed the instructions from axelrod documentation to produce the stackplot and the stackplot option is working
didnt work*
Vince Knight
@drvinceknight
Sep 01 2015 13:22
That's strange... I'll take a look when I get to my hotel tonight or my next train. If I don't get back to you about it by tomorrow please remind me.
cesaresparza
@cesaresparza
Sep 01 2015 13:58
yes, thank you very much
Vince Knight
@drvinceknight
Sep 01 2015 20:25
@cesaresparza I just ran the following:
import axelrod
strategies = [s() for s in axelrod.basic_strategies]
tournament = axelrod.Tournament(strategies)
results = tournament.play()
eco = axelrod.Ecosystem(results)
eco.reproduce(50) # Evolve the population over 50 time steps
plot = axelrod.Plot(results)
p = plot.stackplot(eco.population_sizes)
p.show()
It worked without a problem for me… What errors are you getting?
cesaresparza
@cesaresparza
Sep 01 2015 22:29
import axelrod
strategies = [s() for s in axelrod.basic_strategies]
tournament = axelrod.Tournament(strategies)
results = tournament.play()
eco = axelrod.Ecosystem(results)
eco.reproduce(50)
plot = axelrod.Plot(results)
p = plot.stackplot(eco.population_sizes)
p.show()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'show'
I just ran the same