MultiAgentDecisionProcess
FactoredQFunctionStateJAOHInterface Class Referenceabstract

FactoredQFunctionStateJAOHInterface represents Q-value functions for factored discrete Dec-POMDPs. More...

#include <FactoredQFunctionStateJAOHInterface.h>

Inheritance diagram for FactoredQFunctionStateJAOHInterface:
[legend]

Public Member Functions

virtual const ScopeGetAgentScopeForLQF (Index lqf, Index stage) const =0
 Return the AgentScope for the lqf-th LQF at time-step stage. More...
 
virtual double GetLocalQValue (Index e, Index stage, const std::vector< Index > &sfacValues_e, const std::vector< Index > &aoHistIs_e, const std::vector< Index > &acs_e) const
 Get local Q-value using individual indices. More...
 
virtual double GetLocalQValue (Index e, Index stage, const std::vector< Index > &sfacValues_e, const std::vector< Index > &aoHistIs_e, Index jaI_e) const =0
 Get local Q-value using individual and group indices. More...
 
virtual double GetLocalQValue (Index e, Index stage, Index sfSC_sI, const std::vector< Index > &aoHistIs_e, Index jaI_e) const
 Get local Q-value using individual and group indices. More...
 
virtual double GetLocalQValue (Index e, Index stage, Index sfSC_sI, Index agSC_aoHistI, Index agSC_jaI) const =0
 Get local Q-value using group indices. More...
 
virtual size_t GetNrLQFs (Index stage) const =0
 Return the number of local Q value functions for stage. More...
 
virtual const ScopeGetStateFactorScopeForLQF (Index lqf, Index stage) const =0
 Return the State factor Scope for the lqf-th LQF at time-step stage. More...
 
virtual ~FactoredQFunctionStateJAOHInterface ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionJAOHInterface
virtual double GetQ (Index jaohI, Index jaI) const =0
 Returns Q(joint A-O history jaohI, jaI). More...
 
 QFunctionJAOHInterface ()
 
virtual ~QFunctionJAOHInterface ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionForDecPOMDPInterface
virtual const
PlanningUnitDecPOMDPDiscrete
GetPU () const =0
 
 QFunctionForDecPOMDPInterface ()
 (default) Constructor More...
 
virtual void SetPU (const PlanningUnitDecPOMDPDiscrete *pu)=0
 
virtual void SetPU (const boost::shared_ptr< const PlanningUnitDecPOMDPDiscrete > &pu)=0
 
virtual ~QFunctionForDecPOMDPInterface ()
 Destructor. More...
 
- Public Member Functions inherited from QFunctionInterface
virtual void Compute ()=0
 Compute the heuristic. More...
 
virtual void ComputeWithCachedQValues (bool computeIfNotCached=true)=0
 Compute Qvalue function, while caching the Qvalues to disk. More...
 
virtual std::string GetCacheFilename () const =0
 Gets the filename where the Qvalues should be stored. More...
 
virtual void Load ()
 Load the Qvalues from disk. More...
 
virtual void Load (const std::string &filename)=0
 Load the Qvalues from disk from a file named filename. More...
 
virtual void Save () const
 Stores the Qvalues to disk. More...
 
virtual void Save (const std::string &filename) const =0
 Stores the Qvalues to disk in file named filename. More...
 
virtual std::string SoftPrintBrief () const =0
 Returns a short description of the heuristic, can be used for constructing filenames. More...
 
virtual ~QFunctionInterface ()
 

Detailed Description

FactoredQFunctionStateJAOHInterface represents Q-value functions for factored discrete Dec-POMDPs.

Constructor & Destructor Documentation

virtual FactoredQFunctionStateJAOHInterface::~FactoredQFunctionStateJAOHInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual const Scope& FactoredQFunctionStateJAOHInterface::GetAgentScopeForLQF ( Index  lqf,
Index  stage 
) const
pure virtual

Return the AgentScope for the lqf-th LQF at time-step stage.

Implemented in FactoredQLastTimeStepOrElse.

Referenced by GeneralizedMAAStarPlannerForFactoredDecPOMDPDiscrete::GetAgentScopeForLQF().

virtual double FactoredQFunctionStateJAOHInterface::GetLocalQValue ( Index  e,
Index  stage,
const std::vector< Index > &  sfacValues_e,
const std::vector< Index > &  aoHistIs_e,
const std::vector< Index > &  acs_e 
) const
inlinevirtual

Get local Q-value using individual indices.

Get the local Q-value for

  • the e-th local Q-value function
  • for stage (time-step) stage
  • the vector of state factor value indices sfacValues, for the state factors in the scope of the e-th local Q-function (i.e. the state factors corresponding to GetStateFactorScopeForLQF(e, stage) )
  • the vector of individual action-observation history indices for the agents in the agent scope of the e-th local Q-function
  • group action jaI_e.

jaI_e is the group index of the agents in GetAgentScopeForLQF( lqf, stage). Is is easily computed by

IndexTools::IndividualToJointIndices(indices, nrActions)

where the former argument is are the individual action indices of the agents in the scope, and the latter are the number of individual actions they have.

Referenced by GeneralizedMAAStarPlannerForFactoredDecPOMDPDiscrete::GetHeuristicLocalQValue().

virtual double FactoredQFunctionStateJAOHInterface::GetLocalQValue ( Index  e,
Index  stage,
const std::vector< Index > &  sfacValues_e,
const std::vector< Index > &  aoHistIs_e,
Index  jaI_e 
) const
pure virtual

Get local Q-value using individual and group indices.

Get the local Q-value for

  • the e-th local Q-value function
  • for stage (time-step) stage
  • the vector of state factor value indices sfacValues, for the state factors in the scope of the e-th local Q-function (i.e. the state factors corresponding to GetStateFactorScopeForLQF(e, stage) )
  • the vector of individual action-observation history indices for the agents in the agent scope of the e-th local Q-function
  • group action jaI_e.

jaI_e is the group index of the agents in GetAgentScopeForLQF( lqf, stage). Is is easily computed by

IndexTools::IndividualToJointIndices(indices, nrActions)

where the former argument is are the individual action indices of the agents in the scope, and the latter are the number of individual actions they have.

Implemented in FactoredQLastTimeStepOrElse.

virtual double FactoredQFunctionStateJAOHInterface::GetLocalQValue ( Index  e,
Index  stage,
Index  sfSC_sI,
const std::vector< Index > &  aoHistIs_e,
Index  jaI_e 
) const
inlinevirtual

Get local Q-value using individual and group indices.

Get the local Q-value for

  • the e-th local Q-value function
  • for stage (time-step) stage
  • ('local') state sfSC_sI,
  • the vector of individual action-observation history indices for the agents in the agent scope of the e-th local Q-function
  • group action jaI_e.

jaI_e is the group index of the agents in GetAgentScopeForLQF( lqf, stage). Is is easily computed by

IndexTools::IndividualToJointIndices(indices, nrActions)

where the former argument is are the individual action indices of the agents in the scope, and the latter are the number of individual actions they have.

virtual double FactoredQFunctionStateJAOHInterface::GetLocalQValue ( Index  e,
Index  stage,
Index  sfSC_sI,
Index  agSC_aoHistI,
Index  agSC_jaI 
) const
pure virtual

Get local Q-value using group indices.

Get the local Q-value for

  • the LQF-th Q-value function
  • for stage (time-step) stage
  • ('local') state sfSC_sI,
  • the local aoHist: agSC_aoHistI
  • local joint action agSC_jaI

using only 'joint' (i.e., group) indices.

I.e.,

  • sfSC_sI is a group index for those state factors that are in the scope GetStateFactorsForLQF(Index lqf, Index stage)
  • agSC_aoHistI is a group index for the action-observation histories of the agents in GetAgentScopeForLQF(Index lqf, Index stage). See below for more details.
  • agSc_jaI is the group index of those agent's actions. Is is easily computed by IndexTools::IndividualToJointIndices(indices, nrActions)

Computing the joint aoHist index agSC_aoHistI is somewhat more complicated than agSc_jaI, because not all indices are valid for the relevant stage. In particular

Implemented in FactoredQLastTimeStepOrElse.

virtual size_t FactoredQFunctionStateJAOHInterface::GetNrLQFs ( Index  stage) const
pure virtual

Return the number of local Q value functions for stage.

Implemented in FactoredQLastTimeStepOrElse.

Referenced by GeneralizedMAAStarPlannerForFactoredDecPOMDPDiscrete::GetNrHeuristicLQFs().

virtual const Scope& FactoredQFunctionStateJAOHInterface::GetStateFactorScopeForLQF ( Index  lqf,
Index  stage 
) const
pure virtual

Return the State factor Scope for the lqf-th LQF at time-step stage.

Implemented in FactoredQLastTimeStepOrElse.

Referenced by GeneralizedMAAStarPlannerForFactoredDecPOMDPDiscrete::GetStateFactorScopeForLQF().