MultiAgentDecisionProcess
Release 0.2.1
|
POSG is a simple implementation of POSGInterface. More...
#include <POSG.h>
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. | |
![]() | |
virtual POSGInterface * | Clone () 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. | |
![]() | |
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? |
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.
|
inline |
Returns the discount parameter for agent agentI.
Definition at line 82 of file POSG.h.
References _m_discount.
|
inline |
void POSG::SetDiscount | ( | Index | agentI, |
double | d | ||
) |
bool POSG::SetInitialized | ( | bool | b | ) |
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().
|
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().
|
private |
Do the agents get rewards or costs?
Definition at line 64 of file POSG.h.
Referenced by GetRewardType().