Class sdm::TabularReward

Class List > sdm > TabularReward

This class provide a way to represent the reward model with a tabular representation.

  • #include <tabular_reward.hpp>

Inherits the following classes: sdm::RewardInterface

Public Types

Type Name
typedef MappedMatrix< std::shared_ptr< State >, std::shared_ptr< Action >, value_type > matrix_type
typedef double value_type

Public Functions

Type Name
TabularReward ()
TabularReward (const TabularReward & copy)
virtual double getMaxReward (number t=0) const
virtual double getMinReward (number t=0) const
virtual double getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t=0) const
void initReward (number num_states, number num_actions)
void setReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & acction, double reward, number t=0)
virtual ~TabularReward ()

Public Functions inherited from sdm::RewardInterface

See sdm::RewardInterface

Type Name
virtual double getMaxReward (number t) const = 0
virtual double getMinReward (number t) const = 0
virtual double getReward (const std::shared_ptr< State > & state, const std::shared_ptr< Action > & action, number t) const = 0

Protected Attributes

Type Name
double max = = -std::numeric_limits<value_type>::max()
double min = = std::numeric_limits<value_type>::max()
matrix_type rewards_
model of the outcomes of the entire team of collaborative agents involved in the system.

Public Types Documentation

typedef matrix_type

using sdm::TabularReward::matrix_type =  MappedMatrix<std::shared_ptr<State>, std::shared_ptr<Action>, value_type>;

typedef value_type

using sdm::TabularReward::value_type =  double;

Public Functions Documentation

function TabularReward [1/2]

sdm::TabularReward::TabularReward () 

function TabularReward [2/2]

sdm::TabularReward::TabularReward (
    const TabularReward & copy
) 

function getMaxReward

virtual double sdm::TabularReward::getMaxReward (
    number t=0
) const

Implements sdm::RewardInterface::getMaxReward

function getMinReward

virtual double sdm::TabularReward::getMinReward (
    number t=0
) const

Implements sdm::RewardInterface::getMinReward

function getReward

virtual double sdm::TabularReward::getReward (
    const std::shared_ptr< State > & state,
    const std::shared_ptr< Action > & action,
    number t=0
) const

Implements sdm::RewardInterface::getReward

function initReward

void sdm::TabularReward::initReward (
    number num_states,
    number num_actions
) 

function setReward

void sdm::TabularReward::setReward (
    const std::shared_ptr< State > & state,
    const std::shared_ptr< Action > & acction,
    double reward,
    number t=0
) 

function ~TabularReward

virtual sdm::TabularReward::~TabularReward () 

Protected Attributes Documentation

variable max

double sdm::TabularReward::max;

variable min

double sdm::TabularReward::min;

variable rewards_

matrix_type sdm::TabularReward::rewards_;

Friends Documentation

friend operator<<

inline friend std::ostream & sdm::TabularReward::operator<< (
    std::ostream & os,
    const TabularReward & reward_fct
) 

The documentation for this class was generated from the following file src/sdm/core/reward/tabular_reward.hpp