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

#include <LSSLRTAStar.h>

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

Public Member Functions

 LSSLRTAStar (int nodeLimit=8)
 
virtual ~LSSLRTAStar (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)
 
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, lssLearnedData< 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
 
bool randomizeMoves
 
bool initialHeuristic
 
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 LSSLRTAStar< state, action, environment >

Definition at line 52 of file LSSLRTAStar.h.

Member Typedef Documentation

◆ ClosedList

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

Definition at line 132 of file LSSLRTAStar.h.

◆ LearnedHeuristic

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

Definition at line 131 of file LSSLRTAStar.h.

Constructor & Destructor Documentation

◆ LSSLRTAStar()

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

◆ ~LSSLRTAStar()

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

Definition at line 65 of file LSSLRTAStar.h.

Member Function Documentation

◆ BaseHCost()

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

◆ GetAmountLearned()

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

◆ GetMaxStateLearning()

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

◆ GetName()

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

◆ GetNodesExpanded()

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

◆ GetNodesTouched()

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

◆ GetPath() [1/2]

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

◆ GetPath() [2/2]

template<class state , class action , class environment >
void LSSLRTAStar< 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 151 of file LSSLRTAStar.h.

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

◆ HCost() [1/2]

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

◆ HCost() [2/2]

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

◆ HCostLearned()

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

◆ LogFinalStats()

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

◆ OpenGLDraw() [1/2]

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

Reimplemented from GenericSearchAlgorithm< state, action, environment >.

Definition at line 128 of file LSSLRTAStar.h.

◆ OpenGLDraw() [2/2]

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

Reimplemented from GenericSearchAlgorithm< state, action, environment >.

Definition at line 313 of file LSSLRTAStar.h.

◆ SetAvoidLearning()

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

◆ SetHCost()

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

◆ SetInititialHeuristicWeight()

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

Member Data Documentation

◆ astar

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

Definition at line 141 of file LSSLRTAStar.h.

◆ avoidLearning

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

◆ fAmountLearned

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

◆ heur

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

◆ initialHeuristic

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

◆ initialHeuristicWeight

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

◆ m_pEnv

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

◆ maxLaterHeuristic

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

◆ minInitialHeuristic

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

◆ nodeExpansionLimit

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

◆ nodesExpanded

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

◆ nodesTouched

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

◆ randomizeMoves

template<class state , class action , class environment >
bool LSSLRTAStar< state, action, environment >::randomizeMoves
private

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