MultiAgentDecisionProcess
Release 0.2.1
|
GeneralizedMAAStarPlannerForDecPOMDPDiscrete is a class that represents the Generalized MAA* planner. More...
#include <GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h>
Public Member Functions | |
GeneralizedMAAStarPlannerForDecPOMDPDiscrete (const PlanningUnitMADPDiscreteParameters ¶ms, size_t horizon=3, DecPOMDPDiscreteInterface *p=0, int verbose_level=0) | |
(default) Constructor | |
GeneralizedMAAStarPlannerForDecPOMDPDiscrete (size_t horizon=3, DecPOMDPDiscreteInterface *p=0) | |
double | GetExpectedReward () const |
Returns the expected reward of the best found joint policy. | |
JointPolicy * | GetJointPolicy () |
virtual GeneralizedMAAStarPlannerForDecPOMDPDiscrete * | GetThisFromMostDerivedPU () |
every derived class must implement this function as follows: | |
GeneralizedMAAStarPlannerForDecPOMDPDiscrete & | operator= (const GeneralizedMAAStarPlannerForDecPOMDPDiscrete &o) |
Destructor. | |
void | Plan () |
void | SetQHeuristic (QFunctionJAOHInterface &q) |
void | SetQHeuristic (QFunctionJAOHInterface *q) |
![]() | |
double | GetDiscount () const |
Returns the discount parameter. | |
virtual JointPolicyPureVector * | GetJointPolicyPureVector (void) |
Returns the expected reward of the best found joint policy. | |
DecPOMDPDiscreteInterface * | GetReferred () const |
Returns the DecPOMDPDiscreteInterface pointer. | |
double | GetReward (Index sI, Index jaI) const |
Return the reward for state, joint action indices. | |
PlanningUnitDecPOMDPDiscrete (const PlanningUnitMADPDiscreteParameters ¶ms, size_t horizon=3, DecPOMDPDiscreteInterface *p=0) | |
the (default) Constructor. | |
PlanningUnitDecPOMDPDiscrete (size_t horizon=3, DecPOMDPDiscreteInterface *p=0) | |
void | SetProblem (DecPOMDPDiscreteInterface *p) |
Set the problem (DecPOMDPDiscreteInterface) using a pointer. | |
void | SetReferred (DecPOMDPDiscreteInterface *p) |
Tell which SetReferred to use by default. | |
![]() | |
Referrer (DecPOMDPDiscreteInterface *t_p=0) | |
(default) Constructor | |
Referrer (DecPOMDPDiscreteInterface &t) | |
Alternative constructor. | |
Referrer (const Referrer &a) | |
Copy constructor. | |
virtual | ~Referrer () |
Destructor. | |
![]() | |
virtual bool | AreCachedJointToIndivIndices (PolicyGlobals::IndexDomainCategory pdc) const |
Check whether certain index conversions are cached. | |
void | ComputeHistoryArrays (Index hI, Index t, Index t_offset, Index Indices[], size_t indexDomainSize) const |
This function computes the indices of the sequence corr. | |
Index | ComputeHistoryIndex (Index t, Index t_offset, const Index indices[], size_t indexDomainSize) const |
This function computes the index of a history. | |
const Action * | GetAction (Index agentI, Index a) const |
Returns a ref to the a-th action of agent agentI. | |
void | GetActionHistoryArrays (Index agentI, Index ahI, Index t, Index aIs[]) const |
Computes the joint actions for jahI. | |
ActionHistoryTree * | GetActionHistoryTree (Index agentI, Index ohI) const |
Returns a pointer to action history# ohI of agent# agentI. | |
void | GetActionObservationHistoryArrays (Index agentI, Index aohI, Index t, Index aIs[], Index oIs[]) const |
Computes the joint actions and observations for aohI. | |
Index | GetActionObservationHistoryIndex (Index agentI, Index t, const std::vector< Index > &actions, const std::vector< Index > &observations) const |
converts the vectors of actions and observations of length t to a (individual) ObservationHistory Index for agentI. | |
ActionObservationHistoryTree * | GetActionObservationHistoryTree (Index agentI, Index aohI) const |
Returns a pointer to observation history# ohI of agent# agentI. | |
virtual PolicyGlobals::IndexDomainCategory | GetDefaultIndexDomCat () const |
Return the default IndexDomainCategory for the problem. | |
Index | GetFirstJointActionObservationHistoryIndex (Index ts) const |
Returns the index of the first joint action observation history of time step ts. | |
Index | GetFirstJointObservationHistoryIndex (Index ts) const |
Returns the index of the first joint observation history of time step ts. | |
Index | GetFirstObservationHistoryIndex (Index agI, Index ts) const |
Returns the index of the first ts observation history of agent agI. | |
double | GetInitialStateProbability (Index sI) const |
Returns the probability of a state in the initial state distribution. | |
double | GetJAOHProb (Index jaohI, Index p_jaohI=0, const JointBeliefInterface *p_jb=NULL, const JointPolicyDiscrete *jpol=NULL) const |
returns the probability of jaohI. | |
double | GetJAOHProbGivenPred (Index jaohI) const |
Gives the conditional probability of the realization of the joint action-observation history jaohI (and thus of the joint belief corresponding to JointActionObservationHistory jaohI). | |
double | GetJAOHProbs (JointBeliefInterface *jb, Index jaohI, Index p_jaohI=0, const JointBeliefInterface *p_jb=NULL, const JointPolicyDiscrete *jpol=NULL) const |
returns the probability of jaohI AND the corresponding joint belief given the predecessor p_jaohI (and its corresponding belief) | |
double | GetJAOHProbsRecursively (JointBeliefInterface *jb, const Index jaIs[], const Index joIs[], Index t_p, Index t, Index p_jaohI=0, const JointPolicyDiscrete *jpol=NULL) const |
the function that perfoms most of the work, called by GetJAOHProbs. | |
const JointAction * | GetJointAction (Index jaI) const |
Returns a ref to the i-th joint action. | |
Index | GetJointActionHistoryIndex (Index t, const std::vector< Index > &jointActions) const |
converts the vector joint observations of length t to a JointObservationHistory Index. | |
Index | GetJointActionHistoryIndex (Index t, const Index jointActions[]) const |
converts the vector joint observations of length t to a JointObservationHistory Index. | |
Index | GetJointActionHistoryIndex (JointActionHistoryTree *joh) const |
Returns the index of a JointActionHistoryTree pointer. | |
JointActionHistoryTree * | GetJointActionHistoryTree (Index jahI) const |
Returns a pointer to joint action history#. | |
void | GetJointActionObservationHistoryArrays (Index jaohI, Index t, Index jaIs[], Index joIs[]) const |
Computes the joint actions and observations for jaohI. | |
Index | GetJointActionObservationHistoryIndex (JointActionObservationHistoryTree *jaoh) const |
Returns the index of a JointObservationHistoryTree pointer. | |
Index | GetJointActionObservationHistoryIndex (Index t, const std::vector< Index > &Jactions, const std::vector< Index > &Jobservations) const |
converts the vectors of actions and observations of length t to a joint ActionObservationHistory Index. | |
JointActionObservationHistoryTree * | GetJointActionObservationHistoryTree (Index jaohI) const |
Returns a pointer to JointActionObservation history#. | |
void | GetJointActionObservationHistoryVectors (Index jaohI, std::vector< Index > &jaIs, std::vector< Index > &joIs) const |
returns the vectors with joint actions and observations for JointActionObservationHistory jaohi. | |
JointBeliefInterface * | GetJointBeliefInterface (Index jaohI) const |
brief Returns a pointer to a new joint belief. | |
const JointObservation * | GetJointObservation (Index joI) const |
Returns a ref to the joI-th joint observation. | |
void | GetJointObservationHistoryArrays (Index johI, Index t, Index joIs[]) const |
Computes the joint observations for johI. | |
Index | GetJointObservationHistoryIndex (JointObservationHistoryTree *joh) const |
Returns the index of a JointObservationHistoryTree pointer. | |
Index | GetJointObservationHistoryIndex (Index t, const std::vector< Index > &jointObservations) const |
converts the vector joint observations of length t to a JointObservationHistory Index. | |
Index | GetJointObservationHistoryIndex (Index t, const Index jointObservations[]) const |
converts the vector joint observations of length t to a JointObservationHistory Index. | |
JointObservationHistoryTree * | GetJointObservationHistoryTree (Index johI) const |
Returns a pointer to joint observation history#. | |
MultiAgentDecisionProcessDiscreteInterface * | GetMADPDI () |
const MultiAgentDecisionProcessDiscreteInterface * | GetMADPDI () const |
JointBeliefInterface * | GetNewJointBeliefFromISD () const |
Returns a new joint belief with the value of the initial state distribution. | |
virtual JointBeliefInterface * | GetNewJointBeliefInterface () const |
a function that forces derives classes to specify which types of joint beliefs are used. | |
virtual JointBeliefInterface * | GetNewJointBeliefInterface (size_t size) const |
size_t | GetNrActionHistories (Index agentI) const |
Returns the number of action histories for agentI. | |
size_t | GetNrActionObservationHistories (Index agentI) const |
Returns the number of action observation histories for agentI. | |
const std::vector< size_t > & | GetNrActions () const |
Returns the number of actions vector. | |
size_t | GetNrActions (Index agentI) const |
Returns the number of actions of agent agentI. | |
size_t | GetNrAgents () const |
Gets the number of agents. | |
size_t | GetNrJointActionHistories () const |
Returns the number of joint action histories. | |
size_t | GetNrJointActionObservationHistories () const |
Returns the number of jointActionObservation histories. | |
size_t | GetNrJointActions () const |
return the number of joint actions. | |
size_t | GetNrJointObservationHistories () const |
Returns the number of joint observation histories. | |
size_t | GetNrJointObservationHistories (Index ts) const |
Returns the number of joint observation histories for time step ts. | |
size_t | GetNrJointObservations () const |
Returns the number of joint observations. | |
LIndex | GetNrJointPolicies () const |
Returns the number of joint policies. | |
size_t | GetNrObservationHistories (Index agentI) const |
Returns the number of observation histories for agentI. | |
size_t | GetNrObservationHistories (Index agentI, Index ts) const |
Returns the number of observation histories for agentI for time step ts. | |
const std::vector< size_t > | GetNrObservationHistoriesVector () const |
Returns a vector with the number of OHs for each agent. | |
const std::vector< size_t > | GetNrObservationHistoriesVector (Index ts) const |
Returns a vector with the number of OHs in stage ts for each agent. | |
const std::vector< size_t > & | GetNrObservations () const |
Returns the number of observations vector. | |
size_t | GetNrObservations (Index agentI) const |
Returns the number of observations of agent agentI. | |
LIndex | GetNrPolicies (Index agentI) const |
Returns the number of policies for agentI. | |
size_t | GetNrPolicyDomainElements (Index agentI, PolicyGlobals::IndexDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of elements in the domain of an agent's policy. | |
size_t | GetNrStates () const |
Returns the number of states. | |
const Observation * | GetObservation (Index agentI, Index o) const |
Returns a ref to the o-th observation of agent agentI. | |
void | GetObservationHistoryArrays (Index agentI, Index ohI, Index t, Index oIs[]) const |
Computes the observations for ohI. | |
Index | GetObservationHistoryIndex (Index agentI, Index t, const std::vector< Index > &observations) const |
converts the vector observations of length t to a (individual) ObservationHistory Index for agentI. | |
ObservationHistoryTree * | GetObservationHistoryTree (Index agentI, Index ohI) const |
Returns a pointer to observation history# ohI of agent# agentI. | |
const ObservationModelDiscrete * | GetObservationModelDiscretePtr () const |
double | GetObservationProbability (Index jaI, Index sucSI, Index joI) const |
Returns P(joI | jaI, sucSI ). Arguments are time-ordered. | |
const PlanningUnitMADPDiscreteParameters & | GetParams () const |
Get the parameters for this planning unit. | |
const MultiAgentDecisionProcessDiscreteInterface * | GetProblem () const |
Returns a reference to the problem of the PlanningUnitMADPDiscrete. | |
MultiAgentDecisionProcessDiscreteInterface * | GetProblem () |
const State * | GetState (Index i) const |
Get a pointer to a State by index. | |
Index | GetSuccessorAHI (Index agentI, Index ohI, Index oI) const |
Index | GetSuccessorAOHI (Index agI, Index aohI, Index aI, Index oI) const |
Returns the index of the successor of joint action-observation history jaohI via joint action jaI and joint observation joI. | |
Index | GetSuccessorJAHI (Index johI, Index joI) const |
Index | GetSuccessorJAOHI (Index jaohI, Index jaI, Index joI) const |
Returns the index of the successor of agent agI's action-observation history aohI via action aI and observation oI. | |
Index | GetSuccessorJOHI (Index johI, Index joI) const |
Returns the index of the successor of observation history johI via joint observation joI. | |
Index | GetSuccessorOHI (Index agentI, Index ohI, Index oI) const |
Returns the index of the successor of observation history ohI of agentI via observation joI. | |
Index | GetTimeStepForAHI (Index agentI, Index ohI) const |
Returns the time step of observation history ohI. | |
Index | GetTimeStepForAOHI (Index agentI, Index aohI) const |
Returns the time step of joint action-observation historyaohI. | |
Index | GetTimeStepForJAHI (Index johI) const |
Returns the time step of joint observation history johI. | |
Index | GetTimeStepForJAOHI (Index jaohI) const |
Returns the time step of joint action-observation historyjaohI. | |
Index | GetTimeStepForJOHI (Index johI) const |
Returns the time step of joint observation history johI. | |
Index | GetTimeStepForOHI (Index agentI, Index ohI) const |
Returns the time step of observation history ohI. | |
const TransitionModelDiscrete * | GetTransitionModelDiscretePtr () const |
double | GetTransitionProbability (Index sI, Index jaI, Index sucSI) const |
Returns the trans. prob for state, joint action, suc state indices. | |
Index | IndividualToJointActionHistoryIndex (Index t, const std::vector< Index > &indivIs) const |
converts individual history indices to a joint index | |
Index | IndividualToJointActionIndices (const Index *indivActionIndices) const |
Returns the joint action index that corresponds to the array of specified individual action indices. | |
Index | IndividualToJointActionIndices (const std::vector< Index > &indivActionIndices) const |
Returns the joint action index that corresponds to the vector of specified individual action indices. | |
Index | IndividualToJointActionObservationHistoryIndex (Index t, const std::vector< Index > &indivIs) const |
converts individual history indices to a joint index | |
Index | IndividualToJointObservationHistoryIndex (Index t, const std::vector< Index > &indivIs) const |
converts individual history indices to a joint index | |
Index | IndividualToJointObservationIndices (std::vector< Index > &inObs) const |
Returns the joint observation index that corresponds to the vector of specified individual observation indices. | |
void | JointAOHIndexToIndividualActionObservationVectors (Index jaohI, std::vector< std::vector< Index > > &indivO_vec, std::vector< std::vector< Index > > &indivA_vec) const |
computes the vectors of actions and obs. | |
void | JointAOHIndexToIndividualActionObservationVectors (Index jaohI, std::vector< std::vector< Index > > &indivAO_vec) const |
computes the vector of action-observations corresponding to jaohI indivAO_vec[agentI][t] = aoI | |
std::vector< Index > | JointToIndividualActionHistoryIndices (Index JAHistI) const |
Returns a vector containing the indices of the individual ObservationHistory s corresponding to the JointActionHistory index JAHistI. | |
const std::vector< Index > & | JointToIndividualActionHistoryIndicesRef (Index JAHistI) const |
Returns a reference to a cached vector containing the indices of the indiv. | |
std::vector< Index > | JointToIndividualActionIndices (Index jaI) const |
Returns a vector containing the indices of the indiv. | |
std::vector< Index > | JointToIndividualActionObservationHistoryIndices (Index jaohI) const |
Returns a vector containing the indices of the indiv. | |
const std::vector< Index > & | JointToIndividualActionObservationHistoryIndicesRef (Index jaohI) const |
Returns a vector containing the indices of the indiv. | |
std::vector< Index > | JointToIndividualObservationHistoryIndices (Index johI) const |
Returns a vector containing the indices of the indiv. | |
const std::vector< Index > & | JointToIndividualObservationHistoryIndicesRef (Index johI) const |
Returns a vector containing the indices of the indiv. | |
std::vector< Index > | JointToIndividualObservationIndices (Index joI) const |
Returns a vector containing the indices of the indiv. | |
std::vector< Index > | JointToIndividualPolicyDomainIndices (Index jdI, PolicyGlobals::IndexDomainCategory cat) const |
Converts joint indices to individual policy domain element indices. | |
const std::vector< Index > & | JointToIndividualPolicyDomainIndicesRef (Index jdI, PolicyGlobals::IndexDomainCategory cat) const |
Converts individual policy domain element indices to joint indices. | |
PlanningUnitMADPDiscrete (const PlanningUnitMADPDiscreteParameters ¶ms, size_t horizon=3, MultiAgentDecisionProcessDiscreteInterface *p=0) | |
Constructor with specified parameters. | |
PlanningUnitMADPDiscrete (size_t horizon=3, MultiAgentDecisionProcessDiscreteInterface *p=0) | |
Constructor with default parameters. | |
void | Print () |
Prints info regarding the planning unit. | |
void | PrintActionHistories () |
Prints the action histories for all agents. | |
void | PrintActionObservationHistories () |
Prints the actionObservation histories for all agents. | |
void | PrintObservationHistories () |
Prints the observation histories for all agents. | |
void | RegisterJointActionObservationHistoryTree (JointActionObservationHistoryTree *jaoht) |
Register a new jaoht in the vector of indices. | |
void | SetHorizon (size_t h) |
Sets the horizon for the planning problem. | |
void | SetParams (const PlanningUnitMADPDiscreteParameters ¶ms) |
Sets the parameters for this planning unit. | |
void | SetProblem (MultiAgentDecisionProcessDiscreteInterface *madp) |
Sets the problem for which to plan, using a pointer. | |
std::string | SoftPrintAction (Index agentI, Index actionI) const |
soft prints action actionI of agent agentI. | |
std::string | SoftPrintObservationHistory (Index agentI, Index ohIndex) const |
soft prints ObservationHistory ohIndex of agent agentI. | |
std::string | SoftPrintPolicyDomainElement (Index agentI, Index dI, PolicyGlobals::IndexDomainCategory cat) const |
Virtual function that has to be implemented by derived class. | |
~PlanningUnitMADPDiscrete () | |
Destructor. | |
![]() | |
size_t | GetHorizon () const |
Returns the planning horizon. | |
Index | GetNextAgentIndex () |
Maintains a agent index and returns the next one on calling */. | |
int | GetSeed () const |
Returns the random seed stored. | |
void | InitSeed () const |
Initializes the random number generator (srand) to the stored seed. | |
PlanningUnit (size_t horizon, MultiAgentDecisionProcessInterface *p) | |
(default) Constructor | |
void | SetProblem (MultiAgentDecisionProcessInterface *p) |
Updates the problem pointer. | |
void | SetSeed (int s) |
Stores the random seed and calls InitSeed(). | |
virtual | ~PlanningUnit () |
Destructor. | |
![]() | |
LIndex | GetNrJointPolicies (PolicyGlobals::IndexDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of joint policies, given the policy's domain. | |
LIndex | GetNrPolicies (Index ag, PolicyGlobals::IndexDomainCategory cat, size_t depth=MAXHORIZON) const |
Get the number of policies for an agent, given the policy's domain. | |
virtual | ~Interface_ProblemToPolicyDiscretePure () |
Destructor. | |
![]() | |
Interface_ProblemToPolicyDiscrete () | |
(default) Constructor | |
virtual | ~Interface_ProblemToPolicyDiscrete () |
Destructor. | |
![]() | |
Referrer (MultiAgentDecisionProcessDiscreteInterface *t_p=0) | |
(default) Constructor | |
Referrer (MultiAgentDecisionProcessDiscreteInterface &t) | |
Alternative constructor. | |
Referrer (const Referrer &a) | |
Copy constructor. | |
void | SetReferred (MultiAgentDecisionProcessDiscreteInterface *t_p) |
Change the referred thing... | |
virtual | ~Referrer () |
Destructor. | |
![]() | |
GeneralizedMAAStarPlanner (int verbose_level=0, double slack=0.0) | |
(default) Constructor | |
JointPolicyDiscrete * | GetJointPolicyDiscrete () |
JointPolicyDiscretePure * | GetJointPolicyDiscretePure () |
LIndex | GetMaxJPolPoolSize () const |
LIndex | GetNrEvaluatedJPolBGs () const |
GeneralizedMAAStarPlanner & | operator= (const GeneralizedMAAStarPlanner &o) |
Copy assignment operator. | |
void | SetIntermediateResultFile (std::ofstream &of) |
void | SetIntermediateTimingFilename (std::string filename) |
void | SetSaveAllBGs (std::string filename) |
void | SetVerbose (int verbose) |
~GeneralizedMAAStarPlanner () | |
Destructor. | |
![]() | |
void | AddTimedEvent (const std::string &id, clock_t duration) |
Adds event of certain duration, e.g., an external program call. | |
std::vector< double > | GetTimedEventDurations (const std::string &id) |
Returns all stored durations (in s) for a particular event. | |
void | LoadTimers (const std::string &filename) |
Load timing info from file filename. | |
void | PrintTimers () const |
Print stored timing info. | |
void | PrintTimersSummary () const |
Sums data and prints out a summary. | |
void | SaveTimers (const std::string &filename) const |
Save collected timing info to file filename. | |
void | SaveTimers (std::ofstream &of) const |
Save collected timing info to ofstream of. | |
void | StartTimer (const std::string &id) const |
Start to time an event identified by id. | |
void | StopTimer (const std::string &id) const |
Stop to time an event identified by id. | |
TimedAlgorithm () | |
(default) Constructor | |
virtual | ~TimedAlgorithm () |
Destructor. |
Protected Member Functions | |
virtual PartialJointPolicyDiscretePure * | ConstructExtendedJointPolicy (const PartialJointPolicyDiscretePure &jpolPrevTs, const JointPolicyDiscretePure &jpolBG, const std::vector< size_t > &nrOHts, const std::vector< Index > &firstOHtsI) |
Extends a previous policy jpolPrevTs to the next stage. | |
double | GetHeuristicQ (Index joahI, Index jaI) const |
virtual PartialJointPolicyDiscretePure * | NewJPol () const |
Returns a new policy of the type used by the GMAA implementation. | |
virtual PartialPolicyPoolInterface * | NewPP () const |
Return a new PartialPolicyPoolInterface*. | |
virtual PartialPolicyPoolItemInterface * | NewPPI (PartialJointPolicyDiscretePure *jp, double v) const |
Return a new PartialPolicyPoolItemInterface*. | |
![]() | |
bool | SanityCheck () const |
Runs some consistency tests. | |
![]() | |
virtual bool | ConstructAndValuateNextPolicies (PartialPolicyPoolItemInterface *ppi, PartialPolicyPoolInterface *poolOfNextPolicies)=0 |
The 'NEXT' function as described in refGMAA. | |
void | Prune (PartialPolicyPoolInterface &JPVs, size_t k) |
void | SelectKBestPoliciesToProcessFurther (PartialPolicyPoolInterface *poolOfNextPolicies, bool are_LBs, double bestLB, size_t k) |
Returns the k best-ranked (partial) joint policies. | |
virtual void | SelectPoliciesToProcessFurther (PartialPolicyPoolInterface *poolOfNextPolicies, bool are_LBs, double bestLB)=0 |
Limits the policies to be further examined. |
Protected Attributes | |
QFunctionJAOHInterface * | _m_qHeuristic |
A pointer to the heuristic used by this. | |
![]() | |
std::string | _m_bgBaseFilename |
size_t | _m_bgCounter |
double | _m_expectedRewardFoundPolicy |
the expected reward of the best found policy | |
JointPolicyDiscretePure * | _m_foundPolicy |
the best found policy | |
std::ofstream * | _m_intermediateResultFile |
Pointer to an file stream to store the intermediate (timing) results. | |
std::string | _m_intermediateTimingFilename |
LIndex | _m_maxJPolPoolSize |
a counter that maintains the maximum size of the policy pool during the planning process. | |
LIndex | _m_nrJPolBGsEvaluated |
size_t | _m_nrPoliciesToProcess |
bool | _m_saveIntermediateTiming |
double | _m_slack |
when the heuristic is not admissible, or the past reward is an approximation, we may add some slack such that good policies are not pruned | |
bool | _m_useSparseBeliefs |
int | _m_verboseness |
the level of verboseness, default=0, >0 verbose, <0 silent |
GeneralizedMAAStarPlannerForDecPOMDPDiscrete is a class that represents the Generalized MAA* planner.
This implements GMAA pretty much as described in refGMAA (see DOC-References.h). The 'NEXT' as described in refGMAA, is called 'ConstructAndValuateNextPolicies'.
Additionally there is a function 'SelectPoliciesToProcessFurther'. (not to be confused with the 'SELECT' function from refGMAA !!!) Given the result of ConstructAndValuateNextPolicies, SelectPoliciesToProcessFurther determines which of these will actually be added to the policy pool. I.e., ConstructAndValuateNextPolicies and SelectPoliciesToProcessFurther together form 'NEXT'.
The 'SELECT' function as described in refGMAA is implemented by the policy pool (see PartialPolicyPoolInterface) itself.
This class also implements a 'NEXT' and 'SELECT' functions that can be used by derived classes.
Definition at line 72 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
GeneralizedMAAStarPlannerForDecPOMDPDiscrete::GeneralizedMAAStarPlannerForDecPOMDPDiscrete | ( | const PlanningUnitMADPDiscreteParameters & | params, |
size_t | horizon = 3 , |
||
DecPOMDPDiscreteInterface * | p = 0 , |
||
int | verbose_level = 0 |
||
) |
(default) Constructor
Definition at line 47 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
References _m_qHeuristic, GeneralizedMAAStarPlanner::_m_useSparseBeliefs, PlanningUnitMADPDiscrete::GetParams(), and PlanningUnitMADPDiscreteParameters::GetUseSparseJointBeliefs().
GeneralizedMAAStarPlannerForDecPOMDPDiscrete::GeneralizedMAAStarPlannerForDecPOMDPDiscrete | ( | size_t | horizon = 3 , |
DecPOMDPDiscreteInterface * | p = 0 |
||
) |
Definition at line 61 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
References _m_qHeuristic, GeneralizedMAAStarPlanner::_m_useSparseBeliefs, PlanningUnitMADPDiscrete::GetParams(), and PlanningUnitMADPDiscreteParameters::GetUseSparseJointBeliefs().
|
protectedvirtual |
Extends a previous policy jpolPrevTs to the next stage.
This function extends a previous policy jpolPrevTs for ts-1 with the behavior specified by the policy of the BayesianGame for time step ts (jpolBG). jpolPrevTs - a joint policy for the DecPOMDP up to time step ts-1 (i.e. with depth=ts-2) jpolBG - a joint policy for the BayesianGame for time step ts. nrOHts - a vector that specifies the number of observation histories for eac agents at time step ts. firstOHtsI - a vector that specifies the index of the first observation history in time step ts for each agent (this functions as the offset in the conversion BG->DecPOMDP index conversion).
returns a new JointPolicyPureVector (so it must be explicitly deleted)
Implements GeneralizedMAAStarPlanner.
Definition at line 89 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
References JointPolicyDiscretePure::GetActionIndex(), JointPolicy::GetDepth(), JointPolicyDiscrete::GetIndexDomainCategory(), PlanningUnitMADPDiscrete::GetNrAgents(), PolicyGlobals::OHIST_INDEX, JointPolicyDiscretePure::SetAction(), JointPolicy::SetDepth(), and PolicyGlobals::TYPE_INDEX.
Referenced by GMAA_MAAstar::ConstructAndValuateNextPolicies(), and GMAA_kGMAA::ConstructAndValuateNextPolicies().
|
inlinevirtual |
Returns the expected reward of the best found joint policy.
Implements PlanningUnitDecPOMDPDiscrete.
Definition at line 161 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
|
inlineprotected |
Definition at line 170 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
References _m_qHeuristic, and QFunctionJAOHInterface::GetQ().
|
inline |
Reimplemented from GeneralizedMAAStarPlanner.
Definition at line 163 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
|
inlinevirtual |
every derived class must implement this function as follows:
GetThisFromMostDerivedPU() { return this; } Giving us access to the Interface_ProblemToPolicyDiscretePure in this base class.
Implements GeneralizedMAAStarPlanner.
Definition at line 155 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
|
protectedvirtual |
Returns a new policy of the type used by the GMAA implementation.
Implements GeneralizedMAAStarPlanner.
Reimplemented in GMAA_kGMAA.
Definition at line 120 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
References PolicyGlobals::OHIST_INDEX.
|
protectedvirtual |
Return a new PartialPolicyPoolInterface*.
This function returns a pointer to new instance of the PartialPolicyPoolInterface used by this class.
Implements GeneralizedMAAStarPlanner.
Definition at line 140 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
|
protectedvirtual |
Return a new PartialPolicyPoolItemInterface*.
This function returns a pointer to new instance of the PartialPolicyPoolItemInterface used by this class.
we know that jp is a PartialJointPolicyPureVector (see NewJPol above)
Implements GeneralizedMAAStarPlanner.
Definition at line 125 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
GeneralizedMAAStarPlannerForDecPOMDPDiscrete & GeneralizedMAAStarPlannerForDecPOMDPDiscrete::operator= | ( | const GeneralizedMAAStarPlannerForDecPOMDPDiscrete & | o | ) |
Destructor.
Copy assignment operator
Definition at line 79 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.cpp.
|
inline |
Reimplemented from GeneralizedMAAStarPlanner.
Definition at line 159 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
|
inline |
Definition at line 149 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
References _m_qHeuristic.
|
inline |
Definition at line 151 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
References _m_qHeuristic.
|
protected |
A pointer to the heuristic used by this.
Definition at line 80 of file GeneralizedMAAStarPlannerForDecPOMDPDiscrete.h.
Referenced by GMAA_MAAstar::ConstructAndValuateNextPolicies(), GMAA_kGMAA::ConstructAndValuateNextPolicies(), GeneralizedMAAStarPlannerForDecPOMDPDiscrete(), GetHeuristicQ(), and SetQHeuristic().