|
Assignment Search Framework
|

Public Member Functions | |
| BestFirstSearch () | |
| virtual | ~BestFirstSearch () |
| void | setHashFunction (const StateHashFunction< state_t > *hash) |
| void | setHeuristic (Heuristic< state_t > *heur) |
| uint64_t | getUniqueGoalTests () const |
Public Member Functions inherited from SearchEngine< state_t, action_t > | |
| SearchEngine () | |
| virtual | ~SearchEngine () |
| void | setGoalTest (const GoalTestFunction< state_t > *g) |
| void | setTransitionSystem (const TransitionSystem< state_t, action_t > *o) |
| SearchStatus | getStatus () const |
| SearchTermType | getPlan (const state_t &init_state, std::vector< action_t > &sol_plan) |
| bool | foundSolution () const |
| std::vector< action_t > | getLastPlan () |
| double | getLastPlanCost () |
| void | setStorageLimit (uint64_t limit) |
| bool | hitStorageLimit () |
| void | setHComputeLimit (uint64_t limit) |
| bool | hitHCompLimit () |
| void | setSuccCallLimit (uint64_t limit) |
| bool | hitSuccFuncLimit () |
| void | setGoalTestLimit (uint64_t limit) |
| bool | hitGoalTestLimit () |
| uint64_t | getStorageCount () const |
| uint64_t | getHCompCount () const |
| uint64_t | getSuccFuncCount () const |
| uint64_t | getStateGenCount () const |
| uint64_t | getActionGenCount () const |
| uint64_t | getGoalTestCount () const |
Protected Member Functions | |
| virtual SearchTermType | searchForPlan (const state_t &init_state) |
| virtual void | resetStatistics () |
| virtual bool | isConfigured () const |
| virtual void | resetEngine () |
| virtual double | nodeEval (const state_t &state, double g_cost, double h_cost)=0 |
| virtual BfsExpansionResult | nodeExpansion () |
| void | extractSolutionPath (NodeID path_end_id) |
Protected Member Functions inherited from SearchEngine< state_t, action_t > | |
| virtual void | incrementGoalTestCount () |
| virtual void | incrementHCompCount () |
| virtual void | incrementSuccFuccCalls () |
| virtual void | incrementStateGenCount () |
| virtual void | increaseActionGenCount (double new_gens) |
Protected Attributes | |
| Heuristic< state_t > * | heur_func |
| The heuristic function. More... | |
| const StateHashFunction < state_t > * | hash_func |
| The hash function. More... | |
| OpenClosedList< state_t, action_t > | open_closed_list |
| The open and closed list. More... | |
| uint64_t | unique_goal_tests |
| The number of unique goal tests performed. More... | |
| std::vector< action_t > | app_actions |
| A vector to store the set of applicable actions. More... | |
Protected Attributes inherited from SearchEngine< state_t, action_t > | |
| const GoalTestFunction< state_t > * | goal_test |
| The goal test function. More... | |
| const TransitionSystem < state_t, action_t > * | op_system |
| The transition system. More... | |
| SearchStatus | alg_status |
| The current search status. More... | |
| bool | have_incumbent |
| If an incumbent solution is stored or not. More... | |
| std::vector< action_t > | incumbent_plan |
| The last solution found. More... | |
| double | incumbent_cost |
| The cost of the last solution. More... | |
| uint64_t | storage_limit |
| The limit on how many states are stored. 0 for no limit. More... | |
| uint64_t | storage_count |
| The number of states currently being stored. More... | |
| uint64_t | h_comp_limit |
| The limit on how many heuristic computations can be performed. 0 for no limit. More... | |
| uint64_t | h_comp_count |
| The number of heuristic computations during the current search. More... | |
| uint64_t | succ_func_limit |
| The limit on how many successor function calls can be performed. 0 for no limit. More... | |
| uint64_t | succ_func_count |
| The number of heuristic computations made during the current search. More... | |
| uint64_t | goal_test_limit |
| The limit on the number of goal tests. 0 for no limit. More... | |
| uint64_t | goal_test_count |
| The number of goal tests performed during the current search. More... | |
| uint64_t | state_gen_count |
| The number of state generations during the current search. More... | |
| uint64_t | action_gen_count |
| The number of state generations during the current search. More... | |
An abstract template for best-first search.
Add branch and bound option
Add pathmax
Make it a bit more general
Are these the return types that we want for BfsExpansionResult
| BestFirstSearch< state_t, action_t >::BestFirstSearch | ( | ) |
|
virtual |
|
protected |
Extracts the path that ends at the node for the given id and stores it as the incumbent plan.
| path_end_id | The node at the end of the path. |
|
inline |
Returns the number of unique goal tests.
|
protectedvirtual |
Checks if the engine has all elements necessary for search.
Reimplemented from SearchEngine< state_t, action_t >.
|
protectedpure virtual |
Calculates the evaluation of the given node.
| state | The state to evaluate. |
| g_cost | The g-cost of the current node. |
| h_cost | The h-cost of the current node. |
Implemented in AStar< state_t, action_t >.
|
protectedvirtual |
Expands a single node and returns the result of the expansion (regarding if a solution as found or not).
|
protectedvirtual |
Resets the search engine by resetting the statistics and checking if the engine is ready for the next search.
Reimplemented from SearchEngine< state_t, action_t >.
|
protectedvirtual |
Resets the statistics counters.
Reimplemented from SearchEngine< state_t, action_t >.
|
protectedvirtual |
Searches for a plan. Assumes search engine is ready and properly configured.
| init_state | The initial state to search from. |
Implements SearchEngine< state_t, action_t >.
|
inline |
Sets the hash function used by the search.
| hash | A pointer to the hash function. |
|
inline |
Sets the heuristic function used by the search.
| heur | A pointer to the heuristic function to use. |
|
protected |
A vector to store the set of applicable actions.
|
protected |
The hash function.
|
protected |
The heuristic function.
|
protected |
The open and closed list.
|
protected |
The number of unique goal tests performed.