AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
state_space.h
1#ifndef PROBFD_STATE_SPACE_H
2#define PROBFD_STATE_SPACE_H
3
4#include "probfd/type_traits.h"
5#include "probfd/types.h"
6
7#include <vector>
8
9// Forward Declarations
10namespace probfd {
11template <typename>
12class Distribution;
13template <typename>
14struct Transition;
15} // namespace probfd
16
17namespace probfd {
18
43template <typename State, typename Action>
45protected:
46 using TransitionType = Transition<Action>;
47
48public:
49 virtual ~StateSpace() = default;
50
55
59 virtual State get_state(StateID state_id) = 0;
60
66 std::vector<Action>& result) = 0;
67
73 param_type<Action> action,
74 Distribution<StateID>& result) = 0;
75
82 std::vector<Action>& aops,
83 std::vector<Distribution<StateID>>& successors) = 0;
84
91 std::vector<TransitionType>& transitions) = 0;
92};
93
94} // namespace probfd
95
96#endif
A convenience class that represents a finite probability distribution.
Definition task_state_space.h:27
An interface representing a Markov Decision Process (MDP) without objective function.
Definition state_space.h:44
virtual void generate_all_transitions(param_type< State > state, std::vector< Action > &aops, std::vector< Distribution< StateID > > &successors)=0
Generates all applicable actions and their corresponding successor distributions for a given state.
virtual State get_state(StateID state_id)=0
Get the state mapped to a given state ID.
virtual void generate_applicable_actions(param_type< State > state, std::vector< Action > &result)=0
Generates the applicable actions of the state.
virtual StateID get_state_id(param_type< State > state)=0
Get the state ID for a given state.
virtual void generate_action_transitions(param_type< State > state, param_type< Action > action, Distribution< StateID > &result)=0
Generates the successor distribution for a given state and action.
virtual void generate_all_transitions(param_type< State > state, std::vector< TransitionType > &transitions)=0
Generates all applicable actions and their corresponding successor distributions for a given state.
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
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
A StateID represents a state within a StateIDMap. Just like Fast Downward's StateID type,...
Definition types.h:22