1#ifndef PROBFD_PDBS_PROBABILITY_AWARE_PATTERN_DATABASE_H
2#define PROBFD_PDBS_PROBABILITY_AWARE_PATTERN_DATABASE_H
4#include "probfd/pdbs/evaluators.h"
5#include "probfd/pdbs/state_ranking_function.h"
6#include "probfd/pdbs/types.h"
8#include "probfd/heuristics/constant_evaluator.h"
10#include "probfd/fdr_types.h"
16class ProbabilisticTaskProxy;
20class ProjectionStateSpace;
39 std::vector<value_t> value_table_;
51 std::vector<value_t> value_table);
73 std::shared_ptr<FDRSimpleCostFunction> task_cost_function,
75 const State& initial_state,
76 bool operator_pruning =
true,
79 double max_time = std::numeric_limits<double>::infinity());
99 StateRank initial_state,
102 double max_time = std::numeric_limits<double>::infinity());
124 std::shared_ptr<FDRSimpleCostFunction> task_cost_function,
125 const ::pdbs::PatternDatabase& pdb,
126 const State& initial_state,
127 bool operator_pruning =
true,
128 double max_time = std::numeric_limits<double>::infinity());
149 const ::pdbs::PatternDatabase& pdb,
150 StateRank initial_state,
151 double max_time = std::numeric_limits<double>::infinity());
177 std::shared_ptr<FDRSimpleCostFunction> task_cost_function,
180 const State& initial_state,
181 bool operator_pruning =
true,
182 double max_time = std::numeric_limits<double>::infinity());
209 StateRank initial_state,
210 double max_time = std::numeric_limits<double>::infinity());
238 std::shared_ptr<FDRSimpleCostFunction> task_cost_function,
241 const State& initial_state,
242 bool operator_pruning =
true,
243 double max_time = std::numeric_limits<double>::infinity());
269 StateRank initial_state,
270 double max_time = std::numeric_limits<double>::infinity());
The interface representing heuristic functions.
Definition mdp_algorithm.h:16
Proxy class used to inspect a probabilistic planning task.
Definition task_proxy.h:194
Returns an estimate of zero for each state.
Definition constant_evaluator.h:38
Implementation of a probability-aware pattern database.
Definition probability_aware_pattern_database.h:37
unsigned int num_states() const
Get the number of states in this PDB's projection.
ProbabilityAwarePatternDatabase(ProjectionStateSpace &state_space, StateRankingFunction ranking_function, const ProbabilityAwarePatternDatabase &pdb, int add_var, StateRank initial_state, double max_time=std::numeric_limits< double >::infinity())
Construct a pattern database for the given projection state space and the pattern of a previous patte...
const Pattern & get_pattern() const
Get the pattern of the pattern database.
ProbabilityAwarePatternDatabase(ProjectionStateSpace &state_space, StateRankingFunction ranking_function, const ProbabilityAwarePatternDatabase &left, const ProbabilityAwarePatternDatabase &right, StateRank initial_state, double max_time=std::numeric_limits< double >::infinity())
Construct a probability-aware pattern database the given projection state space and the union of the ...
ProbabilityAwarePatternDatabase(ProbabilisticTaskProxy task_proxy, std::shared_ptr< FDRSimpleCostFunction > task_cost_function, const ProbabilityAwarePatternDatabase &left, const ProbabilityAwarePatternDatabase &right, const State &initial_state, bool operator_pruning=true, double max_time=std::numeric_limits< double >::infinity())
Construct a probability-aware pattern database for a given task and the union of the patterns of two ...
ProbabilityAwarePatternDatabase(ProjectionStateSpace &projection, StateRankingFunction ranking_function, StateRank initial_state, const StateRankEvaluator &heuristic=heuristics::BlindEvaluator< StateRank >(), double max_time=std::numeric_limits< double >::infinity())
Construct the probability-aware pattern database for the given projection state space.
value_t lookup_estimate(StateRank s) const
Look up the estimate of an abstract state specified by state rank in the lookup table.
const StateRankingFunction & get_state_ranking_function() const
Get the abstraction mapping of the pattern database.
value_t lookup_estimate(const State &s) const
Get the optimal state value of the abstract state corresponding to the input state.
ProbabilityAwarePatternDatabase(ProbabilisticTaskProxy task_proxy, std::shared_ptr< FDRSimpleCostFunction > task_cost_function, Pattern pattern, const State &initial_state, bool operator_pruning=true, const StateRankEvaluator &heuristic=heuristics::BlindEvaluator< StateRank >(), double max_time=std::numeric_limits< double >::infinity())
Construct a probability-aware pattern database for a given task and pattern.
ProbabilityAwarePatternDatabase(ProbabilisticTaskProxy task_proxy, std::shared_ptr< FDRSimpleCostFunction > task_cost_function, const ProbabilityAwarePatternDatabase &pdb, int add_var, const State &initial_state, bool operator_pruning=true, double max_time=std::numeric_limits< double >::infinity())
Construct a probability-aware pattern database for a given task, by extending a previous probability-...
ProbabilityAwarePatternDatabase(ProbabilisticTaskProxy task_proxy, std::shared_ptr< FDRSimpleCostFunction > task_cost_function, const ::pdbs::PatternDatabase &pdb, const State &initial_state, bool operator_pruning=true, double max_time=std::numeric_limits< double >::infinity())
Construct a probability-aware pattern database for a given task from a determinization-based pattern ...
const std::vector< value_t > & get_value_table() const
Get the abstraction mapping of the pattern database.
StateRank get_abstract_state(const State &state) const
Compute the state rank of the abstract state of an input state.
ProbabilityAwarePatternDatabase(ProjectionStateSpace &projection, StateRankingFunction ranking_function, const ::pdbs::PatternDatabase &pdb, StateRank initial_state, double max_time=std::numeric_limits< double >::infinity())
Construct the probability-aware pattern database for the given projection state space from a determin...
Represents the state space of a projection of a probabilistic planning task.
Definition projection_state_space.h:29
Implements the state ranking function for abstract states of projections.
Definition state_ranking_function.h:24
Namespace dedicated to probabilistic pattern databases.
Definition gzocp_heuristic.h:16
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
double value_t
Typedef for the state value type.
Definition aliases.h:7