-
Notifications
You must be signed in to change notification settings - Fork 269
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
Merge evolved artificial neural network strategy #773
Conversation
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.
Minor things from me. Looking good.
return D | ||
|
||
|
||
class EvolvedANN(ANN): |
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.
Can we have more of a docstring here please.
-
Saying that it's based on a neural net etc.
-
Include:
Names: - Evolved ANN: : Original name by Marc Harper/Marting Jones
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.
Perhaps also include a reference (in bibliography.rst
) to a good base text on neural nets? (Perhaps.)
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.
Yes to docstring, I think people should just google about neural networks.
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.
Sure.
input_values = 17 | ||
hidden_layer_size = 10 | ||
|
||
test_weights = [0.19789658035994948, -5575.476236516673, 0.1028948855131803, 0.7421752484224489, |
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.
Is test_weights
the right name for this?
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.
I changed it to weights.
class TestEvolvedANNvsCooperator(TestHeadsUp): | ||
def test_rounds(self): | ||
self.versus_test(axelrod.EvolvedANN(), axelrod.Cooperator(), | ||
[C, D, D, C, D], [C] * 5) |
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.
Could we throw in a couple more? (Just to ensure we have some more variety).
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.
sure
opponent_previous2_d = 1 if opponent.history[-2] == D else 0 | ||
|
||
# Remaining Features | ||
turns_remaining = self.match_attributes['length'] - len(self.history) |
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.
Can we add a test for the case of a match when the match length is unknown? (Just to make sure this doesn't fall over).
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.
The heads up tests don't supply the match length.
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.
We should train a separate strategy that only uses the round number though.
No description provided.