Package search
Class AStarFrontierSearcher.SimpleNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreeCostNode<State>>>
java.lang.Object
search.GraphSearcher<State,Node,Frontier>
search.PriorityQueueSearcher<State,Node,Frontier>
search.AStarFrontierSearcher<State,Nodes.SimpleTreeCostNode<State>,Frontier>
search.AStarFrontierSearcher.SimpleNodes<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.SimpleNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreeCostNode<State>>> extends AStarFrontierSearcher<State,Nodes.SimpleTreeCostNode<State>,Frontier>
A specialization of
AStarFrontierSearcher
to use a
minimal implementation of unrelated search tree nodes (with a
state and accumulated cost only), 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 SimpleNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreeCostNode<State>>,Supplier<? extends Frontier>> frontierMetafactory, Function<State,Iterable<Nodes.CostAndStep<State>>> expander)
Constructor for this class which does not maintain an explored set.SimpleNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreeCostNode<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, debugFrontierRemoval
Methods inherited from class search.GraphSearcher
debugExpansion, debugFrontier, debugFrontierExhausted, debugFrontierNonaddition, debugGoalFound, debugInitialNode, getDebug, getLastAddedToFrontier, getLastExpandedFromFrontier, getLastNotAddedToFrontier, getLastUnexpandedInFrontier, search, setDebug, solvable
-
Constructor Details
-
SimpleNodes
public SimpleNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreeCostNode<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 aComparator
for tree nodes to aSupplier
of new, empty Frontier instances.expander
- Generates the successor states from some state, each associated with a cost.
-
SimpleNodes
public SimpleNodes(Predicate<State> stateTest, Function<State,Double> heuristic, Function<Comparator<Nodes.SimpleTreeCostNode<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 aComparator
for tree nodes to aSupplier
of 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.
-