HOG2
|
#include <SFBDPancakePuzzle.h>
Public Member Functions | |
SFBDPancakeEnvironment (int theSize) | |
virtual | ~SFBDPancakeEnvironment () |
virtual void | GetSuccessors (const pancakeStatePair &stateID, std::vector< pancakeStatePair > &neighbors) const |
virtual void | GetActions (const pancakeStatePair &stateID, std::vector< pancakeMovePair > &actions) const |
virtual pancakeMovePair | GetAction (const pancakeStatePair &s1, const pancakeStatePair &s2) const |
virtual void | ApplyAction (pancakeStatePair &s, pancakeMovePair a) const |
virtual bool | InvertAction (pancakeMovePair &a) const |
OccupancyInterface< pancakeStatePair, pancakeMovePair > * | GetOccupancyInfo () |
virtual double | HCost (const pancakeStatePair &state1, const pancakeStatePair &state2) const |
Heuristic value between two arbitrary nodes. More... | |
virtual double | GCost (const pancakeStatePair &state1, const pancakeStatePair &state2) const |
virtual double | GCost (const pancakeStatePair &state1, const pancakeMovePair &state2) const |
virtual bool | GoalTest (const pancakeStatePair &state, const pancakeStatePair &goal) const |
virtual uint64_t | GetStateHash (const pancakeStatePair &state) const |
virtual uint64_t | GetActionHash (pancakeMovePair act) const |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const pancakeStatePair &s) const |
virtual void | OpenGLDraw (const pancakeStatePair &s, const pancakeMovePair &gm) const |
virtual void | OpenGLDraw (const pancakeStatePair &s, const pancakeStatePair &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | StoreGoal (pancakeStatePair &) |
Stores the goal for use by single-state HCost. More... | |
virtual void | ClearGoal () |
Clears the goal from memory. More... | |
virtual bool | IsGoalStored () const |
virtual double | HCost (const pancakeStatePair &) const |
Heuristic value between node and the stored goal. More... | |
virtual bool | GoalTest (const pancakeStatePair &) const |
Goal Test if the goal is stored. More... | |
Public Member Functions inherited from SearchEnvironment< pancakeStatePair, pancakeMovePair > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const pancakeStatePair &stateID) const |
virtual void | UndoAction (pancakeStatePair &s, pancakeMovePair a) const |
virtual void | GetNextState (const pancakeStatePair &s1, pancakeMovePair a, pancakeStatePair &s2) const |
virtual bool | IsGoalStored () const |
Returns true if the goal is stored and false otherwise. More... | |
virtual double | HCost (const pancakeStatePair &node1, const pancakeStatePair &node2, double parentHCost) const |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, pancakeStatePair &s) const |
virtual double | GetPathLength (std::vector< pancakeStatePair > &neighbors) |
virtual double | GetPathLength (const pancakeStatePair &start, std::vector< pancakeMovePair > &neighbors) |
virtual void | SetOccupancyInfo (OccupancyInterface< pancakeStatePair, pancakeMovePair > *) |
virtual void | OpenGLDraw () const |
virtual void | GLLabelState (const pancakeStatePair &, const char *) const |
virtual void | GLDrawLine (const pancakeStatePair &x, const pancakeStatePair &y) const |
virtual void | GLDrawPath (const std::vector< pancakeStatePair > &x) const |
virtual void | SetColor (const rgbColor &r) const |
virtual void | SetColor (GLfloat rr, GLfloat g, GLfloat b, GLfloat t=1.0) const |
virtual void | GetColor (GLfloat &rr, GLfloat &g, GLfloat &b, GLfloat &t) const |
virtual rgbColor | GetColor () const |
virtual void | Draw (Graphics::Display &display) const |
virtual void | Draw (Graphics::Display &display, const pancakeStatePair &) const |
virtual void | DrawLine (Graphics::Display &display, const pancakeStatePair &x, const pancakeStatePair &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< pancakeStatePair > | |
Heuristic () | |
virtual | ~Heuristic () |
Protected Member Functions | |
int | MeasureLocalHeuristic (const BurnedPancakePuzzleState &a, const BurnedPancakePuzzleState &b) const |
Protected Attributes | |
BurnedPancakePuzzle * | pan |
Protected Attributes inherited from SearchEnvironment< pancakeStatePair, pancakeMovePair > | |
bool | bValidSearchGoal |
pancakeStatePair | searchGoal |
rgbColor | color |
GLfloat | transparency |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< pancakeStatePair > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Definition at line 53 of file SFBDPancakePuzzle.h.
SFBDPancakeEnvironment::SFBDPancakeEnvironment | ( | int | theSize | ) |
Definition at line 12 of file SFBDPancakePuzzle.cpp.
References pan.
|
virtual |
Definition at line 17 of file SFBDPancakePuzzle.cpp.
References pan.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 145 of file SFBDPancakePuzzle.cpp.
References BurnedPancakePuzzle::ApplyAction(), pancakeMovePair::applyToStart, pancakeStatePair::goal, pan, pancakeStatePair::start, and pancakeMovePair::theAction.
|
inlinevirtual |
Clears the goal from memory.
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 77 of file SFBDPancakePuzzle.h.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 163 of file SFBDPancakePuzzle.cpp.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 168 of file SFBDPancakePuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 139 of file SFBDPancakePuzzle.cpp.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 183 of file SFBDPancakePuzzle.cpp.
References pancakeMovePair::applyToStart, and pancakeMovePair::theAction.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 27 of file SFBDPancakePuzzle.cpp.
References pancakeStatePair::goal, MeasureLocalHeuristic(), BurnedPancakePuzzleState::puzzle, and pancakeStatePair::start.
|
inlinevirtual |
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 64 of file SFBDPancakePuzzle.h.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 178 of file SFBDPancakePuzzle.cpp.
References BurnedPancakePuzzle::GetStateHash(), pancakeStatePair::goal, pan, and pancakeStatePair::start.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 22 of file SFBDPancakePuzzle.cpp.
|
inlinevirtual |
Goal Test if the goal is stored.
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 84 of file SFBDPancakePuzzle.h.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 173 of file SFBDPancakePuzzle.cpp.
References pancakeStatePair::goal, and pancakeStatePair::start.
|
inlinevirtual |
Heuristic value between node and the stored goal.
Asserts that the goal is stored
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 80 of file SFBDPancakePuzzle.h.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 158 of file SFBDPancakePuzzle.cpp.
References pancakeStatePair::goal, BurnedPancakePuzzle::HCost(), pan, and pancakeStatePair::start.
|
virtual |
Implements SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 153 of file SFBDPancakePuzzle.cpp.
|
inlinevirtual |
Definition at line 78 of file SFBDPancakePuzzle.h.
|
protected |
Definition at line 50 of file SFBDPancakePuzzle.cpp.
References a1, BurnedPancakePuzzle::ApplyAction(), BurnedPancakePuzzle::GetActions(), BurnedPancakePuzzle::HCost(), and pan.
Referenced by GetActions().
|
virtual |
Definition at line 188 of file SFBDPancakePuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 192 of file SFBDPancakePuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 196 of file SFBDPancakePuzzle.cpp.
|
inlinevirtual |
Draw the transition at some percentage 0...1 between two states.
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 74 of file SFBDPancakePuzzle.h.
References OpenGLDraw().
Referenced by OpenGLDraw().
|
inlinevirtual |
Stores the goal for use by single-state HCost.
Reimplemented from SearchEnvironment< pancakeStatePair, pancakeMovePair >.
Definition at line 76 of file SFBDPancakePuzzle.h.
|
protected |
Definition at line 91 of file SFBDPancakePuzzle.h.
Referenced by ApplyAction(), GetStateHash(), HCost(), MeasureLocalHeuristic(), SFBDPancakeEnvironment(), and ~SFBDPancakeEnvironment().