AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
probfd::CompositeMDP< State, Action > Struct Template Reference

#include "probfd/mdp.h"

Inheritance diagram for probfd::CompositeMDP< State, Action >:
[legend]

Description

template<typename State, typename Action>
struct probfd::CompositeMDP< State, Action >

Composes a state space and a cost function to an MDP.

Template Parameters
State- The state type of the MDP.
Action- The action type of the MDP.

Public Member Functions

StateID get_state_id (param_type< State > state) final
 Get the state ID for a given state.
 
State get_state (StateID state_id) final
 Get the state mapped to a given state ID.
 
void generate_applicable_actions (param_type< State > state, std::vector< Action > &result) final
 Generates the applicable actions of the state.
 
void generate_action_transitions (param_type< State > state, param_type< Action > action, Distribution< StateID > &result) final
 Generates the successor distribution for a given state and action.
 
void generate_all_transitions (param_type< State > state, std::vector< Action > &aops, std::vector< Distribution< StateID > > &successors) final
 Generates all applicable actions and their corresponding successor distributions for a given state.
 
virtual void generate_all_transitions (param_type< State > state, std::vector< TransitionType > &transitions) final
 Generates all applicable actions and their corresponding successor distributions for a given state.
 
TerminationInfo get_termination_info (param_type< State > state) final
 Returns the cost to terminate in a given state and checks whether a state is a goal.
 
value_t get_action_cost (param_type< Action > action) final
 Gets the action cost of a state-action.
 

Member Function Documentation

◆ get_state_id()

template<typename State , typename Action >
StateID probfd::CompositeMDP< State, Action >::get_state_id ( param_type< State > state)
inlinefinalvirtual

Get the state ID for a given state.

Implements probfd::StateSpace< State, Action >.

◆ get_state()

template<typename State , typename Action >
State probfd::CompositeMDP< State, Action >::get_state ( StateID state_id)
inlinefinalvirtual

Get the state mapped to a given state ID.

Implements probfd::StateSpace< State, Action >.

◆ generate_applicable_actions()

template<typename State , typename Action >
void probfd::CompositeMDP< State, Action >::generate_applicable_actions ( param_type< State > state,
std::vector< Action > & result )
inlinefinalvirtual

Generates the applicable actions of the state.

Implements probfd::StateSpace< State, Action >.

◆ generate_action_transitions()

template<typename State , typename Action >
void probfd::CompositeMDP< State, Action >::generate_action_transitions ( param_type< State > state,
param_type< Action > action,
Distribution< StateID > & result )
inlinefinalvirtual

Generates the successor distribution for a given state and action.

Implements probfd::StateSpace< State, Action >.

◆ generate_all_transitions() [1/2]

template<typename State , typename Action >
void probfd::CompositeMDP< State, Action >::generate_all_transitions ( param_type< State > state,
std::vector< Action > & aops,
std::vector< Distribution< StateID > > & successors )
inlinefinalvirtual

Generates all applicable actions and their corresponding successor distributions for a given state.

Implements probfd::StateSpace< State, Action >.

◆ generate_all_transitions() [2/2]

template<typename State , typename Action >
virtual void probfd::CompositeMDP< State, Action >::generate_all_transitions ( param_type< State > state,
std::vector< TransitionType > & transitions )
inlinefinalvirtual

Generates all applicable actions and their corresponding successor distributions for a given state.

Implements probfd::StateSpace< State, Action >.

◆ get_termination_info()

template<typename State , typename Action >
TerminationInfo probfd::CompositeMDP< State, Action >::get_termination_info ( param_type< State > state)
inlinefinalvirtual

Returns the cost to terminate in a given state and checks whether a state is a goal.

See also
TerminationInfo

Implements probfd::CostFunction< State, Action >.

◆ get_action_cost()

template<typename State , typename Action >
value_t probfd::CompositeMDP< State, Action >::get_action_cost ( param_type< Action > action)
inlinefinalvirtual

Gets the action cost of a state-action.

Implements probfd::CostFunction< State, Action >.