|
while (!openSet.empty()) { |
I think it could have infinite loop if no way from start point to goal point since there is an additional parameter(time) in State. And when you add a State to the set and queue, timestep may be different for same (x,y) so the set won't have any effort.
Correct me if I'm wrong.