AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
probfd Namespace Reference

Description

The top-level namespace of probabilistic Fast Downward.

Namespaces

namespace  algorithms
 This namespace contains implementations of SSP search algorithms.
 
namespace  bisimulation
 This namespace contains the implementation of deterministic bisimulation quotients for SSPs, based on merge-and-shrink.
 
namespace  graphviz
 This namespace contains code used for dumping search spaces as dot graphs.
 
namespace  heuristics
 This namespace contains heuristic implementations.
 
namespace  iterators
 Namespace dedicated to custom iterators.
 
namespace  occupation_measures
 Namespace dedicated to occupation measure heuristic base classes.
 
namespace  open_lists
 This namespace contains implementations of open lists.
 
namespace  pdbs
 Namespace dedicated to probabilistic pattern databases.
 
namespace  preprocessing
 This namespace contains preprocessing algorithms for SSPs.
 
namespace  solvers
 This namespace contains the solver interface base class for various search algorithms.
 
namespace  storage
 This namespace contains commonly used storage and container types.
 
namespace  successor_samplers
 This namespace contains implementations of transition successor samplers.
 
namespace  tasks
 This namespace contains implementations of probabilistic planning tasks.
 

Classes

struct  approx_eq_to
 Unary function object for approximate equality comparison. More...
 
struct  approx_less
 Unary function object for approximate inequality comparison. More...
 
struct  approx_neq_to
 Unary function object for approximate inequality comparison. More...
 
struct  CompositeMDP
 Composes a state space and a cost function to an MDP. More...
 
class  CostFunction
 The interface specifying action and state termination costs, aswell as the goal states of a state space. More...
 
class  Distribution
 A convenience class that represents a finite probability distribution. More...
 
class  Evaluator
 The interface representing heuristic functions. More...
 
struct  Interval
 Represents a closed interval over the extended reals as a pair of lower and upper bound. More...
 
class  ItemProbabilityPair
 An item-probability pair. More...
 
class  MDP
 Basic interface for MDPs. More...
 
class  MDPAlgorithm
 Interface for MDP algorithm implementations. More...
 
class  MultiPolicy
 Represents a policy that can specify a set of actions for a state. More...
 
struct  no_normalize_t
 Disambiguator tag type. More...
 
struct  overloaded
 
class  Policy
 Represents a deterministic, stationary, partial policy. More...
 
struct  PolicyDecision
 Stores an action and a bounding interval for the Q* value of this action. More...
 
class  ProbabilisticEffectConditionsProxy
 Proxy class used to inspect the list of effect conditions of a conditional effect of a probabilistic operator. Can be used as a range of FactProxies, one for each effect condition. More...
 
class  ProbabilisticEffectProxy
 Proxy class used to inspect a probabilistic effect of a probabilistic operator. More...
 
class  ProbabilisticEffectsProxy
 Proxy class used to inspect the list of probabilistic effects of a probabilistic operator. Can be used as a range of ProbabilisticEffectProxies, one for each probabilistic effect. More...
 
class  ProbabilisticOperatorProxy
 Proxy class used to inspect a single probabilistic operator. More...
 
class  ProbabilisticOperatorsProxy
 Proxy class used to inspect a list of probabilistic operators of a probabilistic task. Can be used as a range of ProbabilisticOperatorProxies, one for each probabilistic operator. More...
 
class  ProbabilisticOutcomeProxy
 Proxy class used to inspect a single probabilistic outcome of a probabilistic operator. More...
 
class  ProbabilisticOutcomesProxy
 Proxy class used to inspect the list of probabilistic outcomes of a probabilistic operator. Can be used as a range of ProbabilisticOutcomeProxies, one for each probabilistic outcome. More...
 
class  ProbabilisticTask
 Represents a probabilistic planning task with axioms and conditional effects. More...
 
class  ProbabilisticTaskProxy
 Proxy class used to inspect a probabilistic planning task. More...
 
class  ProgressReport
 A registry for print functions related to search progress. More...
 
class  SimpleMDP
 Basic interface for MDPs. More...
 
class  SolverInterface
 An interface that describes an MDP solver. More...
 
struct  StateID
 A StateID represents a state within a StateIDMap. Just like Fast Downward's StateID type, it is trivial to copy and intended for long term storage. More...
 
class  StateSpace
 An interface representing a Markov Decision Process (MDP) without objective function. More...
 
class  TerminationInfo
 Specifies the termination cost and goal status of a state. More...
 

Typedefs

using FDROpenList = algorithms::OpenList<OperatorID>
 Type alias for OpenLists for MDPs in FDR.
 
using FDRPolicyPicker = algorithms::PolicyPicker<State, OperatorID>
 Type alias for policy pickers for MDPs in FDR.
 
using FDRTransitionSorter = algorithms::TransitionSorter<State, OperatorID>
 Type alias for TransitionSorters for MDPs in FDR.
 
using value_t = double
 Typedef for the state value type.
 
using FDRStateSpace = StateSpace<State, OperatorID>
 Type alias for state spaces in FDR.
 
using FDRCostFunction = SimpleCostFunction<State, OperatorID>
 Type alias for cost functions for MDPs in FDR.
 
using FDRSimpleCostFunction = SimpleCostFunction<State, OperatorID>
 Type alias for simple cost functions for MDPs in FDR.
 
using FDRMDP = MDP<State, OperatorID>
 Type alias for MDPs with states in FDR.
 
using FDRSimpleMDP = SimpleMDP<State, OperatorID>
 Type alias for simple MDPs with states in FDR.
 
using FDREvaluator = Evaluator<State>
 Type alias for evaluators for states in FDR.
 
using Printer = std::function<void(std::ostream&)>
 A function that prints something to an output stream.
 
using BoundProperty = std::function<Interval()>
 A function that produces a state value bound.
 
template<typename T >
using param_type
 Alias template defining the best way to pass a parameter of a given type.
 

Functions

std::string usage (const std::string &progname)
 Returns a string documenting usage of the planner. Receives the program name as input.
 
template<typename State , typename Action >
void compute_value_table (MDP< State, Action > &mdp, param_type< State > initial_state, const Evaluator< State > &heuristic, std::span< value_t > value_table, double max_time=std::numeric_limits< double >::infinity())
 Computes the optimal value function of the abstraction, complete up to forward reachability from the initial state.
 
template<typename State , typename Action >
std::unique_ptr< MultiPolicy< State, Action > > compute_optimal_projection_policy (MDP< State, Action > &mdp, std::span< const value_t > value_table, param_type< State > initial_state, utils::RandomNumberGenerator &rng, bool wildcard)
 Extract an abstract optimal policy from the value table.
 
template<typename State , typename Action >
std::unique_ptr< MultiPolicy< State, Action > > compute_greedy_projection_policy (MDP< State, Action > &mdp, std::span< const value_t > value_table, param_type< State > initial_state, utils::RandomNumberGenerator &rng, bool wildcard)
 Extracts an abstract greedy policy from the value table, which may not be optimal if traps are existent.
 
template<typename State , typename Action >
void verify (MDP< State, Action > &mdp, std::span< const value_t > value_table, lp::LPSolverType type)
 Computes the optimal value function of the abstraction, complete up to forward reachability from the initial state.
 
Interval operator+ (Interval lhs, Interval rhs)
 Computes the component-wise addition of two intervals.
 
Interval operator* (value_t scale_factor, Interval val)
 Scales an interval.
 
Interval operator* (Interval val, value_t scale_factor)
 Scales an interval.
 
std::ostream & operator<< (std::ostream &os, Interval val)
 Stream output operator. Prints '[<val.lower>,<val.upper>]'.
 
bool does_fire (const ProbabilisticEffectProxy &effect, const State &state)
 Checks if the conditions of a probabilistic effect are fulfilled in a state.
 
constexpr value_t operator""_vt (long double value)
 User-defined floating-point literals for state values.
 
constexpr value_t operator""_vt (unsigned long long value)
 User-defined integer literals for state values.
 
bool is_approx_equal (value_t v1, value_t v2, value_t epsilon=g_epsilon)
 Equivalent to \(|v_1 - v_2| \leq \epsilon\).
 
bool is_approx_less (value_t v1, value_t v2, value_t epsilon=g_epsilon)
 Equivalent to \(v_2 - v_1 > \epsilon\).
 
bool is_approx_greater (value_t v1, value_t v2, value_t epsilon=g_epsilon)
 Equivalent to \(v_1 - v_2 > \epsilon\).
 

Variables

constexpr no_normalize_t no_normalize = no_normalize_t{}
 Disambiguator tag for Distribution constructor to indicate that the probabilities are already normalized to one.
 
value_t g_epsilon
 The default tolerance value for approximate comparisons.
 

Typedef Documentation

◆ FDROpenList

Type alias for OpenLists for MDPs in FDR.

◆ FDRPolicyPicker

Type alias for policy pickers for MDPs in FDR.

◆ FDRTransitionSorter

Type alias for TransitionSorters for MDPs in FDR.

◆ value_t

using probfd::value_t = double

Typedef for the state value type.

◆ FDRStateSpace

using probfd::FDRStateSpace = StateSpace<State, OperatorID>

Type alias for state spaces in FDR.

◆ FDRCostFunction

using probfd::FDRCostFunction = SimpleCostFunction<State, OperatorID>

Type alias for cost functions for MDPs in FDR.

◆ FDRSimpleCostFunction

using probfd::FDRSimpleCostFunction = SimpleCostFunction<State, OperatorID>

Type alias for simple cost functions for MDPs in FDR.

◆ FDRMDP

using probfd::FDRMDP = MDP<State, OperatorID>

Type alias for MDPs with states in FDR.

◆ FDRSimpleMDP

using probfd::FDRSimpleMDP = SimpleMDP<State, OperatorID>

Type alias for simple MDPs with states in FDR.

◆ FDREvaluator

Type alias for evaluators for states in FDR.

◆ Printer

using probfd::Printer = std::function<void(std::ostream&)>

A function that prints something to an output stream.

◆ BoundProperty

using probfd::BoundProperty = std::function<Interval()>

A function that produces a state value bound.

◆ param_type

template<typename T >
using probfd::param_type
Initial value:
typename std::conditional_t<is_cheap_to_copy_v<T>, T, const T&>

Alias template defining the best way to pass a parameter of a given type.

Function Documentation

◆ usage()

std::string probfd::usage ( const std::string & progname)
extern

Returns a string documenting usage of the planner. Receives the program name as input.

◆ compute_value_table()

template<typename State , typename Action >
void probfd::compute_value_table ( MDP< State, Action > & mdp,
param_type< State > initial_state,
const Evaluator< State > & heuristic,
std::span< value_t > value_table,
double max_time = std::numeric_limits<double>::infinity() )

Computes the optimal value function of the abstraction, complete up to forward reachability from the initial state.

◆ compute_optimal_projection_policy()

template<typename State , typename Action >
std::unique_ptr< MultiPolicy< State, Action > > probfd::compute_optimal_projection_policy ( MDP< State, Action > & mdp,
std::span< const value_t > value_table,
param_type< State > initial_state,
utils::RandomNumberGenerator & rng,
bool wildcard )

Extract an abstract optimal policy from the value table.

Tie-breaking is performed randomly using the input RNG. If the wildcard option is specified, a wildcard policy will be returned, i.e., a policy that assigns multiple equivalent operators to an abstract state.

◆ compute_greedy_projection_policy()

template<typename State , typename Action >
std::unique_ptr< MultiPolicy< State, Action > > probfd::compute_greedy_projection_policy ( MDP< State, Action > & mdp,
std::span< const value_t > value_table,
param_type< State > initial_state,
utils::RandomNumberGenerator & rng,
bool wildcard )

Extracts an abstract greedy policy from the value table, which may not be optimal if traps are existent.

Tie-breaking is performed randomly using the input RNG. If the wildcard option is specified, a wildcard policy will be returned, i.e., a policy that assigns multiple equivalent operators to an abstract state.

◆ verify()

template<typename State , typename Action >
void probfd::verify ( MDP< State, Action > & mdp,
std::span< const value_t > value_table,
lp::LPSolverType type )

Computes the optimal value function of the abstraction, complete up to forward reachability from the initial state.

◆ operator+()

Interval probfd::operator+ ( Interval lhs,
Interval rhs )

Computes the component-wise addition of two intervals.

Parameters
lhs- An interval \([a_1, b_1]\)
rhs- An interval \([a_2, b_2]\)
Returns
The interval \([a_1 + a_2, b_1 + b_2]\)

◆ operator*() [1/2]

Interval probfd::operator* ( value_t scale_factor,
Interval val )

Scales an interval.

Parameters
scale_factor- The scaling factor \(n\)
val- An interval \([a, b]\)
Returns
The interval \([n \cdot a, n \cdot b]\)

◆ operator*() [2/2]

Interval probfd::operator* ( Interval val,
value_t scale_factor )

Scales an interval.

Parameters
scale_factor- The scaling factor \(n\)
val- An interval \([a, b]\)
Returns
The interval \([n \cdot a, n \cdot b]\)

◆ operator<<()

std::ostream & probfd::operator<< ( std::ostream & os,
Interval val )

Stream output operator. Prints '[<val.lower>,<val.upper>]'.

◆ does_fire()

bool probfd::does_fire ( const ProbabilisticEffectProxy & effect,
const State & state )

Checks if the conditions of a probabilistic effect are fulfilled in a state.

◆ operator""_vt() [1/2]

value_t probfd::operator""_vt ( long double value)
constexpr

User-defined floating-point literals for state values.

◆ operator""_vt() [2/2]

value_t probfd::operator""_vt ( unsigned long long value)
constexpr

User-defined integer literals for state values.

◆ is_approx_equal()

bool probfd::is_approx_equal ( value_t v1,
value_t v2,
value_t epsilon = g_epsilon )

Equivalent to \(|v_1 - v_2| \leq \epsilon\).

◆ is_approx_less()

bool probfd::is_approx_less ( value_t v1,
value_t v2,
value_t epsilon = g_epsilon )

Equivalent to \(v_2 - v_1 > \epsilon\).

◆ is_approx_greater()

bool probfd::is_approx_greater ( value_t v1,
value_t v2,
value_t epsilon = g_epsilon )

Equivalent to \(v_1 - v_2 > \epsilon\).

Variable Documentation

◆ no_normalize

no_normalize_t probfd::no_normalize = no_normalize_t{}
inlineconstexpr

Disambiguator tag for Distribution constructor to indicate that the probabilities are already normalized to one.

◆ g_epsilon

value_t probfd::g_epsilon
extern

The default tolerance value for approximate comparisons.