Originally written for the lab task, but now for the general-purpose A* search library