-
Notifications
You must be signed in to change notification settings - Fork 282
Update finite_state_machines.py #1382
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
Conversation
The Evolved FSM 8 was evolved from a 10 state FSM designed to reduce the Cooperation rate after DD and CD while increasing the Cooperation rate after DC and CC. That strategy scored well in tournaments but after evolving for 500 generations results in this winning strategy.
|
Hi Dash, the error seems to be unrelated to your new strategy; we'll look into it. You would need to add the strategy name to the this file though. |
|
@drvinceknight FYI there appears to be a latent docs build error. |
Looking at the stack race I think it's to do with the doctoring of the strategy: This will be a silly thing like a level of indentation or something like that, I see that @dashiellfryer has closed this PR though, if that's a "miss - click" I'll look in to what's wrong with the doctstring and point out exactly what needs to be tweaked :) |
|
@dashiellfryer This is probably easily fixable, did you want to reopen? I'll add a commit to get the tests running correctly. |
|
@marcharper I closed the commit to fix the errors, but if you can fix it easily, please do. I think much of the issue is just my novice status with git and github. |
drvinceknight
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the documentation fails to build because of something to do with the transitions = ....
I started trying to tweak the indentation to get it to work but actually I suggest removing that altogether from the documentation as it's essentially self documenting in the code itself. I believe that once my suggestion is accepted the docs should build.
Perhaps we could add more about the 10 state FSM designed by Frederick Vincent:
- is this a particular 10 state FSM that's in a paper somewhere?
- what was the objective function for the evolutionary algorithm?
Co-authored-by: Vince Knight <vincent.knight@gmail.com>
dashiellfryer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frederick and I are writing the paper about the 10 state FSM. I just wanted dibs on top spot!
|
I'm updating the tests on PR #1383. The tests revealed that two of the states were inaccessible (0 and 1) so I removed them and renamed it "Evolved FSM 6". Can you give us any more info on the training so we can add it to the doc string? |
|
The objective function used was the default; score. |
|
@dashiellfryer I should have been more explicit. Good to know the objective was the score default. Also -- what version of axelrod did you use? I presume you trained against the short_run_time strategies (the default). Otherwise PTAL at #1383 and let me know if it looks good to you (the strategy renaming, for example). |
|
I am great with the name change and I should have had the student(s) check for accessible branches. Sorry @marcharper, I was answering @drvinceknight's question. Below, you can find all the specifics. We used all the default options for fsm_evolve except for the output_file, num_states (10 instead of 8), and generations (500 instead of 50). I am running axelrod-dojo version 0.0.8 and axelrod version 4.10.0. So yes, we trained against short_run_time_strategies for 500 generations, population size of 40, mutation rate at 0.1, bottleneck at 10, processes at 0 (in Ubuntu), objective set to score, 200 turns, 0 noise. Last semester we found the easiest way to invoke training with a specific starting point was to add transitions directly to prepare_player_class_kwargs with everything else set in Options and using the EvolvableFSMPlayer provided by @marcharper as the player class. |
|
Thanks! I'll update the docstring and then I think this one is good to go in.
No worries, that's why the tests are there :) We could update the evolutionary algorithms to maintain the number of connected states , or memory depth, if that's of interest. (FYI I'll be folding the evolutionary algorithms into the main library soon.) |

The Evolved FSM 8 was evolved from a 10 state FSM designed to reduce the Cooperation rate after DD and CD while increasing the Cooperation rate after DC and CC. That strategy scored well in tournaments but after evolving for 500 generations results in this winning strategy.