Package search
Class AStarFrontierSearcher.PathNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreePathCostNode<State>>>
java.lang.Object
search.GraphSearcher<State,Node,Frontier>
search.PriorityQueueSearcher<State,Node,Frontier>
search.AStarFrontierSearcher<State,Nodes.SimpleTreePathCostNode<State>,Frontier>
search.AStarFrontierSearcher.PathNodes<State,Frontier>
- Type Parameters:
State- Type representing elements of the search space.Frontier- Type representing the (entire) search frontier (open set).
- Enclosing class:
- AStarFrontierSearcher<State,Node extends SearchTreeNode<Node,State> & KnowsOwnCost,Frontier extends Frontiers.PriorityQueue<Node>>
public static class AStarFrontierSearcher.PathNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreePathCostNode<State>>> extends AStarFrontierSearcher<State,Nodes.SimpleTreePathCostNode<State>,Frontier>
A specialization of
AStarFrontierSearcher to use a
minimal implementation of hierarchical search tree nodes (with a
state, accumulated cost, and pointer to a parent tree node),
with the frontier implementation still exposed as a type
parameter.-
Nested Class Summary
Nested classes/interfaces inherited from class search.AStarFrontierSearcher
AStarFrontierSearcher.PathNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreePathCostNode<State>>>, AStarFrontierSearcher.SimpleNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreeCostNode<State>>> -
Constructor Summary
Constructors Constructor Description PathNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>,Supplier<? extends Frontier>> frontierMetafactory, Function<State,Iterable<Nodes.CostAndStep<State>>> expander)Constructor for this class which does not maintain an explored set.PathNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>,Supplier<? extends Frontier>> frontierMetafactory, Function<State,Object> hashArtifactBuilder, Function<State,Iterable<Nodes.CostAndStep<State>>> expander)Constructor for this class which maintains an explored set using a hashing of the state representations. -
Method Summary
Methods inherited from class search.AStarFrontierSearcher
debugFrontierAddition, debugFrontierRemovalMethods inherited from class search.GraphSearcher
debugExpansion, debugFrontier, debugFrontierExhausted, debugFrontierNonaddition, debugGoalFound, debugInitialNode, getDebug, getLastAddedToFrontier, getLastExpandedFromFrontier, getLastNotAddedToFrontier, getLastUnexpandedInFrontier, search, setDebug, solvable
-
Constructor Details
-
PathNodes
public PathNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>,Supplier<? extends Frontier>> frontierMetafactory, Function<State,Iterable<Nodes.CostAndStep<State>>> expander)Constructor for this class which does not maintain an explored set.- Parameters:
stateTest- A boolean-returning function checking whether a state space element is a goal state.heuristic- Heuristic function for this search application.frontierMetafactory- This function maps aComparatorfor tree nodes to aSupplierof new, empty Frontier instances.expander- Generates the successor states from some state, each associated with a cost.
-
PathNodes
public PathNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>,Supplier<? extends Frontier>> frontierMetafactory, Function<State,Object> hashArtifactBuilder, Function<State,Iterable<Nodes.CostAndStep<State>>> expander)Constructor for this class which maintains an explored set using a hashing of the state representations.- Parameters:
stateTest- A boolean-returning function checking whether a state space element is a goal state.heuristic- Heuristic function for this search application.frontierMetafactory- This function maps aComparatorfor tree nodes to aSupplierof new, empty Frontier instances.hashArtifactBuilder- Generates a hashable object from a state element.expander- Generates the successor states from some state, each associated with a cost.
-