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

Minimal contract for DFS/backtracking domains. More...

#include <state_search_common.H>

Concept definition

template<typename Domain>
and requires(Domain &d, typename Domain::State &state, const typename Domain::Move &move) {
{ d.apply(state, move) } -> std::same_as<void>;
{ d.undo(state, move) } -> std::same_as<void>;
}
Minimal contract for DFS/backtracking domains.
Concept for domains that can recognize goal states.
Concept for lazy successor generation.
and
Check uniqueness with explicit hash + equality functors.
@ Domain
Preserve the order emitted by for_each_successor().

Detailed Description

Minimal contract for DFS/backtracking domains.

The engine assumes a mutable search state and reversible moves:

  • for_each_successor(state, visitor) lazily emits candidate moves,
  • apply(state, move) advances the state,
  • undo(state, move) restores the previous state,
  • is_goal(state) marks an accepted solution,
  • optionally is_terminal(state) marks dead-end terminal states,
  • optionally should_prune(state, depth) requests an early cutoff.

Definition at line 665 of file state_search_common.H.