Interface ProgressionNode<N>
- Type Parameters:
N- the type of object used to represent a node inthe search space
- All Superinterfaces:
State
search
space and its context in a progression search,
such as the temporal and epistemic depth at which the node exists in that
search. The same node in a search space might be reached at different times
and in different ways during different search methods. Likewise, the same
search might find the same node in a search space multiple times but at
different temporal or epistemic depths. A progresison node is a reference
both to the search space node and to how and when it was reached in a
particular search.- Author:
- Stephen G. Ware
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompiledActionReturns theactionassociated with this node'ssearch space node.Returns thecharacterwhose utility the search that produced this node was trying to improve when this node was generated.intReturns the depth of nested theory of mind (what onecharacterbelieves another character believes, and so on) at which this node was created.intReturns the number of actions that have been taken since the explanation this node is part of began.getNode()Returns the node from thesearch spacethat this progression node is referring to.intReturns the number of actions that have been taken in the plan leading to this node.default CompiledProblemReturns theproblemthe search that generated this node is solving.getRoot()Returns the root from which this node is a temporal descendant, which is asearch spacenode that represents where the search that generated this node started.Returns thesearchthat generated this node.default ProgressionSpace<N> getSpace()Returns thesearch spacethe search that generated this node is using.intReturns the number of actions that have been taken since the initial state, regardless of this node'sepistemic depth.getTrunk()Returns this node's trunk, which is asearch spacenode that represents the original action that was being explained when the search generated this node.default ValuegetUtility(Character character) Returns the utility of a given character (or the author, if the character is null) in the state represented by this progression node'ssearch space node.default booleanReturns whether or not thesearch space nodethat this progression node refers to isexplainedfor all the characters for which it needs to be explained.default booleanisExplained(Character character) Returns whether or not thesearch space nodethat this progression node refers to isexplained for the given character.
-
Method Details
-
getProblem
Returns theproblemthe search that generated this node is solving.- Returns:
- the problem being solved by the search that generated this node
-
getSearch
ProgressionSearch getSearch()Returns thesearchthat generated this node.- Returns:
- the search that generated this node
-
getSpace
Returns thesearch spacethe search that generated this node is using. Thesearch space nodeassociated with this progression node will be a node in that space.- Returns:
- the search space used by the search that generated this node
-
getCharacter
-
getTrunk
N getTrunk()Returns this node's trunk, which is asearch spacenode that represents the original action that was being explained when the search generated this node. When aprogression searchadds an action to a plan, it must explain that action for each of its consenting characters by creating branches for each one. A branch is the state that character believes will be the case after taking the action; the state after the original action from which the branches extend is the trunk for all of those branches. The primary search to improve the author's utility has no trunk, and this method will return null for those nodes.- Returns:
- the trunk node that the search was explaining when this node was created, or null if this node is part of the search to improve the author's utility
-
getRoot
N getRoot()Returns the root from which this node is a temporal descendant, which is asearch spacenode that represents where the search that generated this node started. When aprogression searchadds an action to a plan, it must explain the action for each of its consenting characters by creating branches for each one. A branch starts in the state that character believes will be the case after taking the action; this starting state is called the root. The root node is one which, if explained, would mean the originaltrunk nodeis also explained for one of its consenting characters.- Returns:
- the root node where the search began to explain an action for a character and which caused this node to be generated
-
getAction
Returns theactionassociated with this node'ssearch space node.- Returns:
- the action associated with this node's search space node
-
getNode
N getNode()Returns the node from thesearch spacethat this progression node is referring to. A progression node is a reference to a node in thesearch'sspace(accessed with this method), but annotated with the context in which it was generated by the search.- Returns:
- the search space node associated with this progression node
-
isExplained
default boolean isExplained()Returns whether or not thesearch space nodethat this progression node refers to isexplainedfor all the characters for which it needs to be explained. Usually, a node needs to be explained for all of theconsenting charactersofthe actionthat led to the state the node represents. However, there is one special case:a root node. A root node is created to explain one action (the trunk) for one character. This means that a root node only needs to be explained for the character it was created to explained, even if the action has more than one consenting character. If this progression node is a root, this method will return true if it is explainedfor its character, no matter how many consenting characters the action may have.- Returns:
- true if the node is explained for all its consenting characters or if the node is a root node and is explained for the character that root node was created to explain; false otherwise
-
isExplained
Returns whether or not thesearch space nodethat this progression node refers to isexplained for the given character. In some implementations, this method will return false if the character is not a consenting character tothe node's action, even if that character would want the action to happen.- Parameters:
character- the character for whom the node may be explained- Returns:
- true if the node is explained for that character
-
getUtility
Returns the utility of a given character (or the author, if the character is null) in the state represented by this progression node'ssearch space node.- Parameters:
character- the character whose utility is desired, or null if the author's utility is desired- Returns:
- the utility of that character in that state this node represents
-
getTemporalDepth
int getTemporalDepth()Returns the number of actions that have been taken since the initial state, regardless of this node'sepistemic depth. For author nodes (epistemic depth 0), this value is the same asplan length. For character nodes (epistemic depth > 0), this value includes any actions that occurred before theroot node(even if the character did not observe them), the action leading to the root node, and all actions that have occurred since the root node.- Returns:
- the number of actions taken since the initial state
-
getExplanationDepth
int getExplanationDepth()Returns the number of actions that have been taken since the explanation this node is part of began. For author nodes (epistemic depth0), this value is the same asplan length. For nodes with epistemic depth 1 (nodes created to explain author nodes), this value is also the same as plan length, regardless of where in the author's plan the action being explained occurs, because explanation length does not depend on the length of the author's plan. For nodes with epistemic depth > 1, this value includes any actions taken at lower epistemic depths.For example, say the author's plan is actions A then B. After the second action (B), explanation depth is the same as plan length, which is 2. Now suppose a branch is created with B as the
trunk. This branch has an epistemic depth of 1. That node will have an explanation depth and plan length of 1 because action B is the first action in the branch (action B and the state after taking it form the root node of the new search). From that root, say two more actions C and D are taken. The state after D has an explanation depth of 3 (the root B + the two actions that have been taken since the root). Now suppose a branch is created with D as the trunk and an epistemic depth of 2. From there, two more actions E and F are taken. The state after F has a plan length of 3 (the root D + the two actions that have been taken since the root) but an explanation depth of 5, because it also counts actions B, C, and D from epistemic depth 1.Explanation depth is defined this way so that a search can have a
character temporal limitwhich is different from itsauthor temporal limitwithout creating an infinitely deep space.A search will only expand an author node (epistemic depth 0) if its explanation depth is less than the search's author temporal limit. A search will only expand a character node (epistemic depth > 0) if its explanation depth is less than the search's character temporal limit.
- Returns:
- the number of actions taken since the explanation began
-
getPlanLength
int getPlanLength()Returns the number of actions that have been taken in the plan leading to this node. The only node with a plan length of 0 is the author root node of the search. The children of the author root node have a plan length of 1, their children a plan length of 2, and so on. For character nodes (epistemic depth> 0), this number will always be at least 1, because it will include the first action leading to the search'sroot node. In other words, for character nodes, the plan length is always 1 + the number of actions that have been taken since the root node.- Returns:
- the number of actions taken in the plan to reach this node
-
getEpistemicDepth
int getEpistemicDepth()Returns the depth of nested theory of mind (what onecharacterbelieves another character believes, and so on) at which this node was created. All nodes have the same epistemic depth as theirroot, which is always 1 higher than theirtrunk. A node will only be visited if its epistemic depth is less than or equal tothe search's epistemic limit.- Returns:
- the depth of theory of mind at which this node was created
-