Support A* searching.