|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Reference example: IDA* on a DAG where no path to the goal exists. More...
Go to the source code of this file.
Classes | |
| struct | NodeState |
| class | UnreachableGoalDomain |
| struct | UnreachableGoalDomain::Move |
| class | InadmissibleDomain |
| struct | InadmissibleDomain::Move |
Functions | |
| int | main () |
Reference example: IDA* on a DAG where no path to the goal exists.
This example demonstrates the behaviour of IDA* when the goal is completely unreachable. The search exhausts all reachable states and returns SearchStatus::Exhausted with found_solution() == false.
Graph (directed, acyclic):
Because the graph is a DAG, IDA* terminates without any depth limit: once all paths from the root are exhausted, next_bound reaches numeric_limits<Distance>::max() and the engine reports Exhausted.
A second scenario below shows an inadmissible (over-estimating) heuristic on a reachable goal: IDA* still finds a solution, though not necessarily the optimal one.
Build and run:
cmake --build build --target ida_star_no_solution_example./build/Examples/ida_star_no_solution_example Definition in file ida_star_no_solution_example.cc.
| int main | ( | ) |
Definition at line 201 of file ida_star_no_solution_example.cc.
References engine.