Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
State_Search.H
Go to the documentation of this file.
1/*
2 Aleph_w
3
4 Data structures & Algorithms
5 version 2.0.0b
6 https://github.com/lrleon/Aleph-w
7
8 This file is part of Aleph-w library
9
10 Copyright (c) 2002-2026 Leandro Rabindranath Leon
11
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice shall be included in all
20 copies or substantial portions of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 SOFTWARE.
29*/
30
46# ifndef STATE_SEARCH_H
47# define STATE_SEARCH_H
48
50#include <state_search_common.H>
51#include <Transposition_Table.H>
52#include <Backtracking.H>
53#include <Branch_And_Bound.H>
54#include <Negamax.H>
55#include <Alpha_Beta.H>
57
58namespace Aleph {
59
80namespace Search {
81
82inline constexpr size_t Unlimited = Search_Unlimited;
83
95
105
106template <typename Domain>
108
109template <typename Domain, typename ObjectivePolicy = Maximize_Objective<typename Domain::Objective>>
111
112template <typename Domain>
114
115template <typename Domain>
117
118template <IDAStarDomain Domain>
120
121template <AdversarialScore Score>
123
124template <SearchMove Move, AdversarialScore Score>
126
127template <SearchMove Move, AdversarialScore Score>
129
130template <SearchMove Move, AdversarialScore Score>
132
133template <typename Solution>
135
136template <typename StateKey,
137 SearchMove Move,
138 AdversarialScore Score,
139 template <typename, typename, class> class HashMapTable = MapOLhash,
142
150
151} // end namespace Search
152
153} // end namespace Aleph
154
155# endif // STATE_SEARCH_H
Alpha-Beta pruning over the adversarial-search contract.
Minimal depth-first backtracking engine for implicit state spaces.
Reusable branch-and-bound engine for implicit optimization spaces.
Negamax search for two-player zero-sum turn-based games.
IDA* (Iterative Deepening A*) over implicit state spaces.
Generic memoization / transposition-table support for state search.
Collector that stores trace events in an Aleph list.
Definition Negamax.H:273
Adversarial search engine with Alpha-Beta pruning.
Definition Alpha_Beta.H:71
Tracks the best solution seen so far according to a comparator.
Reusable branch-and-bound engine over implicit state spaces.
Recursive depth-first backtracking over an implicit state space.
IDA* engine for implicit state spaces with an admissible heuristic.
Pure Negamax search over an implicit game tree.
Definition Negamax.H:840
Collector that stores accepted solutions in an Aleph list.
Transposition-table container built on top of Aleph hash maps.
Score type accepted by adversarial search engines.
Definition Negamax.H:70
Minimal requirement for search moves.
Concept for callbacks invoked on each accepted solution.
User-facing facade exported by the umbrella search header.
constexpr size_t Unlimited
Alias for Search_Unlimited.
Main namespace for Aleph-w library functions.
Definition ah-arena.H:89
auto ida_star_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy={}, SearchLimits limits={})
Convenience wrapper for a one-shot IDA* search.
constexpr size_t Search_Unlimited
Sentinel used by SearchLimits to mean "no bound".
SearchStatus
Final state of a search execution.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
auto iterative_deepening_alpha_beta_search(Domain domain, typename Domain::State initial_state, Tracer &tracer, ExplorationPolicy policy=Alpha_Beta< Domain >::default_policy(), SearchLimits limits={}, AdversarialIterativeDeepeningOptions< typename Domain::Score > options={})
Iterative deepening over Alpha-Beta with optional aspiration windows.
Definition Alpha_Beta.H:882
auto iterative_deepening_negamax_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy=Negamax< Domain >::default_policy(), SearchLimits limits={}, AdversarialIterativeDeepeningOptions< typename Domain::Score > options={})
Iterative deepening over Negamax without transposition table.
Definition Negamax.H:1317
auto branch_and_bound_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy=Branch_And_Bound< Domain, ObjectivePolicy >::default_policy(), SearchLimits limits={}, ObjectivePolicy objective={})
Convenience wrapper for one-shot branch and bound.
auto alpha_beta_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy=Alpha_Beta< Domain >::default_policy(), SearchLimits limits={})
Convenience wrapper for one-shot Alpha-Beta search.
Definition Alpha_Beta.H:797
AdversarialTraceEventKind
Trace event kinds emitted by adversarial search engines.
Definition Negamax.H:209
MoveOrderingMode
Built-in move-ordering modes supported by the framework.
auto backtracking_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy={}, SearchLimits limits={})
Convenience wrapper that runs a one-shot DFS/backtracking search.
auto negamax_search(Domain domain, typename Domain::State initial_state, ExplorationPolicy policy=Negamax< Domain >::default_policy(), SearchLimits limits={})
Convenience wrapper for one-shot Negamax search.
Definition Negamax.H:1233
Shared support for configurable successor ordering heuristics.
Common infrastructure for implicit state-space search.
Controls for adversarial iterative deepening.
Definition Negamax.H:329
Aggregate result of adversarial iterative deepening.
Definition Negamax.H:351
Result of one adversarial search execution.
Definition Negamax.H:167
One trace event produced by an adversarial search.
Definition Negamax.H:226
Aspiration-window configuration for iterative deepening.
Definition Negamax.H:315
Exploration controls shared across engines.
Open addressing hash map using linear probing.
Objective policy for maximization problems.
Objective policy for minimization problems.
Snapshot of a complete optimization solution.
Hard bounds applied by the search engine.
Aggregates the outcome of one search execution.
Snapshot of a concrete solution encountered during the traversal.
Counters collected during a search run.