Finish a possible version of greedy best first search for part 1.3