Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tournament script / config file #421

Open
marcharper opened this issue Nov 8, 2015 · 6 comments
Open

Tournament script / config file #421

marcharper opened this issue Nov 8, 2015 · 6 comments
Assignees

Comments

@marcharper
Copy link
Member

It would be nice to be able to define and execute an external configuration file for running a tournament (not in python), something like:

[strategies]
Random, 0.4
TitForTat
...

[tournament]
rounds = 200
repetitions = 100
noise = 0.05
...

[output]
assets="output_directory"
image_format="png"
...

Then we could do something like

> run_axelrod -s script.axelrod
Running tournament with <N> strategies ...

This way we could allow people to use the library without understanding python and also have reusable tournament specifications (for the goal of reproducibility). It would also separate the internal APIs of axelrod from the actual specification of tournaments, and perhaps e.g. ease mapping a webapp to axelrod.

Any thoughts?

@meatballs
Copy link
Member

YAML is good for that sort of thing and there's a python library to deal with it: http://pyyaml.org/wiki/PyYAML

@drvinceknight
Copy link
Member

This is an awesome idea and also completely agree with @meatballs that we should use yml (have done similar for other projects).

@marcharper
Copy link
Member Author

Great, YAML works for me.

@meatballs
Copy link
Member

I'm going to look at this one next. I think this is the way that the API will need to receive definitions of tournaments to be run.

@meatballs meatballs self-assigned this Sep 12, 2016
@marcharper marcharper self-assigned this Jan 11, 2017
@marcharper marcharper removed their assignment May 9, 2017
@marcharper
Copy link
Member Author

@erik-sn @meatballs What's the current state of this re: the API?

@erik-sn
Copy link

erik-sn commented Jun 7, 2017

@marcharper sorry for the delayed response - the API can sort of do this right now, I just need to do some documentation. Essentially you would POST to /tournaments with a set of strategies and their parameters in the body. It will return JSON with the results.

I added "sort of" because this does require an HTTP client - using requests in a python script, curl, postman, a browser UI, etc.

I will try to work on documenting each of the endpoints soon, I have been distracted by some other stuff I have going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants