Implemented Astar search, does not avoid cat