HOG2
|
#include <BOAStar.h>
Classes | |
struct | item |
struct | stateInfo |
Public Member Functions | |
BOAStar () | |
virtual | ~BOAStar () |
void | GetPath (environment *env1, environment *env2, Heuristic< state > *h1, Heuristic< state > *h2, const state &from, const state &to, std::vector< state > &thePath) |
bool | InitializeSearch (environment *env1, environment *env2, Heuristic< state > *h1, Heuristic< state > *h2, const state &from, const state &to, std::vector< state > &thePath) |
bool | DoSingleSearchStep (std::vector< state > &thePath) |
void | ExtractPathToStart (state &node, std::vector< state > &thePath) |
void | ExtractPathToStartFromID (size_t node, std::vector< state > &thePath) |
virtual const char * | GetName () |
uint64_t | GetUniqueNodesExpanded () |
void | ResetNodeCount () |
size_t | GetNumItems () const |
bool | IsOpen (size_t item) const |
state | GetItem (size_t item) const |
float | GetItemGCost (size_t item) const |
float | GetItemHCost (size_t item) const |
uint64_t | GetNodesExpanded () const |
uint64_t | GetNodesTouched () const |
void | LogFinalStats (StatCollection *) |
void | Draw (Graphics::Display &d) const |
void | DrawFrontier (Graphics::Display &d, int selected=-1) const |
void | DrawAllPaths (Graphics::Display &d) const |
void | DrawGoal (Graphics::Display &d, int which, rgbColor c=Colors::blue, float width=1.0) const |
int | GetClosestGoal (Graphics::point p, float limit) |
void | SetPhi (std::function< double(double, double)> p) |
double | Phi (double h, double g) const |
void | SetOptimalityBound (double w) |
double | GetOptimalityBound () |
Public Attributes | |
state | goal |
state | start |
Private Member Functions | |
void | GetMinFOnOpen () const |
size_t | GetBestStateOnOpen () const |
void | DrawOpen (Graphics::Display &d) const |
void | Expand (size_t which) |
void | UpdateCost (size_t next, size_t parent) |
void | AddState (const state &s, size_t parent) |
size_t | Lookup (const state &s) |
Private Attributes | |
uint64_t | nodesTouched |
uint64_t | nodesExpanded |
std::unordered_map< uint64_t, stateInfo > | hashTable |
std::vector< item > | allStates |
std::vector< state > | neighbors |
std::vector< item > | goals |
std::vector< int > | openDrawing |
std::vector< Graphics::point > | goalDrawLocs |
std::vector< state > | solution |
environment * | e1 |
environment * | e2 |
Heuristic< state > * | h1 |
Heuristic< state > * | h2 |
double | bound |
uint64_t | uniqueNodesExpanded |
std::function< double(double, double)> | phi |
|
inline |
Definition at line 19 of file BOAStar.h.
References BOAStar< state, action, environment >::ResetNodeCount().
|
private |
bool BOAStar< state, action, environment >::DoSingleSearchStep | ( | std::vector< state > & | thePath | ) |
Definition at line 164 of file BOAStar.h.
References to_string_with_precision().
void BOAStar< state, action, environment >::Draw | ( | Graphics::Display & | d | ) | const |
Definition at line 291 of file BOAStar.h.
References Colors::blue, d, Colors::green, max, and Colors::red.
void BOAStar< state, action, environment >::DrawAllPaths | ( | Graphics::Display & | d | ) | const |
Definition at line 408 of file BOAStar.h.
References Colors::blue, and d.
void BOAStar< state, action, environment >::DrawFrontier | ( | Graphics::Display & | d, |
int | selected = -1 |
||
) | const |
Definition at line 331 of file BOAStar.h.
References d, fequal(), Colors::lightblue, max, min(), Graphics::textAlignCenter, Graphics::textAlignLeft, Graphics::textAlignRight, Graphics::textBaselineBottom, Graphics::textBaselineMiddle, Graphics::textBaselineTop, to_string_with_precision(), and Colors::white.
void BOAStar< state, action, environment >::DrawGoal | ( | Graphics::Display & | d, |
int | which, | ||
rgbColor | c = Colors::blue , |
||
float | width = 1.0 |
||
) | const |
|
private |
|
private |
Definition at line 250 of file BOAStar.h.
References BOAStar< state, action, environment >::item::fCost2(), BOAStar< state, action, environment >::item::gCost2, and BOAStar< state, action, environment >::item::s.
void BOAStar< state, action, environment >::ExtractPathToStart | ( | state & | node, |
std::vector< state > & | thePath | ||
) |
void BOAStar< state, action, environment >::ExtractPathToStartFromID | ( | size_t | node, |
std::vector< state > & | thePath | ||
) |
|
private |
int BOAStar< state, action, environment >::GetClosestGoal | ( | Graphics::point | p, |
float | limit | ||
) |
|
inline |
Definition at line 41 of file BOAStar.h.
References BOAStar< state, action, environment >::allStates.
|
inline |
Definition at line 42 of file BOAStar.h.
References BOAStar< state, action, environment >::allStates.
|
inline |
Definition at line 43 of file BOAStar.h.
References BOAStar< state, action, environment >::allStates.
|
private |
|
inlinevirtual |
|
inline |
Definition at line 47 of file BOAStar.h.
References BOAStar< state, action, environment >::nodesExpanded.
|
inline |
Definition at line 48 of file BOAStar.h.
References BOAStar< state, action, environment >::nodesTouched.
|
inline |
Definition at line 39 of file BOAStar.h.
References BOAStar< state, action, environment >::allStates.
|
inline |
Definition at line 70 of file BOAStar.h.
References BOAStar< state, action, environment >::bound.
|
inline |
Definition at line 35 of file BOAStar.h.
References BOAStar< state, action, environment >::uniqueNodesExpanded.
bool BOAStar< state, action, environment >::InitializeSearch | ( | environment * | env1, |
environment * | env2, | ||
Heuristic< state > * | h1, | ||
Heuristic< state > * | h2, | ||
const state & | from, | ||
const state & | to, | ||
std::vector< state > & | thePath | ||
) |
Definition at line 133 of file BOAStar.h.
References Heuristic< state >::HCost().
|
inline |
Definition at line 40 of file BOAStar.h.
References BOAStar< state, action, environment >::allStates.
|
inline |
|
private |
|
inline |
Definition at line 61 of file BOAStar.h.
References BOAStar< state, action, environment >::phi.
|
inline |
Definition at line 36 of file BOAStar.h.
References BOAStar< state, action, environment >::nodesExpanded, BOAStar< state, action, environment >::nodesTouched, and BOAStar< state, action, environment >::uniqueNodesExpanded.
Referenced by BOAStar< state, action, environment >::BOAStar().
|
inline |
Definition at line 65 of file BOAStar.h.
References BOAStar< state, action, environment >::bound, and BOAStar< state, action, environment >::phi.
|
inline |
Definition at line 57 of file BOAStar.h.
References BOAStar< state, action, environment >::phi.
|
private |
|
private |
Definition at line 98 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::GetItem(), BOAStar< state, action, environment >::GetItemGCost(), BOAStar< state, action, environment >::GetItemHCost(), BOAStar< state, action, environment >::GetNumItems(), and BOAStar< state, action, environment >::IsOpen().
|
private |
Definition at line 112 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::GetOptimalityBound(), and BOAStar< state, action, environment >::SetOptimalityBound().
|
private |
|
private |
state BOAStar< state, action, environment >::goal |
|
mutableprivate |
|
private |
|
private |
Definition at line 80 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::GetNodesExpanded(), and BOAStar< state, action, environment >::ResetNodeCount().
|
private |
Definition at line 80 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::GetNodesTouched(), and BOAStar< state, action, environment >::ResetNodeCount().
|
private |
|
private |
Definition at line 116 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::Phi(), BOAStar< state, action, environment >::SetOptimalityBound(), and BOAStar< state, action, environment >::SetPhi().
|
private |
state BOAStar< state, action, environment >::start |
|
private |
Definition at line 113 of file BOAStar.h.
Referenced by BOAStar< state, action, environment >::GetUniqueNodesExpanded(), and BOAStar< state, action, environment >::ResetNodeCount().