MultiAgentDecisionProcess
ProblemAloha Class Reference

#include <ProblemAloha.h>

Inheritance diagram for ProblemAloha:
[legend]

Public Types

enum  AlohaVariation { NoNewPacket, NewPacket, NewPacketSendAll, NewPacketProgressivePenalty }
 
enum  IslandConfiguration {
  TwoIslands, OneIsland, TwoIndependentIslands, ThreeIslandsInLine,
  ThreeIslandsClustered, SmallBigSmallInLine, FiveIslandsInLine, FourIslandsInLine,
  FourIslandsInSquare, SixIslandsInLine, SevenIslandsInLine, InLine
}
 

Public Member Functions

virtual ProblemAlohaClone () const
 Returns a pointer to a copy of this class. More...
 
IslandConfiguration GetIslandConfiguration () const
 
size_t GetMaxBacklog () const
 
AlohaVariation GetVariation () const
 
 ProblemAloha (IslandConfiguration islands, AlohaVariation variation, size_t maxBacklog=2, size_t nrAgents=2, bool initialize=true)
 (default) Constructor More...
 
virtual ~ProblemAloha ()
 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...
 

Static Public Member Functions

static std::string IslandConfigToString (IslandConfiguration conf)
 

Protected Types

enum  { SEND, IDLEa }
 
enum  { SUCCESS, IDLEo, COLLISION }
 

Protected Member Functions

double ComputeObservationProb (Index o, Index oVal, const std::vector< Index > &As, const std::vector< Index > &Ys, const std::vector< Index > &Os) const
 
double ComputeTransitionProb (Index y, Index yVal, const std::vector< Index > &Xs, const std::vector< Index > &As, const std::vector< Index > &Ys) const
 
void InitializeAloha ()
 
virtual void SetOScopes ()
 
virtual void SetYScopes ()
 
virtual std::string SoftPrintBriefDescription () const
 
virtual std::string SoftPrintDescription () const
 
virtual std::string SoftPrintVariation (AlohaVariation variation) const
 
virtual bool successFullySendPackage (Index y, const std::vector< Index > &Xs, const std::vector< Index > &As) const
 
- Protected Member Functions inherited from MultiAgentDecisionProcessDiscreteFactoredStates
TwoStageDynamicBayesianNetworkGet2DBN ()
 
virtual bool SanityCheckObservations () const
 
virtual bool SanityCheckTransitions () const
 

Private Member Functions

bool areNeighbors (Index x1, Index x2) const
 
double backlogToReward (Index backlog) const
 
Index composeObservation (Index status, Index newPacket) const
 
Index composeState (Index backlog, Index newPacket) const
 
void ConstructActions ()
 
void ConstructObservations ()
 
double GetNewPacketProb (Index y) const
 
void splitObservation (Index oI, Index &status, Index &newPacket) const
 
void splitState (Index sI, Index &backlog, Index &newPacket) const
 
std::string transmissionStatusToString (Index status) const
 

Private Attributes

IslandConfiguration _m_islandConf
 
size_t _m_maxBacklog
 
size_t _m_nrAgentsPassedOnCommandline
 
size_t _m_nrIslands
 
size_t * _m_stepSizeObservations
 
size_t * _m_stepSizeState
 
AlohaVariation _m_variation
 

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...
 
- 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...
 

Member Enumeration Documentation

anonymous enum
protected
Enumerator
SEND 
IDLEa 
anonymous enum
protected
Enumerator
SUCCESS 
IDLEo 
COLLISION 
Enumerator
NoNewPacket 
NewPacket 
NewPacketSendAll 
NewPacketProgressivePenalty 
Enumerator
TwoIslands 
OneIsland 
TwoIndependentIslands 
ThreeIslandsInLine 
ThreeIslandsClustered 
SmallBigSmallInLine 
FiveIslandsInLine 
FourIslandsInLine 
FourIslandsInSquare 
SixIslandsInLine 
SevenIslandsInLine 
InLine 

Constructor & Destructor Documentation

ProblemAloha::ProblemAloha ( IslandConfiguration  islands,
AlohaVariation  variation,
size_t  maxBacklog = 2,
size_t  nrAgents = 2,
bool  initialize = true 
)

(default) Constructor

References InitializeAloha().

Referenced by Clone().

virtual ProblemAloha::~ProblemAloha ( )
inlinevirtual

Destructor.

Member Function Documentation

double ProblemAloha::backlogToReward ( Index  backlog) const
private
virtual ProblemAloha* ProblemAloha::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Reimplemented from FactoredDecPOMDPDiscrete.

References ProblemAloha().

Index ProblemAloha::composeObservation ( Index  status,
Index  newPacket 
) const
private
Index ProblemAloha::composeState ( Index  backlog,
Index  newPacket 
) const
private
double ProblemAloha::ComputeObservationProb ( Index  o,
Index  oVal,
const std::vector< Index > &  As,
const std::vector< Index > &  Ys,
const std::vector< Index > &  Os 
) const
protectedvirtual
double ProblemAloha::ComputeTransitionProb ( Index  y,
Index  yVal,
const std::vector< Index > &  Xs,
const std::vector< Index > &  As,
const std::vector< Index > &  Ys 
) const
protectedvirtual
void ProblemAloha::ConstructActions ( )
private
IslandConfiguration ProblemAloha::GetIslandConfiguration ( ) const
inline
size_t ProblemAloha::GetMaxBacklog ( ) const
inline
AlohaVariation ProblemAloha::GetVariation ( ) const
inline
void ProblemAloha::InitializeAloha ( )
protected

References _m_islandConf, _m_maxBacklog, _m_nrAgentsPassedOnCommandline, _m_nrIslands, _m_stepSizeObservations, _m_stepSizeState, _m_variation, MultiAgentDecisionProcessDiscreteFactoredStates::AddStateFactor(), MultiAgentDecisionProcessDiscreteFactoredStates::AddStateFactorValue(), StringTools::Append(), backlogToReward(), IndexTools::CalculateStepSize(), composeState(), ConstructActions(), MultiAgentDecisionProcessDiscreteFactoredStates::ConstructJointActions(), MultiAgentDecisionProcessDiscreteFactoredStates::ConstructJointObservations(), ConstructObservations(), FiveIslandsInLine, FourIslandsInLine, FourIslandsInSquare, FactoredDecPOMDPDiscrete::GetAgentScopeForLRF(), FactoredDecPOMDPDiscrete::GetNrAIs(), FactoredDecPOMDPDiscrete::GetNrXIs(), FactoredDecPOMDPDiscrete::GetStateFactorScopeForLRF(), MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN(), FactoredDecPOMDPDiscrete::InitializeInstantiationInformation(), InLine, Scope::Insert(), NewPacket, NewPacketProgressivePenalty, NewPacketSendAll, NoNewPacket, OneIsland, MultiAgentDecisionProcessDiscreteFactoredStates::SetActionsInitialized(), MultiAgentDecisionProcess::SetDescription(), MultiAgentDecisionProcessDiscreteFactoredStates::SetInitialized(), MultiAgentDecisionProcessDiscreteFactoredStates::SetISD(), MultiAgentDecisionProcess::SetName(), MultiAgentDecisionProcess::SetNrAgents(), FactoredDecPOMDPDiscrete::SetNrLRFs(), MultiAgentDecisionProcessDiscreteFactoredStates::SetObservationsInitialized(), FSDist_COF::SetProbability(), FactoredDecPOMDPDiscrete::SetRewardForLRF(), FactoredDecPOMDPDiscrete::SetRM(), FactoredDecPOMDPDiscrete::SetScopeForLRF(), MultiAgentDecisionProcessDiscreteFactoredStates::SetSparse(), MultiAgentDecisionProcessDiscreteFactoredStates::SetStatesInitialized(), MultiAgentDecisionProcess::SetUnixName(), SevenIslandsInLine, SixIslandsInLine, SmallBigSmallInLine, Scope::SoftPrint(), SoftPrintBriefDescription(), SoftPrintDescription(), splitState(), ThreeIslandsClustered, ThreeIslandsInLine, TwoIndependentIslands, and TwoIslands.

Referenced by ProblemAloha().

void ProblemAloha::SetYScopes ( )
protectedvirtual
string ProblemAloha::SoftPrintBriefDescription ( ) const
protectedvirtual
string ProblemAloha::SoftPrintDescription ( ) const
protectedvirtual

References SoftPrintBriefDescription().

Referenced by InitializeAloha().

string ProblemAloha::SoftPrintVariation ( AlohaVariation  variation) const
protectedvirtual
void ProblemAloha::splitObservation ( Index  oI,
Index status,
Index newPacket 
) const
private
void ProblemAloha::splitState ( Index  sI,
Index backlog,
Index newPacket 
) const
private
bool ProblemAloha::successFullySendPackage ( Index  y,
const std::vector< Index > &  Xs,
const std::vector< Index > &  As 
) const
protectedvirtual
string ProblemAloha::transmissionStatusToString ( Index  status) const
private

References COLLISION, IDLEo, and SUCCESS.

Referenced by ConstructObservations().

Member Data Documentation

IslandConfiguration ProblemAloha::_m_islandConf
private
size_t ProblemAloha::_m_maxBacklog
private
size_t ProblemAloha::_m_nrAgentsPassedOnCommandline
private

Referenced by InitializeAloha().

size_t ProblemAloha::_m_nrIslands
private
size_t* ProblemAloha::_m_stepSizeObservations
private
size_t* ProblemAloha::_m_stepSizeState
private