1#include "probfd/policy_pickers/vdiff_tiebreaker.h"
3#include "probfd/algorithms/state_properties.h"
5#include "probfd/interval.h"
7namespace probfd::policy_pickers {
9template <
typename State,
typename Action>
10VDiffTiebreaker<State, Action>::VDiffTiebreaker(
13 : VDiffTiebreaker::StablePolicyPicker(stable_policy)
14 , favor_large_gaps_(favor_large_gaps)
18template <
typename State,
typename Action>
19int VDiffTiebreaker<State, Action>::pick_index(
21 std::optional<Action>,
22 const std::vector<Transition<Action>>& greedy_transitions,
23 algorithms::StateProperties& properties)
25 auto it = std::ranges::min_element(
28 [&properties, factor = favor_large_gaps_](
const Transition<Action>& t) {
29 return t.successor_dist.expectation([&](StateID
id) {
30 return factor * properties.lookup_bounds(
id).length();
34 return std::distance(greedy_transitions.begin(), it);
bool is_approx_less(value_t v1, value_t v2, value_t epsilon=g_epsilon)
Equivalent to .
double value_t
Typedef for the state value type.
Definition aliases.h:7