Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Backtracking.H File Reference

Minimal depth-first backtracking engine for implicit state spaces. More...

#include <utility>
#include <ah-errors.H>
#include <state_search_common.H>
Include dependency graph for Backtracking.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Aleph::state_search_detail::PreferShallowerSolution< State, Move >
 Default incumbent ordering for DFS solutions. More...
 
class  Aleph::Depth_First_Backtracking< Domain >
 Recursive depth-first backtracking over an implicit state space. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::state_search_detail
 

Functions

template<BacktrackingDomain Domain>
auto Aleph::backtracking_search (Domain domain, typename Domain::State initial_state, ExplorationPolicy policy={}, SearchLimits limits={})
 Convenience wrapper that runs a one-shot DFS/backtracking search.
 
template<BacktrackingDomain Domain, typename OnSolution >
requires SearchSolutionVisitor<OnSolution, SearchSolution<typename Domain::State, typename Domain::Move>>
auto Aleph::backtracking_search (Domain domain, typename Domain::State initial_state, OnSolution &on_solution, ExplorationPolicy policy={}, SearchLimits limits={})
 Convenience wrapper with a solution callback/collector.
 

Detailed Description

Minimal depth-first backtracking engine for implicit state spaces.

This first version focuses on a single reusable kernel:

  • mutable state plus apply() / undo(),
  • lazy successor generation via for_each_successor(),
  • optional early stop on the first solution,
  • reusable limits and statistics from state_search_common.H.

The engine is intentionally small, but already usable as a base layer for exact search problems and for future branch-and-bound extensions.

Author
Leandro Rabindranath León

Definition in file Backtracking.H.