MultiAgentDecisionProcess
ProblemFireFightingFactored Class Reference

ProblemFireFightingFactored is a factored implementation of the FireFighting problem introduced in (Oliehoek, Spaan, Vlassis, JAIR 32, 2008). More...

#include <ProblemFireFightingFactored.h>

Inheritance diagram for ProblemFireFightingFactored:
[legend]

Public Member Functions

virtual
ProblemFireFightingFactored
Clone () const
 Returns a pointer to a copy of this class. More...
 
 ProblemFireFightingFactored (size_t nrAgents, size_t nrHouses, size_t nrFireLevels, double costOfMove=0.0, bool forcePositionRepres=false, double multipleAgentExtinguishProb=1.0, bool initialize=true)
 Constructor. More...
 
virtual ~ProblemFireFightingFactored ()
 Destructor. More...
 
- Public Member Functions inherited from FactoredDecPOMDPDiscrete
virtual void CacheFlatModels (bool sparse)
 
void CacheFlatRewardModel (bool sparse=false)
 
void ClipRewardModel (Index sf, bool sparse)
 Adjusts the reward model by ignoring a state factor. More...
 
void ConvertFiniteToInfiniteHorizon (size_t horizon)
 
void CreateNewRewardModel ()
 Creates a new reward model mapping. More...
 
void CreateNewRewardModelForAgent (Globals::Index)
 
virtual void ExportSpuddFile (const std::string &filename) const
 Export fully-observable subset of this FactoredDecPOMDPDiscrete to spudd file. More...
 
 FactoredDecPOMDPDiscrete (std::string name="received unspec. by FactoredDecPOMDPDiscrete", std::string descr="received unspec. by FactoredDecPOMDPDiscrete", std::string pf="received unspec. by FactoredDecPOMDPDiscrete")
 Default constructor. More...
 
const ScopeGetAgentScopeForLRF (Index LRF) const
 Get all the agents in the scope of an LRF. More...
 
const
FactoredQFunctionScopeForStage 
GetImmediateRewardScopes () const
 Returns all scopes of the immediate reward function in one object. More...
 
RewardModelGetLRF (Index LRF) const
 Returns a pointer to the LRF-th reward model component. More...
 
double GetLRFReward (Index LRF, Index sI_e, Index jaI_e) const
 Returns reward for LRF, given ja_e - the joint index for a group action for the subset of agents as specified by the agent scope of LRF. More...
 
double GetLRFReward (Index LRF, const std::vector< Index > &sI_e, const std::vector< Index > &jaI_e) const
 
double GetLRFRewardFlat (Index LRF, Index flat_s, Index full_ja) const
 might be necessary? Returns reward for LRF, given a flat state index, and a full joint action. More...
 
double GetLRFRewardFlat (Index lrf, const std::vector< Index > &sfacs, const std::vector< Index > &as) const
 
size_t GetNrAIs (Index LRF) const
 Get the number of action instantiations. I. More...
 
size_t GetNrLRFs () const
 Get the number of LRFs in the factored representation. More...
 
size_t GetNrXIs (Index LRF) const
 Get the number of X instantiations for LRF. More...
 
double GetReward (const std::vector< Index > &sIs, const std::vector< Index > &aIs) const
 
double GetReward (Index sI, Index jaI) const
 Return the reward for state, joint action indices. More...
 
double GetReward (State *s, JointAction *ja) const
 Function that returns the reward for a state and joint action. More...
 
double GetRewardForAgent (Index agentI, Index sI, Index jaI) const
 Return the reward for state, joint action indices. More...
 
double GetRewardForAgent (Index agI, State *s, JointAction *ja) const
 Function that returns the reward for a state and joint action. More...
 
RGetGetRGet () const
 
const ScopeGetStateFactorScopeForLRF (Index LRF) const
 Get all the state factors in the scope of an LRF. More...
 
void InitializeInstantiationInformation ()
 Initializes some meta information computed from the scopes. More...
 
void InitializeStorage ()
 makes sure that _m_sfScopes, _m_agScopes, _m_LRFs are set to proper size More...
 
void MarginalizeISD (Index sf, std::vector< size_t > &factor_sizes, const FactoredStateDistribution *fsd)
 Marginalizes the ISD over a given state factor. More...
 
void MarginalizeStateFactor (Index sf, bool sparse)
 Attempts to remove an extraneous state factor from the problem. More...
 
void Print () const
 
Index RestrictedActionVectorToJointIndex (Index LRF, const std::vector< Index > &actionVec_e) const
 convert an action vector of restricted scope to a joint index a_e. More...
 
Index RestrictedStateVectorToJointIndex (Index LRF, const std::vector< Index > &stateVec_e) const
 Get the vector of Factor indices corresponding to stateI. More...
 
void SetNrLRFs (size_t nr)
 
void SetReward (Index sI, Index jaI, double r)
 Set the reward for state, joint action indices. More...
 
void SetReward (Index sI, Index jaI, Index sucSI, double r)
 Set the reward for state, joint action , suc. state indices. More...
 
void SetReward (Index sI, Index jaI, Index sucSI, Index joI, double r)
 Set the reward for state, joint action, suc.state, joint obs indices. More...
 
void SetReward (State *s, JointAction *ja, double r)
 Function that sets the reward for a state and joint action. More...
 
void SetRewardForAgent (Index agentI, Index sI, Index jaI, double r)
 
void SetRewardForAgent (Index agentI, Index sI, Index jaI, Index sucSI, double r)
 Set the reward for state, joint action , suc. state indices. More...
 
void SetRewardForAgent (Index agentI, Index sI, Index jaI, Index sucSI, Index joI, double r)
 Set the reward for state, joint action, suc.state, joint obs indices. More...
 
void SetRewardForAgent (Index agI, State *s, JointAction *ja, double r)
 Function that sets the reward for an agent, state and joint action. More...
 
void SetRewardForLRF (Index LRF, const std::vector< Index > &Xs, const std::vector< Index > &As, double reward)
 Set reward. More...
 
void SetRewardForLRF (Index LRF, const std::vector< Index > &Xs, const std::vector< Index > &As, const Scope &Y, const std::vector< Index > &Ys, const Scope &O, const std::vector< Index > &Os, double reward)
 Set reward. More...
 
void SetRewardForLRF (Index LRF, const Scope &X, const std::vector< Index > &Xs, const Scope &A, const std::vector< Index > &As, const Scope &Y, const std::vector< Index > &Ys, const Scope &O, const std::vector< Index > &Os, double reward)
 Set Reward. More...
 
void SetRM (Index LRF, RewardModel *rm)
 Add the LRF-th reward model. More...
 
void SetScopeForLRF (Index LRF, const Scope &X, const Scope &A)
 Sets the scope for LRF. More...
 
void SetScopeForLRF (Index LRF, const Scope &X, const Scope &A, const Scope &Y, const Scope &O)
 Sets the scope for LRF. More...
 
virtual std::string SoftPrint () const
 Prints some information on the MultiAgentDecisionProcessDiscreteInterface. More...
 
virtual ~FactoredDecPOMDPDiscrete ()
 Destructor. More...
 
- Public Member Functions inherited from FactoredDecPOMDPDiscreteInterface
virtual ~FactoredDecPOMDPDiscreteInterface ()
 (default) Constructor More...
 
- Public Member Functions inherited from DecPOMDPDiscreteInterface
virtual ~DecPOMDPDiscreteInterface ()
 import the GetReward function from the base class in current scope. More...
 
- Public Member Functions inherited from DecPOMDPInterface
virtual ~DecPOMDPInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from POSGInterface
virtual ~POSGInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessInterface
virtual ~MultiAgentDecisionProcessInterface ()
 Destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessDiscreteInterface
virtual ~MultiAgentDecisionProcessDiscreteInterface ()
 Destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessDiscreteFactoredStatesInterface
std::string SoftPrintState (Index sI) const
 SoftPrints information on the MultiAgentDecisionProcessDiscrete. More...
 
virtual ~MultiAgentDecisionProcessDiscreteFactoredStatesInterface ()
 (default) Constructor More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessDiscreteFactoredStates
void AddAction (Index AI, const std::string &name, const std::string &description="")
 
void AddObservation (Index AI, const std::string &name, const std::string &description="")
 
Index AddStateFactor (const std::string &n="undef. name", const std::string &d="undef. descr.")
 
Index AddStateFactorValue (Index sf, const std::string &v="undef")
 
Scope AgentScopeBackup (const Scope &stateScope, const Scope &agentScope) const
 
void CacheFlatObservationModel (bool sparse=false)
 
void CacheFlatTransitionModel (bool sparse=false)
 
size_t ConstructJointActions ()
 
size_t ConstructJointObservations ()
 
void CreateNewObservationModel ()
 Creates a new observation model mapping: initializes new CPDs. More...
 
void CreateNewTransitionModel ()
 Creates a new transition model: initializes new CPDs for the 2BDN. More...
 
Index FactorValueIndicesToStateIndex (const std::vector< Index > &fv) const
 convert std::vector of (indices of) factor values to (flat) state index. More...
 
Index FactorValueIndicesToStateIndex (const std::vector< Index > &s_e_vec, const Scope &sfSC) const
 convert an local state vector s_e_vec of scope sfScope to a joint index. More...
 
const
TwoStageDynamicBayesianNetwork
Get2DBN () const
 Copy assignment operator. More...
 
const ActionGetAction (Index agentI, Index a) const
 Return a ref to the a-th action of agent agentI. More...
 
const ScopeGetAllStateFactorScope () const
 Convenience function to quickly get the full state scope. More...
 
const ScopeGetASoI_O (Index o) const
 
const ScopeGetASoI_Y (Index y) const
 
bool GetEventObservability () const
 Are we using an event observation model? More...
 
const FactoredStateDistributionGetFactoredISD () const
 
double GetInitialStateProbability (Index sI) const
 
StateDistributionGetISD () const
 Returns the complete initial state distribution. More...
 
const JointActionGetJointAction (Index i) const
 Return a ref to the i-th joint action. More...
 
const JointObservationGetJointObservation (Index i) const
 Return a ref to the i-th joint observation. More...
 
const std::vector< size_t > & GetNrActions () const
 Return the number of actions vector. More...
 
size_t GetNrActions (Index AgentI) const
 Return the number of actions of agent agentI. More...
 
size_t GetNrJointActions () const
 Return the number of joint actions. More...
 
size_t GetNrJointActions (const Scope &agScope) const
 Get the number of joint actions the agents in agScope can form. More...
 
size_t GetNrJointObservations () const
 Return the number of joint observations. More...
 
const std::vector< size_t > & GetNrObservations () const
 Return the number of observations vector. More...
 
size_t GetNrObservations (Index AgentI) const
 Return the number of observations of agent agentI. More...
 
size_t GetNrStateFactorInstantiations (const Scope &sfScope) const
 Get the number of joint instantiations for the factors in sfScope. More...
 
size_t GetNrStateFactors () const
 Get the number of state components. -no is inherited from. More...
 
size_t GetNrStates () const
 Return the number of states. More...
 
const size_t GetNrValuesForFactor (Index sf) const
 Get the number of possible values for a particular factor. More...
 
const std::vector< size_t > & GetNrValuesPerFactor () const
 Get the number of possible assignments or values to each factor. More...
 
const ObservationGetObservation (Index agentI, Index a) const
 Return a ref to the a-th observation of agent agentI. More...
 
const ObservationModelDiscreteGetObservationModelDiscretePtr () const
 Returns a pointer to the underlying observation model. More...
 
double GetObservationProbability (Index jaI, Index sucSI, Index joI) const
 Return the probability of joint observation joI: P(joI|jaI,sucSI). More...
 
double GetObservationProbability (Index sI, Index jaI, Index sucSI, Index joI) const
 O(s,ja,s',jo) version. You can access a standard O(ja,s',jo) model both ways (the PS index is simply ignored in the latter case). More...
 
OGetGetOGet () const
 
const ScopeGetOSoI_O (Index o) const
 
const StateGetState (Index i) const
 Returns a pointer to state i. More...
 
const StateFactorDiscreteGetStateFactorDiscrete (Index sfacI) const
 
TGetGetTGet () const
 
const TransitionModelDiscreteGetTransitionModelDiscretePtr () const
 Returns a pointer to the underlying transition model. More...
 
double GetTransitionProbability (Index sI, Index jaI, Index sucSI) const
 Return the probability of successor state sucSI: P(sucSI|sI,jaI). More...
 
const ScopeGetXSoI_O (Index o) const
 
const ScopeGetXSoI_Y (Index y) const
 
double GetYOProbability (const Scope &X, const std::vector< Index > &Xs, const Scope &A, const std::vector< Index > &As, const Scope &Y, const std::vector< Index > &Ys, const Scope &O, const std::vector< Index > &Os) const
 
const ScopeGetYSoI_O (Index o) const
 
const ScopeGetYSoI_Y (Index y) const
 
Index IndividualToJointActionIndices (const Index *AI_ar) const
 Returns the joint action index that corresponds to the array of specified individual action indices. More...
 
Index IndividualToJointActionIndices (const std::vector< Index > &indivActionIndices) const
 Returns the joint action index that corresponds to the vector of specified individual action indices. More...
 
Index IndividualToJointActionIndices (const std::vector< Index > &ja_e, const Scope &agSC) const
 indiv->joint for a restricted set (Scope) of agents More...
 
Index IndividualToJointObservationIndices (const std::vector< Index > &indivObservationIndices) const
 Returns the joint observation index that corresponds to the vector of specified individual observation indices. More...
 
Index IndividualToJointObservationIndices (const std::vector< Index > &jo_e, const Scope &agSC) const
 indiv->joint for a restricted set (Scope) of agents More...
 
virtual void Initialize2DBN ()
 
virtual void Initialize2DBN (ScopeFunctor &SetScopes, TransitionProbFunctor &ComputeTransitionProb, ObservationProbFunctor &ComputeObservationProb)
 This signature allows us to initialize the 2DBN using externally supplied functors to set the scopes, and compute transition and observation probabilities in a discrete factored model. More...
 
bool JointAIndicesValid () const
 
bool JointIndicesValid () const
 
bool JointOIndicesValid () const
 
const std::vector< Index > & JointToIndividualActionIndices (Index jaI) const
 Returns a vector of indices to indiv. More...
 
std::vector< IndexJointToIndividualActionIndices (Index ja_e, const Scope &agSC) const
 joint->indiv for a restricted set (Scope) of agents More...
 
const std::vector< Index > & JointToIndividualObservationIndices (Index joI) const
 Returns a vector of indices to indiv. More...
 
std::vector< IndexJointToIndividualObservationIndices (Index jo_e, const Scope &agSC) const
 joint->indiv for a restricted set (Scope) of agents More...
 
Index JointToRestrictedJointActionIndex (Index jaI, const Scope &agSc_e) const
 Converts a global joint action index jaI to a restricted joint action index ja_e, for agents scope agSc_e Returns a vector of indices to indiv. More...
 
Index JointToRestrictedJointObservationIndex (Index joI, const Scope &agSc_e) const
 Converts a global joint observation index joI to a restricted joint observation index jo_e, for agents scope agSc_e Returns a vector of indices to indiv. More...
 
void MarginalizeTransitionObservationModel (const Index sf, bool sparse)
 This function marginalizes a state factor out of the flat joint transition and observation models of the system. More...
 
 MultiAgentDecisionProcessDiscreteFactoredStates (const std::string &name="received unspec. by MultiAgentDecisionProcessDiscreteFactoredStates", const std::string &descr="received unspec. by MultiAgentDecisionProcessDiscreteFactoredStates", const std::string &pf="received unspec. by MultiAgentDecisionProcessDiscreteFactoredStates")
 (default) Constructor More...
 
 MultiAgentDecisionProcessDiscreteFactoredStates (const MultiAgentDecisionProcessDiscreteFactoredStates &a)
 Copy constructor. More...
 
MultiAgentDecisionProcessDiscreteFactoredStatesoperator= (const MultiAgentDecisionProcessDiscreteFactoredStates &o)
 Copy assignment operator. More...
 
void RemoveStateFactor (Index sf)
 This function removes a state factor from the model's MADPComponentFactoredStates, fixes the factor indices, and adjusts the 2DBN accordingly - all CPTs of nodes which depend on the removed state factor are recalculated by marginalizing their respective clique joints. More...
 
Index SampleInitialState () const
 Sample a state according to the initial state PDF. More...
 
void SampleInitialState (std::vector< Index > &sIs) const
 
Index SampleJointObservation (Index jaI, Index sucI) const
 Sample an observation - needed for simulations. More...
 
Index SampleJointObservation (Index sI, Index jaI, Index sucI) const
 
void SampleJointObservation (const std::vector< Index > &aIs, const std::vector< Index > &sucIs, std::vector< Index > &oIs) const
 
void SampleJointObservation (const std::vector< Index > &sIs, const std::vector< Index > &aIs, const std::vector< Index > &sucIs, std::vector< Index > &oIs) const
 
Index SampleSuccessorState (Index sI, Index jaI) const
 Sample a successor state - needed by simulations. More...
 
void SampleSuccessorState (const std::vector< Index > &sIs, const std::vector< Index > &aIs, std::vector< Index > &sucIs) const
 
bool SetActionsInitialized (bool b)
 
void SetConnectionsSpecified (bool b)
 
void SetEventObservability (bool eventO)
 
bool SetInitialized (bool b)
 
void SetISD (FactoredStateDistribution *p)
 
void SetNrActions (Index AI, size_t nrA)
 
void SetNrObservations (Index AI, size_t nrO)
 
bool SetObservationsInitialized (bool b)
 
void SetSoI_O (Index o, const Scope &ASoI, const Scope &YSoI, const Scope &OSoI)
 
void SetSoI_O (Index o, const Scope &XSoI, const Scope &ASoI, const Scope &YSoI, const Scope &OSoI)
 
void SetSoI_Y (Index y, const Scope &XSoI, const Scope &ASoI, const Scope &YSoI)
 
void SetSparse (bool b)
 
bool SetStatesInitialized (bool b)
 
void SetUniformISD ()
 
std::string SoftPrint () const
 SoftPrints information on the MultiAgentDecisionProcessDiscrete. More...
 
std::string SoftPrintState (Index sI) const
 
Index StateIndexToFactorValueIndex (Index factor, Index s) const
 Get the value of a particular state factor given a joint flat state. More...
 
std::vector< IndexStateIndexToFactorValueIndices (Index stateI) const
 Get the vector of FactorValue indices corresponding to stateI used to be called virtual vector<Index> GetStateFactorValues(Index stateI) const. More...
 
std::vector< IndexStateIndexToFactorValueIndices (Index s_e, const Scope &sfSC) const
 convert an local state index s_e to a vector of state factors (with scope sfScope). More...
 
Scope StateScopeBackup (const Scope &stateScope, const Scope &agentScope) const
 
 ~MultiAgentDecisionProcessDiscreteFactoredStates ()
 Destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcess
void AddAgent (std::string name)
 Add a new agent with name "name" to the MADP. More...
 
Index GetAgentIndexByName (const std::string &s) const
 Returns the index of an agent given its name, if it exists. More...
 
std::string GetAgentNameByIndex (Index i) const
 Returns the name of the agent at the given index. More...
 
const ScopeGetAllAgentScope () const
 
std::string GetDescription () const
 
std::string GetName () const
 
size_t GetNrAgents () const
 Returns the number of agents in this MultiAgentDecisionProcess. More...
 
std::string GetProblemFile () const
 Returns the name of the problem file. More...
 
std::string GetUnixName () const
 Returns a name which can be in unix path, by default the base part of the problem filename. More...
 
 MultiAgentDecisionProcess (size_t nrAgents, const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess")
 Constructor. More...
 
 MultiAgentDecisionProcess (const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess")
 Default Constructor without specifying the number of agents. More...
 
void Print () const
 
void SetDescription (const std::string &description)
 
void SetName (const std::string &name)
 
void SetNrAgents (size_t nrAgents)
 Sets the number of agents. More...
 
void SetUnixName (std::string unixName)
 Sets the name which can be used inin unix paths. More...
 
std::string SoftPrint () const
 Prints some information on the MultiAgentDecisionProcess. More...
 
virtual ~MultiAgentDecisionProcess ()
 Destructor. More...
 
- Public Member Functions inherited from DecPOMDP
 DecPOMDP ()
 Default constructor. sets RewardType to REWARD and discount to 1.0. More...
 
double GetDiscount () const
 Returns the discount parameter. More...
 
double GetDiscountForAgent (Index agentI) const
 Returns the discount parameter. More...
 
reward_t GetRewardType () const
 Returns the reward type. More...
 
reward_t GetRewardTypeForAgent (Index agentI) const
 Returns the reward type. More...
 
void SetDiscount (double d)
 Sets the discount parameter to d. More...
 
void SetDiscountForAgent (Index agentI, double d)
 Functions needed for POSGInterface: More...
 
void SetRewardType (reward_t r)
 Sets the reward type to reward_t r. More...
 
void SetRewardTypeForAgent (Index agentI, reward_t r)
 Sets the reward type to reward_t r. More...
 
std::string SoftPrint () const
 SoftPrints some information on the DecPOMDP. More...
 

Protected Types

enum  observation_t { FLAMES, NOFLAMES }
 

Protected Member Functions

virtual double ComputeObservationProb (Index o, Index oVal, const std::vector< Index > &As, const std::vector< Index > &Ys, const std::vector< Index > &Os) const
 
virtual double ComputeTransitionProb (Index y, Index yVal, const std::vector< Index > &Xs, const std::vector< Index > &As, const std::vector< Index > &Ys) const
 Compute the probability of value yVal of state variable y, given ii=<Xs,As,Ys> More...
 
virtual void ConstructActions ()
 Construct all the Actions and actionSets (the vector _m_actionVecs). More...
 
virtual void ConstructObservations ()
 Construct all the observations and observation sets. More...
 
virtual size_t GetAgentLocation (Index action, Index agI) const
 
virtual Scope GetHousesAgentInfluences (Index agI) const
 
double GetMultipleAgentExtinguishProb () const
 
std::string GetMultipleAgentExtinguishProbString () const
 
virtual size_t GetNrAgentsAtHouse (const std::vector< Index > &As, Index hI) const
 
std::vector< IndexGetStateVector (Index sI) const
 
void InitializePFFF ()
 
virtual void SetOScopes ()
 
virtual void SetYScopes ()
 
virtual std::string SoftPrintBriefDescription () const
 
virtual std::string SoftPrintDescription () const
 
- Protected Member Functions inherited from MultiAgentDecisionProcessDiscreteFactoredStates
TwoStageDynamicBayesianNetworkGet2DBN ()
 
virtual bool SanityCheckObservations () const
 
virtual bool SanityCheckTransitions () const
 

Protected Attributes

double _m_costOfMove
 
bool _m_forcePositionRepres
 
bool _m_includePositions
 
double _m_multipleAgentExtinguishProb
 
size_t _m_nrAgents
 
size_t _m_nrFireLevels
 
std::vector< size_t > _m_nrFLs_vec
 
size_t _m_nrHouses
 
size_t _m_nrJointFirelevels
 
std::vector< size_t > _m_nrPerStateFeatureVec
 
size_t _m_nrStateFeatures
 
- Protected Attributes inherited from MultiAgentDecisionProcess
std::vector< Agent_m_agents
 Vector containing Agent objects, which are indexed named entities. More...
 
Scope _m_allAgentsScope
 Scope containing all agents - usefull sometimes. More...
 
size_t _m_nrAgents
 The number of agents participating in the MADP. More...
 
std::string _m_problemFile
 String holding the filename of the problem file to be parsed - if applicable. More...
 
std::string _m_unixName
 String for the unix name of the MADP. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from FactoredDecPOMDPDiscrete
static bool ConsistentVectorsOnSpecifiedScopes (const std::vector< Index > &v1, const Scope &scope1, const std::vector< Index > &v2, const Scope &scope2)
 Auxiliary function that returns whether v1 is consistent with v2. More...
 

Detailed Description

ProblemFireFightingFactored is a factored implementation of the FireFighting problem introduced in (Oliehoek, Spaan, Vlassis, JAIR 32, 2008).

Member Enumeration Documentation

Enumerator
FLAMES 
NOFLAMES 

Constructor & Destructor Documentation

ProblemFireFightingFactored::ProblemFireFightingFactored ( size_t  nrAgents,
size_t  nrHouses,
size_t  nrFireLevels,
double  costOfMove = 0.0,
bool  forcePositionRepres = false,
double  multipleAgentExtinguishProb = 1.0,
bool  initialize = true 
)

Constructor.

References _m_multipleAgentExtinguishProb, and InitializePFFF().

Referenced by Clone().

virtual ProblemFireFightingFactored::~ProblemFireFightingFactored ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual ProblemFireFightingFactored* ProblemFireFightingFactored::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Reimplemented from FactoredDecPOMDPDiscrete.

References ProblemFireFightingFactored().

double ProblemFireFightingFactored::ComputeObservationProb ( Index  o,
Index  oVal,
const std::vector< Index > &  As,
const std::vector< Index > &  Ys,
const std::vector< Index > &  Os 
) const
protectedvirtual
double ProblemFireFightingFactored::ComputeTransitionProb ( Index  y,
Index  yVal,
const std::vector< Index > &  Xs,
const std::vector< Index > &  As,
const std::vector< Index > &  Ys 
) const
protectedvirtual

Compute the probability of value yVal of state variable y, given ii=<Xs,As,Ys>

Reimplemented from FactoredDecPOMDPDiscrete.

References _m_nrFireLevels, _m_nrHouses, StringTools::Append(), GetMultipleAgentExtinguishProb(), GetNrAgentsAtHouse(), and MultiAgentDecisionProcessDiscreteFactoredStates::GetXSoI_Y().

void ProblemFireFightingFactored::ConstructActions ( )
protectedvirtual

Construct all the Actions and actionSets (the vector _m_actionVecs).

Reimplemented in ProblemFireFightingGraph.

References _m_nrAgents, _m_nrHouses, and MultiAgentDecisionProcessDiscreteFactoredStates::AddAction().

Referenced by InitializePFFF().

void ProblemFireFightingFactored::ConstructObservations ( )
protectedvirtual

Construct all the observations and observation sets.

add observations:

References _m_nrAgents, MultiAgentDecisionProcessDiscreteFactoredStates::AddObservation(), FLAMES, and NOFLAMES.

Referenced by InitializePFFF().

size_t ProblemFireFightingFactored::GetAgentLocation ( Index  action,
Index  agI 
) const
protectedvirtual

Reimplemented in ProblemFireFightingGraph.

Referenced by GetNrAgentsAtHouse().

Scope ProblemFireFightingFactored::GetHousesAgentInfluences ( Index  agI) const
protectedvirtual

Reimplemented in ProblemFireFightingGraph.

References _m_nrHouses, and Scope::Insert().

Referenced by SetOScopes().

double ProblemFireFightingFactored::GetMultipleAgentExtinguishProb ( ) const
protected
string ProblemFireFightingFactored::GetMultipleAgentExtinguishProbString ( ) const
protected
size_t ProblemFireFightingFactored::GetNrAgentsAtHouse ( const std::vector< Index > &  As,
Index  hI 
) const
protectedvirtual

Reimplemented in ProblemFireFightingGraph.

References GetAgentLocation().

Referenced by ComputeTransitionProb().

std::vector< Index> ProblemFireFightingFactored::GetStateVector ( Index  sI) const
inlineprotected
void ProblemFireFightingFactored::InitializePFFF ( )
protected

References MultiAgentDecisionProcessDiscreteFactoredStates::_m_2dbn, _m_costOfMove, _m_forcePositionRepres, _m_includePositions, _m_nrAgents, _m_nrFireLevels, _m_nrFLs_vec, _m_nrHouses, _m_nrJointFirelevels, _m_nrPerStateFeatureVec, _m_nrStateFeatures, MultiAgentDecisionProcessDiscreteFactoredStates::AddStateFactor(), MultiAgentDecisionProcessDiscreteFactoredStates::AddStateFactorValue(), StringTools::Append(), ConstructActions(), MultiAgentDecisionProcessDiscreteFactoredStates::ConstructJointActions(), MultiAgentDecisionProcessDiscreteFactoredStates::ConstructJointObservations(), ConstructObservations(), DEBUG_PFFF, FactoredDecPOMDPDiscrete::GetAgentScopeForLRF(), FactoredDecPOMDPDiscrete::GetNrAIs(), FactoredDecPOMDPDiscrete::GetNrXIs(), FactoredDecPOMDPDiscrete::GetStateFactorScopeForLRF(), MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN(), FactoredDecPOMDPDiscrete::InitializeInstantiationInformation(), Scope::Insert(), MultiAgentDecisionProcessDiscreteFactoredStates::SetActionsInitialized(), MultiAgentDecisionProcess::SetDescription(), DecPOMDP::SetDiscount(), MultiAgentDecisionProcessDiscreteFactoredStates::SetInitialized(), MultiAgentDecisionProcess::SetName(), MultiAgentDecisionProcess::SetNrAgents(), FactoredDecPOMDPDiscrete::SetNrLRFs(), MultiAgentDecisionProcessDiscreteFactoredStates::SetObservationsInitialized(), FactoredDecPOMDPDiscrete::SetRewardForLRF(), FactoredDecPOMDPDiscrete::SetRM(), FactoredDecPOMDPDiscrete::SetScopeForLRF(), MultiAgentDecisionProcessDiscreteFactoredStates::SetSparse(), MultiAgentDecisionProcessDiscreteFactoredStates::SetStatesInitialized(), MultiAgentDecisionProcessDiscreteFactoredStates::SetUniformISD(), MultiAgentDecisionProcess::SetUnixName(), Scope::SoftPrint(), MADPComponentFactoredStates::SoftPrint(), TwoStageDynamicBayesianNetwork::SoftPrint(), SoftPrintBriefDescription(), SoftPrintDescription(), and PrintTools::SoftPrintVector().

Referenced by ProblemFireFightingFactored(), and ProblemFireFightingGraph::ProblemFireFightingGraph().

void ProblemFireFightingFactored::SetOScopes ( )
protectedvirtual
void ProblemFireFightingFactored::SetYScopes ( )
protectedvirtual
std::string ProblemFireFightingFactored::SoftPrintBriefDescription ( ) const
protectedvirtual
std::string ProblemFireFightingFactored::SoftPrintDescription ( ) const
protectedvirtual

Reimplemented in ProblemFireFightingGraph.

References _m_nrAgents, _m_nrFireLevels, and _m_nrHouses.

Referenced by InitializePFFF().

Member Data Documentation

double ProblemFireFightingFactored::_m_costOfMove
protected

Referenced by InitializePFFF().

bool ProblemFireFightingFactored::_m_forcePositionRepres
protected

Referenced by InitializePFFF().

bool ProblemFireFightingFactored::_m_includePositions
protected
double ProblemFireFightingFactored::_m_multipleAgentExtinguishProb
protected
std::vector<size_t> ProblemFireFightingFactored::_m_nrFLs_vec
protected

Referenced by InitializePFFF().

size_t ProblemFireFightingFactored::_m_nrJointFirelevels
protected

Referenced by InitializePFFF().

std::vector<size_t> ProblemFireFightingFactored::_m_nrPerStateFeatureVec
protected

Referenced by InitializePFFF().

size_t ProblemFireFightingFactored::_m_nrStateFeatures
protected

Referenced by InitializePFFF().