HOG2
|
#include <LSSLRTAStar.h>
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 >, Hash64 > | LearnedHeuristic |
typedef std::unordered_map< uint64_t, bool, Hash64 > | ClosedList |
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< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Definition at line 52 of file LSSLRTAStar.h.
|
private |
Definition at line 132 of file LSSLRTAStar.h.
|
private |
Definition at line 131 of file LSSLRTAStar.h.
|
inline |
Definition at line 54 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::avoidLearning, LSSLRTAStar< state, action, environment >::fAmountLearned, LSSLRTAStar< state, action, environment >::initialHeuristic, LSSLRTAStar< state, action, environment >::initialHeuristicWeight, LSSLRTAStar< state, action, environment >::maxLaterHeuristic, LSSLRTAStar< state, action, environment >::minInitialHeuristic, LSSLRTAStar< state, action, environment >::nodeExpansionLimit, and LSSLRTAStar< state, action, environment >::randomizeMoves.
|
inlinevirtual |
Definition at line 65 of file LSSLRTAStar.h.
|
inline |
Definition at line 97 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::initialHeuristicWeight.
Referenced by LSSLRTAStar< state, action, environment >::HCost(), and LSSLRTAStar< state, action, environment >::SetHCost().
|
inlinevirtual |
Implements LearningAlgorithm< state, action, environment >.
Definition at line 127 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::fAmountLearned.
|
inline |
Definition at line 103 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::heur.
Referenced by LSSLRTAStar< state, action, environment >::LogFinalStats().
|
inlinevirtual |
Implements GenericSearchAlgorithm< state, action, environment >.
Definition at line 70 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::avoidLearning, and LSSLRTAStar< state, action, environment >::nodeExpansionLimit.
Referenced by LSSLRTAStar< state, action, environment >::LogFinalStats().
|
inlinevirtual |
Implements GenericSearchAlgorithm< state, action, environment >.
Definition at line 117 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::nodesExpanded.
|
inlinevirtual |
Implements GenericSearchAlgorithm< state, action, environment >.
Definition at line 118 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::nodesTouched.
|
inlinevirtual |
Implements GenericSearchAlgorithm< state, action, environment >.
Definition at line 69 of file LSSLRTAStar.h.
|
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.
|
inlinevirtual |
Reimplemented from Heuristic< state >.
Definition at line 100 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::HCost(), and LSSLRTAStar< state, action, environment >::m_pEnv.
|
inline |
Definition at line 85 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::BaseHCost(), and LSSLRTAStar< state, action, environment >::heur.
Referenced by LSSLRTAStar< state, action, environment >::HCost().
|
inline |
Definition at line 79 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::heur, and LSSLRTAStar< state, action, environment >::m_pEnv.
|
inlinevirtual |
Implements GenericSearchAlgorithm< state, action, environment >.
Definition at line 119 of file LSSLRTAStar.h.
References StatCollection::AddStat(), LSSLRTAStar< state, action, environment >::fAmountLearned, LSSLRTAStar< state, action, environment >::GetMaxStateLearning(), LSSLRTAStar< state, action, environment >::GetName(), LSSLRTAStar< state, action, environment >::maxLaterHeuristic, and LSSLRTAStar< state, action, environment >::minInitialHeuristic.
|
inlinevirtual |
Reimplemented from GenericSearchAlgorithm< state, action, environment >.
Definition at line 128 of file LSSLRTAStar.h.
|
virtual |
Reimplemented from GenericSearchAlgorithm< state, action, environment >.
Definition at line 313 of file LSSLRTAStar.h.
|
inline |
Definition at line 67 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::avoidLearning.
|
inline |
Definition at line 74 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::BaseHCost(), and LSSLRTAStar< state, action, environment >::heur.
|
inline |
Definition at line 114 of file LSSLRTAStar.h.
References LSSLRTAStar< state, action, environment >::initialHeuristicWeight.
|
private |
Definition at line 141 of file LSSLRTAStar.h.
|
private |
Definition at line 140 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::GetName(), LSSLRTAStar< state, action, environment >::LSSLRTAStar(), and LSSLRTAStar< state, action, environment >::SetAvoidLearning().
|
private |
Definition at line 136 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::GetAmountLearned(), LSSLRTAStar< state, action, environment >::LogFinalStats(), and LSSLRTAStar< state, action, environment >::LSSLRTAStar().
|
private |
|
private |
Definition at line 144 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::LSSLRTAStar().
|
private |
Definition at line 137 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::BaseHCost(), LSSLRTAStar< state, action, environment >::LSSLRTAStar(), and LSSLRTAStar< state, action, environment >::SetInititialHeuristicWeight().
|
private |
Definition at line 134 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::HCost(), and LSSLRTAStar< state, action, environment >::HCostLearned().
|
private |
Definition at line 146 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::LogFinalStats(), and LSSLRTAStar< state, action, environment >::LSSLRTAStar().
|
private |
Definition at line 145 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::LogFinalStats(), and LSSLRTAStar< state, action, environment >::LSSLRTAStar().
|
private |
Definition at line 139 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::GetName(), and LSSLRTAStar< state, action, environment >::LSSLRTAStar().
|
private |
Definition at line 138 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::GetNodesExpanded().
|
private |
Definition at line 138 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::GetNodesTouched().
|
private |
Definition at line 143 of file LSSLRTAStar.h.
Referenced by LSSLRTAStar< state, action, environment >::LSSLRTAStar().