A* search algorithm using different heuristics to solve different problems