MultiAgentDecisionProcess  Release 0.2.1
BayesianGameForDecPOMDPStage.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _BAYESIANGAMEFORDECPOMDPSTAGE_H_
30 #define _BAYESIANGAMEFORDECPOMDPSTAGE_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
36 
44 
45 
48  //virtual
51 {
52  private:
53 
54 
55  protected:
56 
62  std::vector< JointBeliefInterface* > _m_JBs;
66  std::vector< std::vector<double> > _m_immR;
67 
69 
72  void Initialize();
73 
94  PartialJointPolicyDiscretePure & jpolPrevTs
95  , JointPolicyDiscretePure& jpolBG
96  , std::vector<size_t>& nrOHts
97  , std::vector<Index>& firstOHtsI);
98 
101  void Fill_FirstOHtsI(Index ts, std::vector<Index>& firstOHtsI);
104  void Fill_joI_Array(const Index ts, const std::vector<Index>& indTypes,
105  const std::vector<Index>& firstOHtsI, Index* joI_arr);
109  void Fill_jaI_Array(Index ts, Index joIs[],
110  const JointPolicyDiscretePure* jpolPrevTs, Index* jaI_arr);
122  void ProbRewardForjoahI(
123  Index ts, Index jtI, Index* jaI_arr, Index* joI_arr,
124  Index& jaohI, double& PjaohI, double& ExpR_0_prevTS_thisJAOH );
125 
127  double ComputeImmediateReward(Index jtI, Index jaI) const;
128 
130 
139  const QFunctionJAOHInterface* q,
140  Index t,
141  size_t nrAgents,
142  const std::vector<size_t>& nrActions,
143  const std::vector<size_t>& nrTypes
144  );
145  public:
146  // Constructor, destructor and copy assignment.
148 
153  const QFunctionJAOHInterface* q,
154  const PartialJointPolicyDiscretePure* pastJPol
155  );
156 
157  // Constructor, destructor and copy assignment.
161  );
168 
169  //operators:
170 
171  //data manipulation (set) functions:
172 
175  double GetImmediateReward(Index jtI, Index jaI) const
176  {
178  return _m_immR.at(jtI).at(jaI);
179  else
180  return ComputeImmediateReward(jtI, jaI);
181  };
189  {
190  _m_immR.clear();
192  }
196  JointPolicyDiscretePure* jpolBG) const;
197 
198 
199  //get (data) functions:
201  {return _m_pu;}
202 
205  std::string SoftPrint() const;
207  void Print() const
208  { std::cout << SoftPrint();}
209 };
210 
211 
212 #endif /* !_BAYESIANGAMEFORDECPOMDPSTAGE_H_ */
213 
214 // Local Variables: ***
215 // mode:c++ ***
216 // End: ***
217