AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
task_properties.h
1#ifndef PROBFD_TASK_UTILS_TASK_PROPERTIES_H
2#define PROBFD_TASK_UTILS_TASK_PROPERTIES_H
3
4#include "probfd/task_proxy.h"
5
6#include "probfd/value_type.h"
7
8#include "downward/operator_cost.h"
9#include "downward/task_proxy.h"
10
11#include <iosfwd>
12#include <iterator>
13#include <vector>
14
15// Forward Declarations
16class AbstractTask;
17
18namespace probfd {
19class ProbabilisticTask;
20}
21
22namespace utils {
23class LogProxy;
24}
25
26namespace probfd::task_properties {
27
35void get_affected_vars(
36 const ProbabilisticOperatorProxy& op,
37 std::output_iterator<int> auto it)
38{
39 for (const ProbabilisticOutcomeProxy& outcome : op.get_outcomes()) {
40 for (const auto& effect : outcome.get_effects()) {
41 *it = effect.get_fact().get_variable().get_id();
42 }
43 }
44}
45
49extern bool
50is_applicable(const ProbabilisticOperatorProxy& op, const State& state);
51
52extern value_t get_adjusted_action_cost(
53 const ProbabilisticOperatorProxy& op,
54 OperatorCost cost_type,
55 bool is_unit_cost);
56
62extern bool is_unit_cost(const ProbabilisticTaskProxy& task);
63
69extern bool has_conditional_effects(const ProbabilisticTaskProxy& task);
70
76extern void verify_no_conditional_effects(const ProbabilisticTaskProxy& task);
77
84extern std::vector<value_t>
85get_operator_costs(const ProbabilisticTaskProxy& task_proxy);
86
92extern value_t
93get_average_operator_cost(const ProbabilisticTaskProxy& task_proxy);
94
100extern value_t get_min_operator_cost(const ProbabilisticTaskProxy& task_proxy);
101
109extern int get_num_total_effects(const ProbabilisticTaskProxy& task_proxy);
110
114extern void dump_probabilistic_task(
115 const ProbabilisticTaskProxy& task_proxy,
116 utils::LogProxy& log);
117
121extern void dump_probabilistic_task(
122 const ProbabilisticTaskProxy& task_proxy,
123 std::ostream& os);
124
125} // namespace probfd::task_properties
126
127#endif
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