AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
exhaustive_ao.h
1#ifndef PROBFD_ALGORITHMS_EXHAUSTIVE_AO_H
2#define PROBFD_ALGORITHMS_EXHAUSTIVE_AO_H
3
4#include "probfd/algorithms/ao_search.h"
5
6// Forward Declarations
7namespace probfd::algorithms {
8template <typename>
9class OpenList;
10}
11
14
15namespace internal {
16
17template <typename Action, bool UseInterval>
18struct PerStateInformation
19 : public ao_search::PerStateInformation<Action, UseInterval, false> {
20 unsigned unsolved = 0;
21};
22
23} // namespace internal
24
41template <typename State, typename Action, bool UseInterval>
43 : public ao_search::AOBase<
44 State,
45 Action,
46 internal::PerStateInformation<Action, UseInterval>> {
47 using Base = typename ExhaustiveAOSearch::AOBase;
48
49 friend Base;
50
51 using MDPType = typename Base::MDPType;
52 using EvaluatorType = typename Base::EvaluatorType;
53 using PolicyPickerType = typename Base::PolicyPickerType;
54 using StateInfo = typename Base::StateInfo;
55
57
58 // Algorithm parameters
59 const std::shared_ptr<OpenListType> open_list_;
60
61 // Re-used buffers
62 std::vector<Transition<Action>> transitions_;
63
64public:
66 std::shared_ptr<PolicyPickerType> policy_chooser,
67 std::shared_ptr<OpenListType> open_list);
68
69protected:
70 Interval do_solve(
71 MDPType& mdp,
72 EvaluatorType& heuristic,
73 param_type<State> initial_state,
74 ProgressReport& progress,
75 double max_time) override;
76
77private:
78 bool update_value_check_solved(
79 MDPType& mdp,
81 std::vector<Transition<Action>> transitions,
82 StateInfo& info);
83};
84
85} // namespace probfd::algorithms::exhaustive_ao
86
87#define GUARD_INCLUDE_PROBFD_ALGORITHMS_EXHAUSTIVE_AO_H
88#include "probfd/algorithms/exhaustive_ao_impl.h"
89#undef GUARD_INCLUDE_PROBFD_ALGORITHMS_EXHAUSTIVE_AO_H
90
91#endif // PROBFD_ALGORITHMS_EXHAUSTIVE_AO_H
A registry for print functions related to search progress.
Definition progress_report.h:33
Base class for the AO* algorithm family.
Definition ao_search.h:85
Exhaustive AO* search algorithm.
Definition exhaustive_ao.h:46
I do not know this algorithm.
Definition exhaustive_ao.h:13
This namespace contains implementations of SSP search algorithms.
Definition acyclic_value_iteration.h:22
typename std::conditional_t< is_cheap_to_copy_v< T >, T, const T & > param_type
Alias template defining the best way to pass a parameter of a given type.
Definition type_traits.h:25
Represents a closed interval over the extended reals as a pair of lower and upper bound.
Definition interval.h:12