@@ -2503,7 +2503,7 @@ struct Fibonacci_heap
2503
2503
using compare = boost::heap::compare<Cmp>;
2504
2504
2505
2505
template <typename T, typename ... Options>
2506
- using heap_type = boost::heap::binomial_heap <T, Options...>;
2506
+ using heap_type = boost::heap::fibonacci_heap <T, Options...>;
2507
2507
2508
2508
template <typename T>
2509
2509
using allocator_type = boost::container::node_allocator<T>;
@@ -2533,6 +2533,12 @@ struct monotone
2533
2533
static constexpr bool IsMonotone = B;
2534
2534
};
2535
2535
2536
+ template <bool B>
2537
+ struct cost_based_pruning
2538
+ {
2539
+ static constexpr bool PerformCostBasedPruning = B;
2540
+ };
2541
+
2536
2542
/* * Combines multiple configuration parameters into a single configuration type. */
2537
2543
template <typename T, typename ... Ts>
2538
2544
struct combine : T, combine<Ts...> { };
@@ -2549,10 +2555,12 @@ struct combine<T> : T { };
2549
2555
template <typename State, typename Expand, typename Heuristic, typename ... Context> \
2550
2556
using NAME = ai::genericAStar<State, Expand, Heuristic, combine<__VA_ARGS__>, Context...>
2551
2557
2552
- DEFINE_SEARCH (AStar, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, beam<0 >);
2553
- DEFINE_SEARCH (lazyAStar, monotone<true >, Fibonacci_heap, weight<1 >, lazy<true >, beam<0 >);
2554
- DEFINE_SEARCH (beam_search, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, beam<2 >);
2555
- DEFINE_SEARCH (dynamic_beam_search, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, beam<1 , 5 >);
2558
+ DEFINE_SEARCH (AStar, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, cost_based_pruning<false >, beam<0 >);
2559
+ DEFINE_SEARCH (lazyAStar, monotone<true >, Fibonacci_heap, weight<1 >, lazy<true >, cost_based_pruning<false >, beam<0 >);
2560
+ DEFINE_SEARCH (beam_search, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, cost_based_pruning<false >, beam<2 >);
2561
+ DEFINE_SEARCH (dynamic_beam_search, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, cost_based_pruning<false >, beam<1 , 5 >);
2562
+ DEFINE_SEARCH (AStar_with_cbp, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, cost_based_pruning<true >, beam<0 >);
2563
+ DEFINE_SEARCH (beam_search_with_cbp, monotone<true >, Fibonacci_heap, weight<1 >, lazy<false >, cost_based_pruning<true >, beam<2 >);
2556
2564
2557
2565
#undef DEFINE_SEARCH
2558
2566
@@ -2665,7 +2673,9 @@ struct HeuristicSearch final : PlanEnumeratorCRTP<HeuristicSearch>
2665
2673
// bottom-up
2666
2674
// zero
2667
2675
HEURISTIC_SEARCH ( SubproblemsArray, BottomUpComplete, zero, AStar )
2676
+ HEURISTIC_SEARCH ( SubproblemsArray, BottomUpComplete, zero, AStar_with_cbp )
2668
2677
HEURISTIC_SEARCH ( SubproblemsArray, BottomUpComplete, zero, beam_search )
2678
+ HEURISTIC_SEARCH ( SubproblemsArray, BottomUpComplete, zero, beam_search_with_cbp )
2669
2679
HEURISTIC_SEARCH ( SubproblemsArray, BottomUpComplete, zero, dynamic_beam_search )
2670
2680
2671
2681
// sum
@@ -2697,12 +2707,14 @@ struct HeuristicSearch final : PlanEnumeratorCRTP<HeuristicSearch>
2697
2707
// top-down
2698
2708
// zero
2699
2709
HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, zero, AStar )
2710
+ HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, zero, AStar_with_cbp )
2700
2711
2701
2712
// sqrt_sum
2702
2713
HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, sqrt_sum, AStar )
2703
2714
2704
2715
// sum
2705
2716
HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, sum, AStar )
2717
+ HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, sum, AStar_with_cbp )
2706
2718
2707
2719
// GOO
2708
2720
HEURISTIC_SEARCH ( SubproblemsArray, TopDownComplete, GOO, AStar )
0 commit comments