MultiAgentDecisionProcess  Release 0.2.1
POSG Class Reference

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

#include <POSG.h>

+ Inheritance diagram for POSG:
+ Collaboration diagram for POSG:

Public Member Functions

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

Private Attributes

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

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.

Definition at line 46 of file POSG.h.

Constructor & Destructor Documentation

POSG::POSG ( )

Definition at line 32 of file POSG.cpp.

Member Function Documentation

double POSG::GetDiscount ( Index  agentI) const
inline

Returns the discount parameter for agent agentI.

Definition at line 82 of file POSG.h.

References _m_discount.

reward_t POSG::GetRewardType ( Index  agentI) const
inline

Returns the reward type.

Definition at line 87 of file POSG.h.

References _m_rewardType.

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

Sets the discount parameter of agentI to d.

Definition at line 43 of file POSG.cpp.

bool POSG::SetInitialized ( bool  b)

changed initialized status

Reimplemented in POSGDiscrete.

Definition at line 69 of file POSG.cpp.

void POSG::SetNrAgents ( size_t  nrAgents)

Sets the number of agents.

Definition at line 83 of file POSG.cpp.

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.

Definition at line 61 of file POSG.cpp.

References Globals::REWARD.

string POSG::SoftPrint ( ) const

SoftPrints some information on the POSG.

Reimplemented in POSGDiscrete.

Definition at line 51 of file POSG.cpp.

References PrintTools::SoftPrintVector().

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).

Definition at line 62 of file POSG.h.

Referenced by GetDiscount().

bool POSG::_m_initialized
private

is this initialized?

Definition at line 51 of file POSG.h.

size_t POSG::_m_nrAgents
private

the number of agents

Definition at line 53 of file POSG.h.

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

Do the agents get rewards or costs?

Definition at line 64 of file POSG.h.

Referenced by GetRewardType().


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