Example #1
0
AlphaVector::BGPolicyIndex
AgentBG::GetMaximizingBGIndex(const JointBeliefInterface &jb) const
{
    double v=-DBL_MAX,q;
    AlphaVector::BGPolicyIndex bI,betaMaxI=INT_MAX;

    for(Index a=0;a!=GetPU()->GetNrJointActions();++a)
    {
        q=_m_QBGstationary->GetQ(jb,a,bI);

        if(q>v)
        {
            v=q;
            betaMaxI=bI;
        }
    }

#if DEBUG_AgentBG
    cout << "GetMaximizingBGIndex " << GetIndex() << ": betaMaxI " << betaMaxI 
         << " " << jb.SoftPrint() << endl;
#endif
    return(betaMaxI);
}