ValueFunctionPOMDPDiscrete
AlphaVectorPlanning::QFunctionsToValueFunction(const 
                                               QFunctionsDiscrete &Q)
{
    ValueFunctionPOMDPDiscrete V;
    for(QFDcit i=Q.begin();i!=Q.end();++i)
        for(VFPDcit j=i->begin();j!=i->end();++j)
            V.push_back(*j);
    
    return(V);
}
Esempio n. 2
0
double BeliefValue::GetValue(const BeliefInterface &Belief,
                             const QFunctionsDiscrete &Q)
{
    double x,maxVal=-DBL_MAX;

    for(QFDcit i=Q.begin();i!=Q.end();++i)
    {
        x=GetValue(Belief,*i);
        if(x>maxVal)
            maxVal=x;
    }

    return(maxVal);    
}
Esempio n. 3
0
vector<double> BeliefValue::GetValues(const BeliefSet &Beliefs,
                                      const QFunctionsDiscrete &Q)
{
    vector<double> values(Beliefs.size()),
        maxValues(Beliefs.size(),-DBL_MAX);
    for(QFDcit i=Q.begin();i!=Q.end();++i)
    {
        values=GetValues(Beliefs,*i);
        for(unsigned int j=0;j!=values.size();++j)
            if(values[j]>maxValues[j])
                maxValues[j]=values[j];
    }

    return(maxValues);
}