7 #ifndef SEARCH_ASTARSOLVER_HPP 8 #define SEARCH_ASTARSOLVER_HPP 12 #include "OrderedList.hpp" Implementation of the Manhattan distance for the 8-puzzle.
virtual LinkedList< GameState * > solve(Game &g, GameState &gs)=0
Explores the game tree in search of the goal state.
AStarSolver(Heuristic *h)
LinkedList< GameState * > solve(Game &game, GameState &g0)
Explores the game tree in search of the goal state.
int calc(GameState ¤tState)
Calculates the heuristic value for a state.
Describes a single state in the 8-puzzle.
Abtract class for heuristic functions.
static int compare(GameState *a, GameState *b)
Compares two states using the available heuristic.