MultiAgentDecisionProcess
POSG Class Reference

POSG is a simple implementation of POSGInterface. More...

#include <POSG.h>

Inheritance diagram for POSG:
[legend]

Public Member Functions

double GetDiscount (Index agentI) const
 Returns the discount parameter for agent agentI. More...
 
reward_t GetRewardType (Index agentI) const
 Returns the reward type. More...
 
 POSG ()
 
void SetDiscount (Index agentI, double d)
 Sets the discount parameter of agentI to d. More...
 
bool SetInitialized (bool b)
 changed initialized status More...
 
void SetNrAgents (size_t nrAgents)
 Sets the number of agents. More...
 
void SetRewardType (Index agentI, reward_t r)
 Sets the reward type to reward_t r. More...
 
std::string SoftPrint () const
 SoftPrints some information on the POSG. More...
 
- Public Member Functions inherited from POSGInterface
virtual POSGInterfaceClone () const =0
 Returns a pointer to a copy of this class. More...
 
virtual double GetDiscountForAgent (Index agentI) const =0
 Returns the discount parameter. More...
 
virtual double GetRewardForAgent (Index agentI, State *s, JointAction *ja) const =0
 Function that returns the reward for a state and joint action. More...
 
virtual reward_t GetRewardTypeForAgent (Index agentI) const =0
 Returns the reward type. More...
 
virtual void SetDiscountForAgent (Index agentI, double d)=0
 Sets the discount parameter to 0 < d <= 1. More...
 
virtual void SetRewardForAgent (Index agentI, State *s, JointAction *ja, double r)=0
 Function that sets the reward for an agent, state and joint action. More...
 
virtual void SetRewardTypeForAgent (Index agentI, reward_t r)=0
 Sets the reward type to reward_t r. More...
 
virtual ~POSGInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessInterface
virtual const ScopeGetAllAgentScope () const =0
 
virtual size_t GetNrAgents () const =0
 Return the number of agents. More...
 
virtual std::string GetUnixName () const =0
 Returns the base part of the problem filename. More...
 
virtual ~MultiAgentDecisionProcessInterface ()
 Destructor. More...
 

Private Attributes

std::vector< double > _m_discount
 The discount parameter. More...
 
bool _m_initialized
 is this initialized? More...
 
size_t _m_nrAgents
 the number of agents More...
 
std::vector< reward_t_m_rewardType
 Do the agents get rewards or costs? More...
 

Detailed Description

POSG is a simple implementation of POSGInterface.

It defines a couple of functions that relate to the (types of) rewards and discount factors for each agent.

Conceptually an MultiAgentDecisionProcess that implements this interface, is a POSG: each agent his its own reward function.

Constructor & Destructor Documentation

POSG::POSG ( )

Member Function Documentation

double POSG::GetDiscount ( Index  agentI) const
inline

Returns the discount parameter for agent agentI.

reward_t POSG::GetRewardType ( Index  agentI) const
inline

Returns the reward type.

void POSG::SetDiscount ( Index  agentI,
double  d 
)

Sets the discount parameter of agentI to d.

bool POSG::SetInitialized ( bool  b)

changed initialized status

Referenced by POSGDiscrete::POSGDiscrete().

void POSG::SetNrAgents ( size_t  nrAgents)

Sets the number of agents.

References Globals::REWARD.

Referenced by POSGDiscrete::POSGDiscrete().

void POSG::SetRewardType ( Index  agentI,
reward_t  r 
)

Sets the reward type to reward_t r.

At the moment only REWARD is supported.

References Globals::REWARD.

string POSG::SoftPrint ( ) const

SoftPrints some information on the POSG.

References PrintTools::SoftPrintVector().

Referenced by POSGDiscrete::SoftPrint().

Member Data Documentation

std::vector<double> POSG::_m_discount
private

The discount parameter.

When agents have different interests (the POSG setting), they may also have different discount factors. For a POSG, however, we have one global discount factor (which typically is 1.0 in the finite horizon case).

bool POSG::_m_initialized
private

is this initialized?

size_t POSG::_m_nrAgents
private

the number of agents

std::vector<reward_t> POSG::_m_rewardType
private

Do the agents get rewards or costs?