Go to the documentation of this file.
21 locs.resize(numQueens);
22 for (
int x = 0; x < numQueens; x++)
23 locs[x] = random()%numQueens;
30 if (l1.
locs.size() != l2.
locs.size())
33 for (
unsigned int x = 0; x < l1.
locs.size(); x++)
48 out <<
"(" << a.
loc <<
": " << a.
value <<
")";
static bool operator==(const NQueenState &l1, const NQueenState &l2)
virtual uint64_t GetActionHash(NQueenAction act) const
virtual void GetSuccessors(const NQueenState &nodeID, std::vector< NQueenState > &neighbors) const
virtual double GCost(const NQueenState &node, const NQueenAction &act) const
virtual double HCost(const NQueenState &node1, const NQueenState &node2) const
Heuristic value between two arbitrary nodes.
NQueenState(int numQueens=8)
virtual void ApplyAction(NQueenState &s, NQueenAction a) const
virtual double GCost(const NQueenState &node1, const NQueenState &node2) const
virtual uint64_t GetStateHash(const NQueenState &node) const
virtual double HCost(const NQueenState &node) const
Heuristic value between node and the stored goal.
virtual bool InvertAction(NQueenAction &a) const
void OpenGLDrawBackground(float r, float g, float b)
virtual bool GoalTest(const NQueenState &node, const NQueenState &goal) const
virtual void OpenGLDraw() const
virtual void GetNextState(const NQueenState &, NQueenAction, NQueenState &) const
virtual void GetActions(const NQueenState &nodeID, std::vector< NQueenAction > &actions) const
static std::ostream & operator<<(std::ostream &out, const NQueenAction &a)
int NumCollisions(const NQueenState &node) const
void GLLabelState(const NQueenState &s, int x, int y, int number) const
void OpenGLDrawConflicts(const NQueenState &s) const
virtual NQueenAction GetAction(const NQueenState &s1, const NQueenState &s2) const
Nodes to be stored within a Graph.