Added the AI astar algorithm