AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
policy_extraction.h
1#ifndef PROBFD_PDBS_POLICY_EXTRACTION_H
2#define PROBFD_PDBS_POLICY_EXTRACTION_H
3
4#include "probfd/multi_policy.h"
5#include "probfd/type_traits.h"
6#include "probfd/value_type.h"
7
8#include <memory>
9#include <span>
10
11namespace utils {
12class RandomNumberGenerator;
13}
14
15namespace probfd {
16template <typename, typename>
17class MDP;
18}
19
20namespace probfd {
21
29template <typename State, typename Action>
30std::unique_ptr<MultiPolicy<State, Action>> compute_optimal_projection_policy(
31 MDP<State, Action>& mdp,
32 std::span<const value_t> value_table,
33 param_type<State> initial_state,
34 utils::RandomNumberGenerator& rng,
35 bool wildcard);
36
45template <typename State, typename Action>
46std::unique_ptr<MultiPolicy<State, Action>> compute_greedy_projection_policy(
47 MDP<State, Action>& mdp,
48 std::span<const value_t> value_table,
49 param_type<State> initial_state,
50 utils::RandomNumberGenerator& rng,
51 bool wildcard);
52
53} // namespace probfd
54
55#define GUARD_INCLUDE_PROBFD_ABSTRACTIONS_POLICY_EXTRACTION_H
56#include "probfd/abstractions/policy_extraction_impl.h"
57#undef GUARD_INCLUDE_PROBFD_ABSTRACTIONS_POLICY_EXTRACTION_H
58
59#endif
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
std::unique_ptr< MultiPolicy< State, Action > > compute_greedy_projection_policy(MDP< State, Action > &mdp, std::span< const value_t > value_table, param_type< State > initial_state, utils::RandomNumberGenerator &rng, bool wildcard)
Extracts an abstract greedy policy from the value table, which may not be optimal if traps are existe...
Definition policy_extraction_impl.h:136
std::unique_ptr< MultiPolicy< State, Action > > compute_optimal_projection_policy(MDP< State, Action > &mdp, std::span< const value_t > value_table, param_type< State > initial_state, utils::RandomNumberGenerator &rng, bool wildcard)
Extract an abstract optimal policy from the value table.
Definition policy_extraction_impl.h:24
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