Go to the documentation of this file.
17 #ifndef MNAGENTPUZZLE_H
18 #define MNAGENTPUZZLE_H
28 const uint64_t
filled = 0xFFFFFFFFFFFFFFFFll;
58 for (
int y = 0; y <
loc.height; y++)
60 for (
int x = 0; x <
loc.width; x++)
64 else if (
loc.locations[y*
loc.width+x] == 0)
67 for (
int t = 0; t < 64; t++)
69 if ((
loc.locations[y*
loc.width+x]&((uint64_t)1<<t)) != 0)
84 for (
unsigned int x = 0; x < l1.
locations.size(); x++)
134 std::vector<tAgentAction> &actions,
137 std::vector<bool> &moved)
const;
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
virtual double GCost(const MNAgentPuzzleState &node1, const MNAgentPuzzleState &node2) const
int domainAbstractionSize
MNAgentPuzzleState(unsigned int _width, unsigned int _height)
MNAgentPuzzleState searchGoal
void FindLegalMoves(MNAgentPuzzleState &s, tAgentAction &curr, std::vector< tAgentAction > &actions, int realMoves, int depth, std::vector< bool > &moved) const
void SetDomainAbstractionSize(int val)
virtual bool InvertAction(tAgentAction &a) const
virtual double HCost(const MNAgentPuzzleState &node) const
Heuristic value between node and the stored goal.
virtual bool GoalTest(const MNAgentPuzzleState &node, const MNAgentPuzzleState &goal) const
void AddAgent(int x, int y)
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
virtual bool GoalTest(const MNAgentPuzzleState &node) const
Goal Test if the goal is stored.
static std::ostream & operator<<(std::ostream &out, const MNAgentPuzzleState &loc)
static bool operator==(const MNAgentPuzzleState &l1, const MNAgentPuzzleState &l2)
void BlockCell(int x, int y)
Nodes to be stored within a Graph.