AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
quotient_max_heuristic.h
1#ifndef PROBFD_QUOTIENT_SYSTEM_HEURISTIC_SEARCH_INTERFACE_H
2#define PROBFD_QUOTIENT_SYSTEM_HEURISTIC_SEARCH_INTERFACE_H
3
4#include "probfd/algorithms/fdr_types.h"
5#include "probfd/algorithms/open_list.h"
6#include "probfd/algorithms/policy_picker.h"
7#include "probfd/algorithms/successor_sampler.h"
8
9#include "probfd/quotients/quotient_system.h"
10
11#include "probfd/evaluator.h"
12
13namespace probfd::quotients {
14
15template <typename State, typename Action>
16class QuotientMaxHeuristic : public Evaluator<QuotientState<State, Action>> {
17 using QState = QuotientState<State, Action>;
18
19 const Evaluator<State>& original_;
20
21public:
22 explicit QuotientMaxHeuristic(const Evaluator<State>& original)
23 : original_(original)
24 {
25 }
26
27 value_t evaluate(param_type<QState> state) const override
28 {
29 return state.member_maximum(
30 std::bind_front(&Evaluator<State>::evaluate, std::ref(original_)));
31 }
32
33 void print_statistics() const final { original_.print_statistics(); }
34};
35
36} // namespace probfd::quotients
37
38#endif // PROBFD_QUOTIENT_SYSTEM_HEURISTIC_SEARCH_INTERFACE_H
double value_t
Typedef for the state value type.
Definition aliases.h:7
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