Axelrod icon indicating copy to clipboard operation
Axelrod copied to clipboard

More example and visualization notebooks

Open marcharper opened this issue 8 years ago • 6 comments

We could use some more examples and demos in our notebooks repository. Just advertising for the other repository, please open PRs there.

marcharper avatar Jan 11 '17 04:01 marcharper

I would like to assist in this issue, could you give me more information on what you need?

nadia39 avatar Feb 12 '17 21:02 nadia39

I would like to assist in this issue, could you give me more information on what you need?

Hi @nadia39 great to have you assist!

If you take a look at this repository: https://github.com/Axelrod-Python/Axelrod-notebooks we have a number of Jupyter notebook examples showing a variety of things that can be done with the library. We're always looking for more examples which is what this issue is asking for.

Perhaps take a look through the documentation http://axelrod.readthedocs.io/en/latest/ and see if you think there's anything specific worth adding as a Jupyter notebook?

drvinceknight avatar Feb 13 '17 06:02 drvinceknight

Is there a strategy where the player assumes that their opponent's probability of defecting is a Bernoulli variable, where the parameter is based on a Bayesian analysis of the opponent's previous moves?

SirRichter avatar Jun 10 '17 21:06 SirRichter

@SirRichter Not one that explicitly uses a Bayesian prior AFAIK. There are some strategies that attempt to determine the opponent's probability of cooperating in various ways, such as the running counts of the opponent's plays, which would correspond to some uninformative prior (Beta(0, 0) I guess) and then taking the posterior maximum.

Feel free to implement such a strategy (ideally using scipy) and open a PR on the main repository.

marcharper avatar Jun 10 '17 21:06 marcharper

I've created one in Brazilian Portuguese: https://github.com/danilobellini/notebooks/blob/master/2018-11-10_Axelrod/2018-11-10_Axelrod.ipynb

Shall I make a PR based on it? The stuff from there I may add in a PR are:

  • The Detective and Simpleton strategies (which I wrote in Python based on the Nicky Case example)
  • The notebook itself (which is mainly a "Getting started, step by step", but in Brazilian Portuguese)

danilobellini avatar Nov 19 '18 22:11 danilobellini

Hi @danilobellini! Great use of the library :+1:

I've grabbed these screenshots from https://ncase.me/trust/:

screenshot from 2018-11-20 09-16-28 screenshot from 2018-11-20 09-13-52

I don't immediately believe those strategies are implemented yet so they are welcome (although at a glance I'm not convinced that you've implemented Detective as described but that can be discussed on the PR, I could be mistaken).

Information about contributing is available here: https://axelrod.readthedocs.io/en/stable/tutorials/contributing/strategy/index.html

The notebook would not go in this repository.

drvinceknight avatar Nov 20 '18 09:11 drvinceknight