Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::GoalPredicate Concept Reference

Concept for domains that can recognize goal states. More...

#include <state_search_common.H>

Concept definition

template<typename Domain>
concept Aleph::GoalPredicate = requires(Domain &d, const typename Domain::State &state) {
{ d.is_goal(state) } -> std::convertible_to<bool>;
}
Concept for domains that can recognize goal states.
@ Domain
Preserve the order emitted by for_each_successor().

Detailed Description

Concept for domains that can recognize goal states.

Used by Aleph::Search::Backtracking and Aleph::Search::IDAStar. A goal state is a feasible solution: any state for which the domain considers the problem solved (e.g., all queens placed without conflict in N-Queens, a path from source to target).

Note
This is distinct from is_complete() as documented in Branch_And_Bound.H. Branch-and-Bound instead looks for optimal solutions: is_complete(state) marks a feasibly complete assignment whose objective value may still be improved by other branches, so the engine records it as a new incumbent and keeps searching. Use is_goal for satisfiability-style problems and is_complete for optimization problems with an explicit cost/bound.

Definition at line 591 of file state_search_common.H.