MultiAgentDecisionProcess  Release 0.2.1
BGforStageCreation Class Reference

BGforStageCreation is a class that provides some functions to aid the construction of Bayesian games for a stage of a Dec-POMDP. More...

#include <BGforStageCreation.h>

Public Member Functions

virtual ~BGforStageCreation ()
 Calculates the jaohI corresponding to jaI_arr and joI_arr and also returnes the P(jaohI) and the expected obtained reward for previous time steps GIVEN this joint action history.

Protected Member Functions

void Fill_FirstOHtsI (const PlanningUnitMADPDiscrete *pu, Index ts, std::vector< Index > &firstOHtsI)
 Extends a previous policy jpolPrevTs to the next stage.
void Fill_jaI_Array (const PlanningUnitMADPDiscrete *pu, Index ts, Index joIs[], const JointPolicyDiscretePure *jpolPrevTs, Index *jaI_arr)
 Gets the joint observation history from joI_Array.
void Fill_joI_Array (const PlanningUnitMADPDiscrete *pu, const Index ts, const std::vector< Index > &indTypes, const std::vector< Index > &firstOHtsI, Index *joI_arr)
 Fills the array of joint observation given the individual types and offsets (firstOHtsI).

Detailed Description

BGforStageCreation is a class that provides some functions to aid the construction of Bayesian games for a stage of a Dec-POMDP.

this is a dummy class that only contains static functions. (but by inheriting from this, derived classes can use these functions)

Definition at line 43 of file BGforStageCreation.h.

Constructor & Destructor Documentation

virtual BGforStageCreation::~BGforStageCreation ( )
inlinevirtual

Calculates the jaohI corresponding to jaI_arr and joI_arr and also returnes the P(jaohI) and the expected obtained reward for previous time steps GIVEN this joint action history.

input args Index ts, Index jtI, Index* jaI_arr,Index* joI_arr, output args Index& jaohI, double& PjaohI, double& ExpR_0_prevTS_thisJAOH

Destructor.

Definition at line 118 of file BGforStageCreation.h.

Member Function Documentation

void BGforStageCreation::Fill_FirstOHtsI ( const PlanningUnitMADPDiscrete pu,
Index  ts,
std::vector< Index > &  firstOHtsI 
)
protected

Extends a previous policy jpolPrevTs to the next stage.

This function extends a previous policy jpolPrevTs for ts-1 with the behavior specified by the policy of the BayesianGame for time step ts (jpolBG). jpolPrevTs - a joint policy for the DecPOMDP up to time step ts-1 (i.e. with depth=ts-2) jpolBG - a joint policy for the BayesianGame for time step ts. nrOHts - a vector that specifies the number of observation histories for eac agents at time step ts. firstOHtsI - a vector that specifies the index of the first time step ts observation history for each agent (this functions as the offset in the conversion BG->DecPOMDP index conversion).

returns a new JointPolicyDiscretePure (so it must be explicitly deleted) PartialJointPolicyDiscretePure* ConstructExtendedPolicy( PartialJointPolicyDiscretePure & jpolPrevTs , JointPolicyDiscretePure& jpolBG , std::vector<size_t>& nrOHts , std::vector<Index>& firstOHtsI);Fills the (empty) vector firstOHtsI, with the indices (for each agent) of the first observation history of time step ts.

Definition at line 59 of file BGforStageCreation.cpp.

References PlanningUnitMADPDiscrete::GetFirstObservationHistoryIndex(), and PlanningUnitMADPDiscrete::GetNrAgents().

void BGforStageCreation::Fill_jaI_Array ( const PlanningUnitMADPDiscrete pu,
Index  ts,
Index  joIs[],
const JointPolicyDiscretePure jpolPrevTs,
Index *  jaI_arr 
)
protected

Gets the joint observation history from joI_Array.

Fills the array jaI_arr with the joint actions taken for the JOHs as specified by the array of joint observations joIs according to jpolPrevTs.

Definition at line 204 of file BGforStageCreation.cpp.

References JointPolicyDiscretePure::GetJointActionIndex(), and PlanningUnitMADPDiscrete::GetSuccessorJOHI().

void BGforStageCreation::Fill_joI_Array ( const PlanningUnitMADPDiscrete pu,
const Index  ts,
const std::vector< Index > &  indTypes,
const std::vector< Index > &  firstOHtsI,
Index *  joI_arr 
)
protected

Fills the array of joint observation given the individual types and offsets (firstOHtsI).

Definition at line 117 of file BGforStageCreation.cpp.

References PlanningUnitMADPDiscrete::GetNrAgents(), PlanningUnitMADPDiscrete::GetObservationHistoryArrays(), and PlanningUnitMADPDiscrete::IndividualToJointObservationIndices().


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