whoenig / libMultiRobotPlanning

Library with search algorithms for task and path planning for multi robot/agent systems
MIT License
840 stars 220 forks source link

[Question] Comparator for HighLevelNode::cost should be < ? #12

Closed Shushman closed 5 years ago

Shushman commented 5 years ago

Beginner's question about this line: https://github.com/whoenig/libMultiRobotPlanning/blob/master/include/libMultiRobotPlanning/cbs.hpp#L189

If I understood the paper correctly, the high-level search is best-first according to lowest node cost; and I believe the d_ary_heap is a min-heap, so shouldn't the line be return cost < n.cost instead? What am I missing?

whoenig commented 5 years ago

Boost uses max heaps rather than min heaps, see https://www.boost.org/doc/libs/1_70_0/doc/html/heap/concepts.html.

Shushman commented 5 years ago

Whoops, my bad. Thanks!