Class sdm::StochasticDecisionRule
Class List > sdm > StochasticDecisionRule
The stochastic decision rule class. This class is a function that maps generic states distribution over generic actions. More...
#include <stochastic_decision_rule.hpp>
Inherits the following classes: sdm::DecisionRule, sdm::RecursiveMap
Public Types
Type | Name |
---|---|
typedef typename DecisionRule::input_type | input_type |
typedef typename DecisionRule::output_type | output_type |
Public Types inherited from sdm::Function
See sdm::Function
Type | Name |
---|---|
typedef TInput | input_type |
typedef TOutput | output_type |
Public Functions
Type | Name |
---|---|
StochasticDecisionRule () | |
virtual std::shared_ptr< Action > | act (const std::shared_ptr< State > & s) const Get the action deducted from a given state. |
virtual bool | elementExist (const std::shared_ptr< State > & joint_state) |
RecursiveMap< std::shared_ptr< Action >, double > | getProbabilities (const std::shared_ptr< State > & state) const Apply the DetDecisionRule function (similar to act or evenat ) |
virtual double | getProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action) const Get the probability of action 'action' in state 'state'. |
virtual void | setProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, double proba) Sets the probability of selecting action a when observing state s. |
virtual std::string | str () const |
Public Functions inherited from sdm::DecisionRule
Type | Name |
---|---|
virtual std::shared_ptr< Action > | act (const std::shared_ptr< State > & state) const = 0 Get the action deducted from a given state. |
virtual bool | elementExist (const std::shared_ptr< State > &) = 0 |
virtual double | getProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action) const = 0 Get the probability of action 'action' in state 'state'. |
virtual TypeAction | getTypeAction () const |
std::shared_ptr< Action > | operator() (const std::shared_ptr< State > & s) |
virtual void | setProbability (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, double proba) = 0 Sets the probability of selecting action a when observing state s. |
virtual std::string | str () const = 0 |
Public Functions inherited from sdm::Function
See sdm::Function
Type | Name |
---|---|
virtual output_type | operator() (const input_type &) = 0 |
virtual | ~Function () |
Detailed Description
Template parameters:
std::shared_ptr<State>
the state typestd::shared_ptr<Action>
the action type
Public Types Documentation
typedef input_type
using sdm::StochasticDecisionRule::input_type = typename DecisionRule::input_type;
typedef output_type
using sdm::StochasticDecisionRule::output_type = typename DecisionRule::output_type;
Public Functions Documentation
function StochasticDecisionRule
sdm::StochasticDecisionRule::StochasticDecisionRule ()
function act
virtual std::shared_ptr< Action > sdm::StochasticDecisionRule::act (
const std::shared_ptr< State > & s
) const
Parameters:
s
the generic state
Returns:
the corresponding action
Implements sdm::DecisionRule::act
function elementExist
virtual bool sdm::StochasticDecisionRule::elementExist (
const std::shared_ptr< State > & joint_state
)
Implements sdm::DecisionRule::elementExist
function getProbabilities
RecursiveMap < std::shared_ptr< Action >, double > sdm::StochasticDecisionRule::getProbabilities (
const std::shared_ptr< State > & state
) const
Parameters:
s
the generic state
Returns:
the corresponding action
function getProbability
virtual double sdm::StochasticDecisionRule::getProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action
) const
Parameters:
state
the stateaction
the actionproba
the probability
Implements sdm::DecisionRule::getProbability
function setProbability
virtual void sdm::StochasticDecisionRule::setProbability (
const std::shared_ptr< State > & state,
const std::shared_ptr< Action > & action,
double proba
)
Parameters:
state
the stateaction
the actionproba
the probability
Implements sdm::DecisionRule::setProbability
function str
virtual std::string sdm::StochasticDecisionRule::str () const
Implements sdm::DecisionRule::str
Friends Documentation
friend operator<<
inline friend std::ostream & sdm::StochasticDecisionRule::operator<< (
std::ostream & os,
const StochasticDecisionRule & stoch_decision_rule
)
The documentation for this class was generated from the following file src/sdm/core/action/stochastic_decision_rule.hpp