MultiAgentDecisionProcess  Release 0.2.1
RewardModelTOISparse Class Reference

RewardModelTOISparse represents a discrete reward model based on vectors of states and actions.. More...

#include <RewardModelTOISparse.h>

+ Collaboration diagram for RewardModelTOISparse:

Public Member Functions

double Get (const std::vector< Index > &sIs, const std::vector< Index > &aIs) const
 Returns R(s,ja)
void Print () const
 Print this to cout.
 RewardModelTOISparse (std::string s_str="s", std::string ja_str="ja")
 default Constructor nrS - number of states nrJA - number of joint actions s_str - how to call a state (For example you can use this class to create a mapping from observation histories and ja's to reals.
void Set (const std::vector< Index > &sIs, const std::vector< Index > &aIs, double reward)
 Sets R(s_i,ja_i)
std::string SoftPrint () const
 Prints a description of this to a string.
 ~RewardModelTOISparse ()
 Copy constructor.

Private Attributes

std::string _m_ja_str
std::map< std::pair
< std::vector< Index >
, std::vector< Index >
>, double > 
_m_R
std::string _m_s_str

Detailed Description

RewardModelTOISparse represents a discrete reward model based on vectors of states and actions..

Definition at line 38 of file RewardModelTOISparse.h.

Constructor & Destructor Documentation

RewardModelTOISparse::RewardModelTOISparse ( std::string  s_str = "s",
std::string  ja_str = "ja" 
)

default Constructor nrS - number of states nrJA - number of joint actions s_str - how to call a state (For example you can use this class to create a mapping from observation histories and ja's to reals.

Then this argument could be "joh") ja_str - idem for the joint actions

Definition at line 32 of file RewardModelTOISparse.cpp.

RewardModelTOISparse::~RewardModelTOISparse ( )

Copy constructor.

Destructor.

Definition at line 39 of file RewardModelTOISparse.cpp.

Member Function Documentation

double RewardModelTOISparse::Get ( const std::vector< Index > &  sIs,
const std::vector< Index > &  aIs 
) const
void RewardModelTOISparse::Print ( ) const
inline

Print this to cout.

Definition at line 91 of file RewardModelTOISparse.h.

References SoftPrint().

void RewardModelTOISparse::Set ( const std::vector< Index > &  sIs,
const std::vector< Index > &  aIs,
double  reward 
)

Sets R(s_i,ja_i)

Index ja_i, Index s_i, are indices of the state and taken joint action. r is the reward. The order of events is s, ja, so is the arg. list.

Definition at line 52 of file RewardModelTOISparse.cpp.

References RGet_RewardModelMappingSparse::_m_R.

Referenced by TOIDecPOMDPDiscrete::SetReward().

string RewardModelTOISparse::SoftPrint ( ) const

Prints a description of this to a string.

Definition at line 59 of file RewardModelTOISparse.cpp.

References RGet_RewardModelMappingSparse::Get().

Referenced by Print(), and TOIDecPOMDPDiscrete::SoftPrint().

Member Data Documentation

std::string RewardModelTOISparse::_m_ja_str
private

Definition at line 43 of file RewardModelTOISparse.h.

std::map<std::pair<std::vector<Index>, std::vector<Index> >, double> RewardModelTOISparse::_m_R
private

Definition at line 47 of file RewardModelTOISparse.h.

std::string RewardModelTOISparse::_m_s_str
private

Definition at line 42 of file RewardModelTOISparse.h.


The documentation for this class was generated from the following files: