32 #define DEBUG_TOICompactRewardDecPOMDPDiscrete 0
36 string name,
string descr,
string pf) :
38 _m_nrTwoAgentStates(2,0),
39 _m_nrTwoAgentActions(2,0)
47 throw(
E(
"TOICompactRewardDecPOMDPDiscrete: copy ctor not yet implemented"));
58 TOICompactRewardDecPOMDPDiscrete::operator=
61 if (
this == &o)
return *
this;
64 throw(
E(
"TOICompactRewardDecPOMDPDiscrete: assignment not yet implemented"));
82 throw E(
"TOICompactRewardDecPOMDPDiscrete::SetInitialized(true) : no reward models specified yet!");
86 throw E(
"TOICompactRewardDecPOMDPDiscrete::SetInitialized(true) : no reward model specified yet! ( _m_p_rModels[i] == 0 )");
91 throw E(
"TOICompactRewardDecPOMDPDiscrete::SetInitialized(true) : all agents are required to have the same state space (same number of individual states)");
94 for(
Index i=0;i!=2;++i)
114 const std::vector<Index> &indSIs,
115 const std::vector<Index> &indAIs)
const
129 vector<Index> indexVec(2,0);
135 if(indexVec[0]!=indexVec[1] &&
137 cout <<
"adding i " << indexVec[0]
138 <<
" si " << indSIs[indexVec[0]]
140 <<
" j " << indexVec[1]
141 <<
" sj " << indSIs[indexVec[1]]
145 indSIs,indAIs) << endl;
147 if(indexVec[0]!=indexVec[1])
167 #if DEBUG_TOICompactRewardDecPOMDPDiscrete
168 cout <<
"GetReward(" << sI <<
"," << jaI <<
") = " << reward << endl;
176 const vector<Index> &indSIs,
177 const vector<Index> &indAIs)
const
179 vector<Index> sIs(2,0), aIs(2,0);
181 sIs[0]=indSIs[i]; aIs[0]=indAIs[i];
182 sIs[1]=indSIs[j]; aIs[1]=indAIs[j];
198 <<
" i " << i <<
" j " << j << endl;
217 #if DEBUG_TOICompactRewardDecPOMDPDiscrete
218 cout <<
"GetIndividualReward[" << agentID <<
"](" << indSI <<
"," << indAI
219 <<
") = " << reward << endl;
231 ss <<
"Reward models: " << endl;
234 ss <<
"Individual rewards for agent " << i << endl;
239 throw E(
"TOICompactRewardDecPOMDPDiscrete components (reward model) not initialized");