Go to the documentation of this file.
16 std::vector<tAgentAction> actions;
18 for (
unsigned int x = 0; x < actions.size(); x++)
22 neighbors.push_back(s);
29 for (
unsigned int w = 0; w < s.
locations.size(); w++)
68 uint64_t mask2 = ~mask1;
71 for (
unsigned int w = 0; w < s.
locations.size(); w++)
117 return (
node == goal);
122 int base =
node.numAgents;
124 for (
unsigned int x = 0; x <
node.locations.size(); x++)
127 for (
unsigned int w = 0; w <
node.numAgents; w++)
129 if (((
node.locations[x]>>w)&0x1) != 0)
138 hash = hash*base+which;
156 glColor3f(0.5, 0.5, 0.5);
157 glVertex3f(-1, -1, 0.0);
158 glVertex3f( 1, -1, 0.0);
159 glVertex3f( 1, 1, 0.0);
160 glVertex3f(-1, 1, 0.0);
165 for (
unsigned int x = 0; x < s.
locations.size(); x++)
169 glColor3f(0.0, 0.0, 0.0);
171 -1.0+radius+((
double)((
int)x/s.
width))*2.0*radius,
178 -1.0+radius+((
double)((
int)x/s.
width))*2.0*radius,
virtual void GetSuccessors(const MNAgentPuzzleState &nodeID, std::vector< MNAgentPuzzleState > &neighbors) const
virtual double HCost(const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2) const
Heuristic value between two arbitrary nodes.
virtual void GetNextState(const MNAgentPuzzleState &, tAgentAction, MNAgentPuzzleState &) const
virtual tAgentAction GetAction(const MNAgentPuzzleState &s1, const MNAgentPuzzleState &s2) const
virtual void OpenGLDraw() const
void DrawSphere(GLdouble _x, GLdouble _y, GLdouble _z, GLdouble tRadius)
virtual double GCost(const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2) const
virtual bool InvertAction(tAgentAction &a) const
virtual bool GoalTest(const MNAgentPuzzleState &node, const MNAgentPuzzleState &goal) const
virtual void GetActions(const MNAgentPuzzleState &nodeID, std::vector< tAgentAction > &actions) const
virtual void ApplyAction(MNAgentPuzzleState &s, tAgentAction a) const
virtual uint64_t GetStateHash(const MNAgentPuzzleState &node) const
virtual uint64_t GetActionHash(tAgentAction act) const
std::vector< uint64_t > locations
Nodes to be stored within a Graph.