AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
projection_state_space.h
1#ifndef PROBFD_PDBS_PROJECTION_STATE_SPACE_H
2#define PROBFD_PDBS_PROJECTION_STATE_SPACE_H
3
4#include "probfd/pdbs/match_tree.h"
5#include "probfd/pdbs/types.h"
6
7#include "probfd/fdr_types.h"
8#include "probfd/mdp.h"
9
10#include <limits>
11#include <vector>
12
13namespace probfd {
14template <typename>
15class Distribution;
16class ProbabilisticTaskProxy;
17} // namespace probfd
18
19namespace probfd::pdbs {
20class ProjectionOperator;
21class StateRankingFunction;
22} // namespace probfd::pdbs
23
24namespace probfd::pdbs {
25
29 : public SimpleMDP<StateRank, const ProjectionOperator*> {
30 MatchTree match_tree_;
31 std::shared_ptr<FDRSimpleCostFunction> parent_cost_function_;
32 std::vector<bool> goal_state_flags_;
33
34public:
36 ProbabilisticTaskProxy task_proxy,
37 std::shared_ptr<FDRSimpleCostFunction> task_cost_function,
38 const StateRankingFunction& ranking_function,
39 bool operator_pruning = true,
40 double max_time = std::numeric_limits<double>::infinity());
41
42 StateID get_state_id(StateRank state) override;
43
44 StateRank get_state(StateID id) override;
45
46 void generate_applicable_actions(
47 StateRank state,
48 std::vector<const ProjectionOperator*>& aops) override;
49
50 void generate_action_transitions(
51 StateRank state,
52 const ProjectionOperator* op,
53 Distribution<StateID>& result) override;
54
55 void generate_all_transitions(
56 StateRank state,
57 std::vector<const ProjectionOperator*>& aops,
58 std::vector<Distribution<StateID>>& result) override;
59
60 void generate_all_transitions(
61 StateRank state,
62 std::vector<TransitionType>& transitions) override;
63
64 [[nodiscard]]
65 bool is_goal(StateRank state) const override;
66
67 [[nodiscard]]
68 value_t get_non_goal_termination_cost() const override;
69
70 value_t get_action_cost(const ProjectionOperator* op) override;
71};
72
73} // namespace probfd::pdbs
74
75#endif // PROBFD_PDBS_PROJECTION_STATE_SPACE_H
A convenience class that represents a finite probability distribution.
Definition task_state_space.h:27
Proxy class used to inspect a probabilistic planning task.
Definition task_proxy.h:194
Basic interface for MDPs.
Definition mdp.h:27
Applicable actions generator for projections.
Definition match_tree.h:33
Represents an operator of a projection state space.
Definition projection_operator.h:18
Represents the state space of a projection of a probabilistic planning task.
Definition projection_state_space.h:29
StateRank get_state(StateID id) override
Get the state mapped to a given state ID.
Implements the state ranking function for abstract states of projections.
Definition state_ranking_function.h:24
Namespace dedicated to probabilistic pattern databases.
Definition gzocp_heuristic.h:16
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
double value_t
Typedef for the state value type.
Definition aliases.h:7
A StateID represents a state within a StateIDMap. Just like Fast Downward's StateID type,...
Definition types.h:22