HOG2
Public Member Functions | Private Types | Private Attributes | List of all members
gLSSLRTAStar< state, action, environment > Class Template Reference

#include <gLSSLRTAStar.h>

Inheritance diagram for gLSSLRTAStar< state, action, environment >:
Inheritance graph
[legend]
Collaboration diagram for gLSSLRTAStar< state, action, environment >:
Collaboration graph
[legend]

Public Member Functions

 gLSSLRTAStar (int nodeLimit=8)
 
virtual ~gLSSLRTAStar (void)
 
void SetAvoidLearning (bool val)
 
void GetPath (environment *env, const state &from, const state &to, std::vector< state > &thePath)
 The core routine of LSSLRTAStar – computes at most one-move path. More...
 
void GetPath (environment *, const state &, const state &, std::vector< action > &)
 
virtual const char * GetName ()
 
void SetHCost (environment *env, const state &where, const state &to, double val)
 
double HCostLearned (const state &from)
 
void SetGCost (const state &s, double cost)
 
double GCost (const state &s)
 
double HCost (environment *env, const state &from, const state &to) const
 
double BaseHCost (environment *env, const state &from, const state &to) const
 
double HCost (const state &from, const state &to) const
 
double GetMaxStateLearning ()
 
void SetInititialHeuristicWeight (double val)
 
virtual uint64_t GetNodesExpanded () const
 
virtual uint64_t GetNodesTouched () const
 
virtual void LogFinalStats (StatCollection *s)
 
double GetAmountLearned ()
 
void OpenGLDraw () const
 
void OpenGLDraw (const environment *env) const
 
- Public Member Functions inherited from GenericSearchAlgorithm< state, action, environment >
 GenericSearchAlgorithm ()
 
virtual ~GenericSearchAlgorithm ()
 
virtual bool InitializeSearch (environment *env, const state &from, const state &to, std::vector< state > &thePath)
 
virtual bool DoSingleSearchStep (std::vector< state > &thePath)
 
- Public Member Functions inherited from Heuristic< state >
 Heuristic ()
 
virtual ~Heuristic ()
 

Private Types

typedef std::unordered_map< uint64_t, glssLearnedData< state >, Hash64LearnedHeuristic
 
typedef std::unordered_map< uint64_t, bool, Hash64ClosedList
 

Private Attributes

environment * m_pEnv
 
LearnedHeuristic heur
 
double fAmountLearned
 
double initialHeuristicWeight
 
uint64_t nodesExpanded
 
uint64_t nodesTouched
 
int nodeExpansionLimit
 
bool avoidLearning
 
TemplateAStar< state, action, environment > astar
 
std::vector< state > succ
 
bool initialHeuristic
 
bool firstRun
 
double minInitialHeuristic
 
double maxLaterHeuristic
 

Additional Inherited Members

- Public Attributes inherited from Heuristic< state >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 

Detailed Description

template<class state, class action, class environment>
class gLSSLRTAStar< state, action, environment >

Definition at line 53 of file gLSSLRTAStar.h.

Member Typedef Documentation

◆ ClosedList

template<class state , class action , class environment >
typedef std::unordered_map<uint64_t, bool, Hash64 > gLSSLRTAStar< state, action, environment >::ClosedList
private

Definition at line 164 of file gLSSLRTAStar.h.

◆ LearnedHeuristic

template<class state , class action , class environment >
typedef std::unordered_map<uint64_t, glssLearnedData<state>, Hash64 > gLSSLRTAStar< state, action, environment >::LearnedHeuristic
private

Definition at line 163 of file gLSSLRTAStar.h.

Constructor & Destructor Documentation

◆ gLSSLRTAStar()

template<class state , class action , class environment >
gLSSLRTAStar< state, action, environment >::gLSSLRTAStar ( int  nodeLimit = 8)
inline

◆ ~gLSSLRTAStar()

template<class state , class action , class environment >
virtual gLSSLRTAStar< state, action, environment >::~gLSSLRTAStar ( void  )
inlinevirtual

Definition at line 66 of file gLSSLRTAStar.h.

Member Function Documentation

◆ BaseHCost()

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::BaseHCost ( environment *  env,
const state &  from,
const state &  to 
) const
inline

◆ GCost()

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::GCost ( const state &  s)
inline

◆ GetAmountLearned()

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::GetAmountLearned ( )
inlinevirtual

◆ GetMaxStateLearning()

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::GetMaxStateLearning ( )
inline

◆ GetName()

template<class state , class action , class environment >
virtual const char* gLSSLRTAStar< state, action, environment >::GetName ( )
inlinevirtual

◆ GetNodesExpanded()

template<class state , class action , class environment >
virtual uint64_t gLSSLRTAStar< state, action, environment >::GetNodesExpanded ( ) const
inlinevirtual

◆ GetNodesTouched()

template<class state , class action , class environment >
virtual uint64_t gLSSLRTAStar< state, action, environment >::GetNodesTouched ( ) const
inlinevirtual

◆ GetPath() [1/2]

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::GetPath ( environment *  ,
const state &  ,
const state &  ,
std::vector< action > &   
)
inlinevirtual

◆ GetPath() [2/2]

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::GetPath ( environment *  env,
const state &  from,
const state &  to,
std::vector< state > &  thePath 
)
virtual

The core routine of LSSLRTAStar – computes at most one-move path.

Implements GenericSearchAlgorithm< state, action, environment >.

Definition at line 183 of file gLSSLRTAStar.h.

References Timer::EndTimer(), fequal(), fless(), max, min(), openSize, Timer::StartTimer(), and verbose.

◆ HCost() [1/2]

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::HCost ( const state &  from,
const state &  to 
) const
inlinevirtual

◆ HCost() [2/2]

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::HCost ( environment *  env,
const state &  from,
const state &  to 
) const
inline

◆ HCostLearned()

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::HCostLearned ( const state &  from)
inline

◆ LogFinalStats()

template<class state , class action , class environment >
virtual void gLSSLRTAStar< state, action, environment >::LogFinalStats ( StatCollection s)
inlinevirtual

◆ OpenGLDraw() [1/2]

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::OpenGLDraw ( ) const
inlinevirtual

Reimplemented from GenericSearchAlgorithm< state, action, environment >.

Definition at line 160 of file gLSSLRTAStar.h.

◆ OpenGLDraw() [2/2]

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::OpenGLDraw ( const environment *  env) const
virtual

Reimplemented from GenericSearchAlgorithm< state, action, environment >.

Definition at line 358 of file gLSSLRTAStar.h.

◆ SetAvoidLearning()

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::SetAvoidLearning ( bool  val)
inline

◆ SetGCost()

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::SetGCost ( const state &  s,
double  cost 
)
inline

◆ SetHCost()

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::SetHCost ( environment *  env,
const state &  where,
const state &  to,
double  val 
)
inline

◆ SetInititialHeuristicWeight()

template<class state , class action , class environment >
void gLSSLRTAStar< state, action, environment >::SetInititialHeuristicWeight ( double  val)
inline

Member Data Documentation

◆ astar

template<class state , class action , class environment >
TemplateAStar<state, action, environment> gLSSLRTAStar< state, action, environment >::astar
private

Definition at line 173 of file gLSSLRTAStar.h.

◆ avoidLearning

template<class state , class action , class environment >
bool gLSSLRTAStar< state, action, environment >::avoidLearning
private

◆ fAmountLearned

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::fAmountLearned
private

◆ firstRun

template<class state , class action , class environment >
bool gLSSLRTAStar< state, action, environment >::firstRun
private

◆ heur

template<class state , class action , class environment >
LearnedHeuristic gLSSLRTAStar< state, action, environment >::heur
private

◆ initialHeuristic

template<class state , class action , class environment >
bool gLSSLRTAStar< state, action, environment >::initialHeuristic
private

◆ initialHeuristicWeight

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::initialHeuristicWeight
private

◆ m_pEnv

template<class state , class action , class environment >
environment* gLSSLRTAStar< state, action, environment >::m_pEnv
private

◆ maxLaterHeuristic

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::maxLaterHeuristic
private

◆ minInitialHeuristic

template<class state , class action , class environment >
double gLSSLRTAStar< state, action, environment >::minInitialHeuristic
private

◆ nodeExpansionLimit

template<class state , class action , class environment >
int gLSSLRTAStar< state, action, environment >::nodeExpansionLimit
private

◆ nodesExpanded

template<class state , class action , class environment >
uint64_t gLSSLRTAStar< state, action, environment >::nodesExpanded
private

◆ nodesTouched

template<class state , class action , class environment >
uint64_t gLSSLRTAStar< state, action, environment >::nodesTouched
private

◆ succ

template<class state , class action , class environment >
std::vector<state> gLSSLRTAStar< state, action, environment >::succ
private

Definition at line 174 of file gLSSLRTAStar.h.


The documentation for this class was generated from the following file: