HOG2
|
#include <MNAgentPuzzle.h>
Public Member Functions | |
MNAgentEnvironment () | |
virtual void | GetSuccessors (const MNAgentPuzzleState &nodeID, std::vector< MNAgentPuzzleState > &neighbors) const |
virtual void | GetActions (const MNAgentPuzzleState &nodeID, std::vector< tAgentAction > &actions) const |
virtual tAgentAction | GetAction (const MNAgentPuzzleState &s1, const MNAgentPuzzleState &s2) const |
virtual void | ApplyAction (MNAgentPuzzleState &s, tAgentAction a) const |
virtual void | GetNextState (const MNAgentPuzzleState &, tAgentAction, MNAgentPuzzleState &) const |
virtual bool | InvertAction (tAgentAction &a) const |
virtual double | HCost (const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2) const |
Heuristic value between two arbitrary nodes. More... | |
virtual double | HCost (const MNAgentPuzzleState &node) const |
Heuristic value between node and the stored goal. More... | |
virtual double | GCost (const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2) const |
virtual double | GCost (const MNAgentPuzzleState &node, const tAgentAction &act) const |
virtual bool | GoalTest (const MNAgentPuzzleState &node, const MNAgentPuzzleState &goal) const |
virtual bool | GoalTest (const MNAgentPuzzleState &node) const |
Goal Test if the goal is stored. More... | |
void | SetDomainAbstractionSize (int val) |
virtual uint64_t | GetStateHash (const MNAgentPuzzleState &node) const |
virtual uint64_t | GetActionHash (tAgentAction act) const |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const MNAgentPuzzleState &) const |
virtual void | OpenGLDraw (const MNAgentPuzzleState &, const MNAgentPuzzleState &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | OpenGLDraw (const MNAgentPuzzleState &, const tAgentAction &) const |
Public Member Functions inherited from SearchEnvironment< MNAgentPuzzleState, tAgentAction > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const MNAgentPuzzleState &stateID) const |
virtual void | UndoAction (MNAgentPuzzleState &s, tAgentAction a) const |
virtual void | StoreGoal (MNAgentPuzzleState &s) |
Stores the goal for use by single-state HCost. More... | |
virtual void | ClearGoal () |
Clears the goal from memory. More... | |
virtual bool | IsGoalStored () const |
Returns true if the goal is stored and false otherwise. More... | |
virtual double | HCost (const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2, double parentHCost) const |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, MNAgentPuzzleState &s) const |
virtual double | GetPathLength (std::vector< MNAgentPuzzleState > &neighbors) |
virtual double | GetPathLength (const MNAgentPuzzleState &start, std::vector< tAgentAction > &neighbors) |
virtual OccupancyInterface< MNAgentPuzzleState, tAgentAction > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< MNAgentPuzzleState, tAgentAction > *) |
virtual void | OpenGLDraw () const |
virtual void | GLLabelState (const MNAgentPuzzleState &, const char *) const |
virtual void | GLDrawLine (const MNAgentPuzzleState &x, const MNAgentPuzzleState &y) const |
virtual void | GLDrawPath (const std::vector< MNAgentPuzzleState > &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 MNAgentPuzzleState &) const |
virtual void | DrawLine (Graphics::Display &display, const MNAgentPuzzleState &x, const MNAgentPuzzleState &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< MNAgentPuzzleState > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Member Functions | |
void | FindLegalMoves (MNAgentPuzzleState &s, tAgentAction &curr, std::vector< tAgentAction > &actions, int realMoves, int depth, std::vector< bool > &moved) const |
Private Attributes | |
int | domainAbstractionSize |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< MNAgentPuzzleState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< MNAgentPuzzleState, tAgentAction > | |
bool | bValidSearchGoal |
MNAgentPuzzleState | searchGoal |
rgbColor | color |
GLfloat | transparency |
Definition at line 90 of file MNAgentPuzzle.h.
|
inline |
Definition at line 93 of file MNAgentPuzzle.h.
References domainAbstractionSize.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 65 of file MNAgentPuzzle.cpp.
References MNAgentPuzzleState::currentAgent, kAgentDown, kAgentLeft, kAgentRight, kAgentStay, kAgentUp, MNAgentPuzzleState::locations, MNAgentPuzzleState::numAgents, and MNAgentPuzzleState::width.
Referenced by GetNextState(), and GetSuccessors().
|
private |
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 112 of file MNAgentPuzzle.cpp.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 110 of file MNAgentPuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 60 of file MNAgentPuzzle.cpp.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 144 of file MNAgentPuzzle.cpp.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 26 of file MNAgentPuzzle.cpp.
References MNAgentPuzzleState::currentAgent, kAgentDown, kAgentLeft, kAgentRight, kAgentStay, kAgentUp, MNAgentPuzzleState::locations, and MNAgentPuzzleState::width.
Referenced by GetSuccessors().
|
virtual |
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 92 of file MNAgentPuzzle.cpp.
References ApplyAction().
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 120 of file MNAgentPuzzle.cpp.
References filled.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 13 of file MNAgentPuzzle.cpp.
References ApplyAction(), and GetActions().
|
inlinevirtual |
Goal Test if the goal is stored.
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 117 of file MNAgentPuzzle.h.
References SearchEnvironment< MNAgentPuzzleState, tAgentAction >::bValidSearchGoal, and SearchEnvironment< MNAgentPuzzleState, tAgentAction >::searchGoal.
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 115 of file MNAgentPuzzle.cpp.
|
inlinevirtual |
Heuristic value between node and the stored goal.
Asserts that the goal is stored
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 109 of file MNAgentPuzzle.h.
References SearchEnvironment< MNAgentPuzzleState, tAgentAction >::bValidSearchGoal, HCost(), and SearchEnvironment< MNAgentPuzzleState, tAgentAction >::searchGoal.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 104 of file MNAgentPuzzle.cpp.
Referenced by HCost().
|
virtual |
Implements SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 98 of file MNAgentPuzzle.cpp.
|
virtual |
Definition at line 149 of file MNAgentPuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 153 of file MNAgentPuzzle.cpp.
References DrawSphere(), MNAgentPuzzleState::height, MNAgentPuzzleState::locations, max, MNAgentPuzzleState::numAgents, and MNAgentPuzzleState::width.
|
virtual |
Draw the transition at some percentage 0...1 between two states.
Draw the transition at some percentage 0...1 between two MNAgentPuzzleStates.
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 203 of file MNAgentPuzzle.cpp.
|
virtual |
Reimplemented from SearchEnvironment< MNAgentPuzzleState, tAgentAction >.
Definition at line 207 of file MNAgentPuzzle.cpp.
|
inline |
Definition at line 120 of file MNAgentPuzzle.h.
References domainAbstractionSize.
|
private |
Definition at line 138 of file MNAgentPuzzle.h.
Referenced by MNAgentEnvironment(), and SetDomainAbstractionSize().