MultiAgentDecisionProcess
|
FSAOHDist_NECOF is a class that represents a NEarly COmpletely Factored distribution over state factors and action-observation histories. More...
#include <FSAOHDist_NECOF.h>
Public Member Functions | |
virtual FactoredStateAOHDistribution * | Clone () const |
FSAOHDist_NECOF () | |
Constructor without arguments, needed for serialization. More... | |
FSAOHDist_NECOF (const PlanningUnitFactoredDecPOMDPDiscrete *p) | |
(default) Constructor More... | |
FSAOHDist_NECOF (const FSAOHDist_NECOF &a) | |
Copy constructor. More... | |
virtual double | GetAOHProb_relT (const Scope &agSc, const std::vector< Index > &aohI) const |
function that returns the prob. of the AOH of a subset of agents More... | |
virtual double | GetOHProb_relT (const Scope &agSc, const std::vector< Index > &ohI) const |
virtual double | GetXOHProb_relT (const Scope &sfSc, const std::vector< Index > &sfacI, const Scope &agSc, const std::vector< Index > &ohI) const |
returns P(sfacI, ohI) More... | |
virtual double | GetXOHProb_relT_SufficientSFscope (const Scope &sfSc, const std::vector< Index > &sfacI, const Scope &agSc, const std::vector< Index > &ohI) const |
returns P(sfacI, ohI) like GetXOHProb_relT. More... | |
virtual double | GetXProb (const Scope &sfSc, const std::vector< Index > &sfValI) const |
virtual void | InitializeFromISD (const FactoredStateDistribution *d) |
FSAOHDist_NECOF & | operator= (const FSAOHDist_NECOF &o) |
Copy assignment operator. More... | |
virtual void | SanityCheck () |
virtual std::string | SoftPrint () const |
virtual void | Update (const JointPolicyDiscretePure &pol) |
Performs an update of the distribution to the next stage. More... | |
virtual | ~FSAOHDist_NECOF () |
Destructor. More... | |
Public Member Functions inherited from FactoredStateAOHDistribution | |
virtual | ~FactoredStateAOHDistribution () |
Destructor. More... | |
Private Attributes | |
std::vector < CPDDiscreteInterface * > | _m_oHistConditional |
the conditional observation history probabilities More... | |
std::vector< std::vector < double > > | _m_oHistMarginals |
marginals of observation history probs for each agent More... | |
const PlanningUnitFactoredDecPOMDPDiscrete * | _m_puf |
FSDist_COF * | _m_sfacMarginals |
the maintained state factor marginals More... | |
std::vector< Scope > | _m_sfacSoI |
the state factors in the scope of influence for each agent('s obs.) More... | |
std::vector< size_t > | _m_sfacSoI_ii_size |
the number of influence instantiations for those scopes More... | |
Index | _m_stage |
The stage for which this distribution is. More... | |
std::vector< size_t * > | _m_stepsize |
the stepsize array (used to convert indiv<->joint indicies) is cached More... | |
FSAOHDist_NECOF is a class that represents a NEarly COmpletely Factored distribution over state factors and action-observation histories.
This class assumes that the observations of different agents are independent given a,s'. i.e., that
FSAOHDist_NECOF::FSAOHDist_NECOF | ( | ) |
Constructor without arguments, needed for serialization.
Referenced by Clone().
FSAOHDist_NECOF::FSAOHDist_NECOF | ( | const PlanningUnitFactoredDecPOMDPDiscrete * | p | ) |
(default) Constructor
References _m_oHistConditional, _m_puf, _m_sfacSoI, _m_sfacSoI_ii_size, _m_stepsize, IndexTools::CalculateStepSize(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::Get2DBN(), PlanningUnitFactoredDecPOMDPDiscrete::GetFDPOMDPD(), PlanningUnitMADPDiscrete::GetNrAgents(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::GetNrValuesPerFactor(), TwoStageDynamicBayesianNetwork::GetYSoI_O(), Scope::Insert(), IndexTools::RestrictIndividualIndicesToScope(), CPT::Set(), and VectorTools::VectorProduct().
FSAOHDist_NECOF::FSAOHDist_NECOF | ( | const FSAOHDist_NECOF & | a | ) |
Copy constructor.
References _m_puf, _m_sfacSoI, _m_stepsize, and PlanningUnitMADPDiscrete::GetNrAgents().
|
virtual |
Destructor.
References _m_oHistConditional, _m_sfacMarginals, and _m_stepsize.
|
inlinevirtual |
Implements FactoredStateAOHDistribution.
References FSAOHDist_NECOF().
|
inlinevirtual |
function that returns the prob. of the AOH of a subset of agents
this function takes
Note: relT indicates that the individual AOH indices are relative within the stage for which this distribution is.
Implements FactoredStateAOHDistribution.
|
virtual |
Implements FactoredStateAOHDistribution.
References _m_oHistMarginals.
|
virtual |
returns P(sfacI, ohI)
Implements FactoredStateAOHDistribution.
References _m_oHistConditional, _m_puf, _m_sfacSoI, _m_stepsize, PlanningUnitFactoredDecPOMDPDiscrete::GetFDPOMDPD(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::GetNrValuesPerFactor(), GetXProb(), IndexTools::Increment(), IndexTools::IndividualToJointIndicesStepSize(), Scope::Insert(), Scope::Remove(), IndexTools::RestrictIndividualIndicesToNarrowerScope(), and IndexTools::RestrictIndividualIndicesToScope().
|
virtual |
returns P(sfacI, ohI) like GetXOHProb_relT.
This version requires that sfSc is a superset of the scope of influence for all observations (of agents in agSc). I.e., this function will not perform any marginalization.
References _m_oHistConditional, _m_sfacSoI, _m_stepsize, GetXProb(), IndexTools::IndividualToJointIndicesStepSize(), and IndexTools::RestrictIndividualIndicesToNarrowerScope().
|
virtual |
Implements FactoredStateAOHDistribution.
References _m_sfacMarginals, and FSDist_COF::GetProbability().
Referenced by GetXOHProb_relT(), and GetXOHProb_relT_SufficientSFscope().
|
virtual |
Implements FactoredStateAOHDistribution.
References _m_sfacMarginals, and FactoredStateDistribution::Clone().
FSAOHDist_NECOF & FSAOHDist_NECOF::operator= | ( | const FSAOHDist_NECOF & | o | ) |
Copy assignment operator.
|
virtual |
Implements FactoredStateAOHDistribution.
References _m_oHistConditional, _m_oHistMarginals, _m_sfacMarginals, Globals::EqualProbability(), and FSDist_COF::SanityCheck().
Referenced by Update().
|
virtual |
References _m_oHistConditional, _m_oHistMarginals, _m_sfacMarginals, FSDist_COF::SoftPrint(), and PrintTools::SoftPrintVector().
Referenced by Update().
|
virtual |
Performs an update of the distribution to the next stage.
In particular this function computes the new
from the previous stage marginals.
Implements FactoredStateAOHDistribution.
References _m_oHistConditional, _m_oHistMarginals, _m_puf, _m_sfacMarginals, _m_sfacSoI_ii_size, _m_stage, _m_stepsize, Globals::CastLIndexToIndex(), Scope::Contains(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::Get2DBN(), JointPolicyDiscretePure::GetActionIndex(), TwoStageDynamicBayesianNetwork::GetASoI_O(), TwoStageDynamicBayesianNetwork::GetASoI_Y(), PlanningUnitFactoredDecPOMDPDiscrete::GetFDPOMDPD(), PlanningUnitMADPDiscrete::GetFirstObservationHistoryIndex(), PlanningUnitMADPDiscrete::GetNrActions(), PlanningUnitMADPDiscrete::GetNrAgents(), PlanningUnitMADPDiscrete::GetNrObservationHistories(), PlanningUnitMADPDiscrete::GetNrObservations(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::GetNrStateFactors(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::GetNrValuesForFactor(), MultiAgentDecisionProcessDiscreteFactoredStatesInterface::GetNrValuesPerFactor(), TwoStageDynamicBayesianNetwork::GetOProbabilitiesExactScopes(), TwoStageDynamicBayesianNetwork::GetOSoI_O(), Scope::GetPositionForIndex(), FSDist_COF::GetProbability(), FSDist_COF::GetReferrence(), PlanningUnitMADPDiscrete::GetSuccessorOHI(), TwoStageDynamicBayesianNetwork::GetXSoI_Y(), TwoStageDynamicBayesianNetwork::GetYProbabilitiesExactScopes(), TwoStageDynamicBayesianNetwork::GetYSoI_O(), IndexTools::Increment(), IndexTools::IndividualToJointIndicesStepSize(), IndexTools::RestrictIndividualIndicesToScope(), SanityCheck(), FSDist_COF::SetZero(), JointPolicyDiscretePure::SoftPrint(), and SoftPrint().
|
private |
the conditional observation history probabilities
Referenced by FSAOHDist_NECOF(), GetXOHProb_relT(), GetXOHProb_relT_SufficientSFscope(), SanityCheck(), SoftPrint(), Update(), and ~FSAOHDist_NECOF().
|
private |
marginals of observation history probs for each agent
used for updating the belief and by the GetOH... functions _m_oHistMarginals[agI][ohI] contains the probability of observation history ohI for agent agI.
Referenced by GetOHProb_relT(), SanityCheck(), SoftPrint(), and Update().
|
private |
Referenced by FSAOHDist_NECOF(), GetXOHProb_relT(), and Update().
|
private |
the maintained state factor marginals
Referenced by GetXProb(), InitializeFromISD(), SanityCheck(), SoftPrint(), Update(), and ~FSAOHDist_NECOF().
|
private |
the state factors in the scope of influence for each agent('s obs.)
Referenced by FSAOHDist_NECOF(), GetXOHProb_relT(), and GetXOHProb_relT_SufficientSFscope().
|
private |
the number of influence instantiations for those scopes
(i.e., the number of local states that influence o_i)
Referenced by FSAOHDist_NECOF(), and Update().
|
private |
The stage for which this distribution is.
Referenced by Update().
|
private |
the stepsize array (used to convert indiv<->joint indicies) is cached
I.e., this is used to quickly convert from/to individiual state indices of the state factors in the scope for this agent
Referenced by FSAOHDist_NECOF(), GetXOHProb_relT(), GetXOHProb_relT_SufficientSFscope(), Update(), and ~FSAOHDist_NECOF().