Open andrewknoll opened 2 years ago
https://github.com/andrewknoll/speedyrunners/blob/19e4865388d8127b02bc29ce7ca2094913c3268c/Speedyrunners/PriorityQueue.cpp#L44
operator< as defined in: https://github.com/andrewknoll/speedyrunners/blob/19e4865388d8127b02bc29ce7ca2094913c3268c/Speedyrunners/PriorityQueue.h#L40 defines that the first element has a lower f function than the second, and therefore, is more promising. By making this comparison, the more promising node is replaced with the less promising one, causing a slower and worse behaviour.
operator<
f
https://github.com/andrewknoll/speedyrunners/blob/19e4865388d8127b02bc29ce7ca2094913c3268c/Speedyrunners/PriorityQueue.cpp#L44
operator<
as defined in: https://github.com/andrewknoll/speedyrunners/blob/19e4865388d8127b02bc29ce7ca2094913c3268c/Speedyrunners/PriorityQueue.h#L40 defines that the first element has a lowerf
function than the second, and therefore, is more promising. By making this comparison, the more promising node is replaced with the less promising one, causing a slower and worse behaviour.