Class DepthFirstNode.RootDFNode<P extends IGamePosition<P>>
java.lang.Object
gametree.GameTreeNode<DepthFirstNode<P>, P>
gametree.DepthFirstNode<P>
gametree.DepthFirstNode.RootDFNode<P>
- Type Parameters:
P- The type of IGamePosition
- All Implemented Interfaces:
Serializable
- Enclosing class:
DepthFirstNode<P extends IGamePosition<P>>
An optional variant of the DepthFirstNode which stores the nodes at depth 1 in memory.
All other nodes are still DepthFirstNode instances, so only the first depth is stored,
the rest is discarded during search.
-
Nested Class Summary
Nested classes/interfaces inherited from class gametree.DepthFirstNode
DepthFirstNode.RootDFNode<P extends IGamePosition<P>>Nested classes/interfaces inherited from class gametree.GameTreeNode
GameTreeNode.Result<N extends GameTreeNode<N,P>, P extends IGamePosition<P>> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) ArrayList<DepthFirstNode<P>> The children stored in this root node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_children(MetricKeeper... metrics) This implementation stores the children of the root node only, only the root node will be of the typeDepthFirstNode.RootDFNode, whereas all children will be of the typeDepthFirstNodewhich does not store children in memory.Returns the children from_children(MetricKeeper...)if they are present, and anOptional.empty()otherwise.Methods inherited from class gametree.DepthFirstNode
_adjustBounds, _depthOfLower, _depthOfUpper, _lowerbound, _upperbound, getTree, hasSavedBounds, maximising, readFromTT, toStringMethods inherited from class gametree.GameTreeNode
adjustBounds, adjustBounds, adjustBounds, adjustBounds, attachMetrics, CDF, children, clearPosition, combineMetricList, countSavedSubTree, depth, depthOfLower, depthOfUpper, findBest2, fromFile, getAllLeafnodes, getAttachedMetrics, getComparator, getSavedLeafnodes, hasAttachedMetrics, isRelevant, isRoot, leastPessimistic2, lowerbound, mostOptimistic2, parent, PMF, position, printTree, printTree, printTree, remainingSolveEffort, separation, separation, setParent, survivalFunction, toFile, updateMetrics, updateMetricsParental, updateTree, upperbound
-
Field Details
-
children
ArrayList<DepthFirstNode<P extends IGamePosition<P>>> childrenThe children stored in this root node. Children are of theDepthFirstNodetype only, and therefore do not store their own children in memory.
-
-
Constructor Details
-
RootDFNode
-
-
Method Details
-
_children
This implementation stores the children of the root node only, only the root node will be of the typeDepthFirstNode.RootDFNode, whereas all children will be of the typeDepthFirstNodewhich does not store children in memory.- Overrides:
_childrenin classDepthFirstNode<P extends IGamePosition<P>>
-
savedChildren
Returns the children from_children(MetricKeeper...)if they are present, and anOptional.empty()otherwise.- Overrides:
savedChildrenin classDepthFirstNode<P extends IGamePosition<P>>- Returns:
- An Optional containing all children nodes saved in the memory of this
GameTreeNodeor an empty Optional if none are saved in memory. An Optional containing an empty List signifies a terminal node with no children.
-