astar with value function heuristic