-
Notifications
You must be signed in to change notification settings - Fork 165
Implement Game.get_own_prior_actions
#600
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
base: master
Are you sure you want to change the base?
Conversation
tturocy
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.
Looking at the code, I am going to go back a bit on what I said in yesterday's discussion on this.
If I am reading correctly, the current implementation does NOT include the null action as a prior action. By my understand of how we are defining this concept, the null action does need to be part of the set of prior actions. So for example if an information set is always the first one reached by the player (if it is reached), then its own_prior_actions would be [None].
We cannot just omit None because consider the case of an information set that can be reached either from the root node or via some other action a (in a game without perfect recall). Then the set of own_prior_actions must be [None, a] (in some order). Otherwise it would appear this information set does not violate perfect recall (which it does).
Assuming what I have just written is correct, then this also means we can define this function completely well for information sets unreachable via absent-mindedness - they can have the empty list of prior actions, which is different from the list [None].
@rahulsavani Do you agree with my analysis, or again am I misunderstanding something?
This sounds correct to me, and I like that we can just return the empty list for unreachable info sets, and indeed this will be a characterisation of them, right? |
|
Note that the tests now failing is because I made a clarification change to the text of the exception which now doesn't match the test. However given the discussion we probably won't be raising that exception anymore. |
…rior actions to unreachable sets
tturocy
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.
I have made some changes to tighten the code. I have also improved the docstring.
However in trying to write the docstring carefully I had further thoughts.
-
It would be more primitive to define "own prior action" on a node, not an information set. Only offering on an information set loses information, especially in the case of up-tree absent-mindedness.
-
To clarify, under exactly what conditions does a node not have an "own prior action"?
-
If we pursue the idea that "own prior action" is best defined on a node as a primitive, then we are back to the problem of distinguishing between having no prior action because the node is the first time the player makes a decision on the path, versus the case where the node is not reachable because of absent-mindedness.
So this requires further discussion and careful thought. @rahulsavani
Implement
GameTreeRep::GetOwnPriorActions(C++) andGame.get_own_prior_actions(Python) to compute, for a given information set, the set of last actions taken by the player acting in the information set before reaching itCloses #582