$search

DiscreteSpaceInformation Class Reference

base class for environments defining planning graphs It is independent of the graph search used The main means of communication between environment and graph search is through stateID. Each state is uniquely defined by stateID and graph search is ONLY aware of stateIDs. It doesn't know anything about the actual state variables. Environment, on the other hand, maintains a mapping from stateID to actual state variables (coordinates) using StateID2IndexMapping array More...

#include <environment.h>

Inheritance diagram for DiscreteSpaceInformation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool AreEquivalent (int StateID1, int StateID2)
 returns true if two states meet the same condition, brief this is used in some planners to figure out if two states are the same in some lower-dimensional manifold for example, in robotarm planning, two states could be equivalent if their end effectors are at the same position unless overwritten in a child class, this function is not implemented
 DiscreteSpaceInformation ()
 constructor
virtual void EnsureHeuristicsUpdated (bool bGoalHeuristics)
 checks the heuristics for consistency (some environments do not support this debugging call)
virtual std::vector< int > GetExpandedStates ()
virtual int GetFromToHeuristic (int FromStateID, int ToStateID)=0
 heuristic estimate from state FromStateID to state ToStateID
virtual int GetGoalHeuristic (int stateID)=0
 heuristic estimate from state with stateID to goal state
virtual void GetPreds (int TargetStateID, std::vector< int > *PredIDV, std::vector< int > *CostV)=0
 see comments for GetSuccs functon
virtual void GetRandomPredsatDistance (int TargetStateID, std::vector< int > *PredIDV, std::vector< int > *CLowV)
 see comments for GetRandomSuccsatDistance
virtual void GetRandomSuccsatDistance (int SourceStateID, std::vector< int > *SuccIDV, std::vector< int > *CLowV)
 the following two functions generate succs/preds at some domain-dependent distance. The number of generated succs/preds is up to the environment. NOTE: they MUST generate goal state as a succ/pred if it is within the distance from the state CLowV is the corresponding vector of lower bounds on the costs from the state to the successor states (or vice versa for preds function) unless overwritten in a child class, this function is not implemented
virtual int GetStartHeuristic (int stateID)=0
 heuristic estimate from start state to state with stateID
virtual void GetSuccs (int SourceStateID, std::vector< int > *SuccIDV, std::vector< int > *CostV)=0
 depending on the search used, it may call GetSuccs function (for forward search) or GetPreds function (for backward search) or both (for incremental search). At least one of this functions should be implemented (otherwise, there will be no search to run) Some searches may also use SetAllActionsandAllOutcomes or SetAllPreds functions if they keep the pointers to successors (predecessors) but most searches do not require this, so it is not necessary to support this
virtual bool InitializeEnv (const char *sEnvFile)=0
 initialization environment from file (see .cfg files for examples)
virtual bool InitializeMDPCfg (MDPConfig *MDPCfg)=0
 initialization of MDP data structure
virtual void PrintEnv_Config (FILE *fOut)=0
 prints environment config file
virtual void PrintState (int stateID, bool bVerbose, FILE *fOut=NULL)=0
 prints the state variables for a state with stateID
virtual void SetAllActionsandAllOutcomes (CMDPSTATE *state)=0
 see comments for GetSuccs functon
virtual void SetAllPreds (CMDPSTATE *state)=0
 see comments for GetSuccs functon
virtual bool SetEnvParameter (const char *parameter, int value)
 sets a parameter to a value. The set of supported parameters depends on the particular environment
virtual int SizeofCreatedEnv ()=0
 returns the number of states (hashentries) created
virtual ~DiscreteSpaceInformation ()
 destructor

Public Attributes

FILE * fDeb
 debugging file
std::vector< int * > StateID2IndexMapping
 mapping from hashentry stateID (used in environment to contain the coordinates of a state, say x,y or x,y,theta) to an array of state indices used in searches. If a single search is done, then it is a single entry. So StateID2IndexMapping[100][0] = 5 means that hashentry with stateID 100 is mapped onto search index = 5 in search 0 The value of -1 means that no search state has been created yet for this hashentry

Detailed Description

base class for environments defining planning graphs It is independent of the graph search used The main means of communication between environment and graph search is through stateID. Each state is uniquely defined by stateID and graph search is ONLY aware of stateIDs. It doesn't know anything about the actual state variables. Environment, on the other hand, maintains a mapping from stateID to actual state variables (coordinates) using StateID2IndexMapping array

Definition at line 38 of file environment.h.


Constructor & Destructor Documentation

virtual DiscreteSpaceInformation::~DiscreteSpaceInformation (  )  [inline, virtual]

destructor

Definition at line 156 of file environment.h.

DiscreteSpaceInformation::DiscreteSpaceInformation (  )  [inline]

constructor

Definition at line 168 of file environment.h.


Member Function Documentation

virtual bool DiscreteSpaceInformation::AreEquivalent ( int  StateID1,
int  StateID2 
) [inline, virtual]

returns true if two states meet the same condition, brief this is used in some planners to figure out if two states are the same in some lower-dimensional manifold for example, in robotarm planning, two states could be equivalent if their end effectors are at the same position unless overwritten in a child class, this function is not implemented

Reimplemented in EnvironmentNAV2D, and EnvironmentROBARM.

Definition at line 119 of file environment.h.

virtual void DiscreteSpaceInformation::EnsureHeuristicsUpdated ( bool  bGoalHeuristics  )  [inline, virtual]

checks the heuristics for consistency (some environments do not support this debugging call)

Reimplemented in EnvironmentNAVXYTHETALATTICE.

Definition at line 145 of file environment.h.

virtual std::vector<int> DiscreteSpaceInformation::GetExpandedStates (  )  [inline, virtual]

NOTE - for debugging door planner - ben 8.31.09

Definition at line 107 of file environment.h.

virtual int DiscreteSpaceInformation::GetFromToHeuristic ( int  FromStateID,
int  ToStateID 
) [pure virtual]
virtual int DiscreteSpaceInformation::GetGoalHeuristic ( int  stateID  )  [pure virtual]
virtual void DiscreteSpaceInformation::GetPreds ( int  TargetStateID,
std::vector< int > *  PredIDV,
std::vector< int > *  CostV 
) [pure virtual]

see comments for GetSuccs functon

virtual void DiscreteSpaceInformation::GetRandomPredsatDistance ( int  TargetStateID,
std::vector< int > *  PredIDV,
std::vector< int > *  CLowV 
) [inline, virtual]

see comments for GetRandomSuccsatDistance

Reimplemented in EnvironmentNAV2D.

Definition at line 136 of file environment.h.

virtual void DiscreteSpaceInformation::GetRandomSuccsatDistance ( int  SourceStateID,
std::vector< int > *  SuccIDV,
std::vector< int > *  CLowV 
) [inline, virtual]

the following two functions generate succs/preds at some domain-dependent distance. The number of generated succs/preds is up to the environment. NOTE: they MUST generate goal state as a succ/pred if it is within the distance from the state CLowV is the corresponding vector of lower bounds on the costs from the state to the successor states (or vice versa for preds function) unless overwritten in a child class, this function is not implemented

Reimplemented in EnvironmentNAV2D, and EnvironmentROBARM.

Definition at line 129 of file environment.h.

virtual int DiscreteSpaceInformation::GetStartHeuristic ( int  stateID  )  [pure virtual]
virtual void DiscreteSpaceInformation::GetSuccs ( int  SourceStateID,
std::vector< int > *  SuccIDV,
std::vector< int > *  CostV 
) [pure virtual]

depending on the search used, it may call GetSuccs function (for forward search) or GetPreds function (for backward search) or both (for incremental search). At least one of this functions should be implemented (otherwise, there will be no search to run) Some searches may also use SetAllActionsandAllOutcomes or SetAllPreds functions if they keep the pointers to successors (predecessors) but most searches do not require this, so it is not necessary to support this

virtual bool DiscreteSpaceInformation::InitializeEnv ( const char *  sEnvFile  )  [pure virtual]

initialization environment from file (see .cfg files for examples)

Implemented in EnvironmentNAV2D, EnvironmentNAV2DUU, EnvironmentNAVXYTHETALATTICE, AdjacencyListSBPLEnv< Coords >, EnvironmentROBARM, and EnvironmentXXX.

virtual bool DiscreteSpaceInformation::InitializeMDPCfg ( MDPConfig MDPCfg  )  [pure virtual]
virtual void DiscreteSpaceInformation::PrintEnv_Config ( FILE *  fOut  )  [pure virtual]
virtual void DiscreteSpaceInformation::PrintState ( int  stateID,
bool  bVerbose,
FILE *  fOut = NULL 
) [pure virtual]

prints the state variables for a state with stateID

Implemented in EnvironmentNAV2D, EnvironmentNAV2DUU, EnvironmentNAVXYTHETALAT, AdjacencyListSBPLEnv< Coords >, EnvironmentROBARM, and EnvironmentXXX.

virtual void DiscreteSpaceInformation::SetAllActionsandAllOutcomes ( CMDPSTATE state  )  [pure virtual]
virtual void DiscreteSpaceInformation::SetAllPreds ( CMDPSTATE state  )  [pure virtual]
virtual bool DiscreteSpaceInformation::SetEnvParameter ( const char *  parameter,
int  value 
) [inline, virtual]

sets a parameter to a value. The set of supported parameters depends on the particular environment

Reimplemented in EnvironmentNAV2D, and EnvironmentNAVXYTHETALATTICE.

Definition at line 100 of file environment.h.

virtual int DiscreteSpaceInformation::SizeofCreatedEnv (  )  [pure virtual]

returns the number of states (hashentries) created

Implemented in EnvironmentNAV2D, EnvironmentNAV2DUU, EnvironmentNAVXYTHETALAT, AdjacencyListSBPLEnv< Coords >, EnvironmentROBARM, and EnvironmentXXX.


Member Data Documentation

debugging file

Definition at line 52 of file environment.h.

mapping from hashentry stateID (used in environment to contain the coordinates of a state, say x,y or x,y,theta) to an array of state indices used in searches. If a single search is done, then it is a single entry. So StateID2IndexMapping[100][0] = 5 means that hashentry with stateID 100 is mapped onto search index = 5 in search 0 The value of -1 means that no search state has been created yet for this hashentry

Definition at line 48 of file environment.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


sbpl
Author(s): Maxim Likhachev/maximl@seas.upenn.edu
autogenerated on Fri Mar 1 14:18:59 2013