Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Added player assumption classification #1418
Added player assumption classification #1418
Changes from all commits
e51a310
5e4f350
81d2524
d0351a5
ce7d798
d037915
c1f6ab0
cdb72d8
0737227
76f93b6
0cffa9b
44992be
a443887
89c438c
8b4aa6c
c4359bc
46cbf02
f705ffd
58a7218
24eccc5
88d65d4
16048c1
fc80c19
d59cab9
22b61cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should the assumptions check be here or in the
Match
class? It's in aMatch
thatPlayer
s andGame
s are combined (and also in the Moran process class, which uses theMatch
class). ThePlayer
class just needs to be initialized properly and be able to return values when.strategy()
is called, it's not involved in the scoring process and so it doesn't need to care about theGame
usually (unless it requires info about the game). Note that it's in aMatch
thatPlayer
instances are currently given info about the game or match.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.
checking assumptions has use cases outside of matches - if it's in the Player class we can use it for filtering, e.g. if we wanted all strategies from a list
strategies
that work on a game with assumptionsmy_assumptions
, we could do[strategy() for strategy in strategies if strategy().assumptions_satisfy(my_assumptions)]
.Note that in general, the methods just take a dict, not a
Game
object specifically; theGame
itself is still completely hidden from thePlayer
class. In the Match class, thePlayer
s andGame
are combined in the way that you want, without either of them having their whole class exposed to the other."how should strategies handle requiring info about the game" is really the issue that we want to solve in this PR! :)