14template<
typename ValueType>
17 std::set<uint32_t> observations;
18 for (
auto state : states) {
24template<
typename ValueType>
32 Statistics() =
default;
41 storm::storage::BitVector const& surelyReachSinkStates, std::shared_ptr<storm::utility::solver::SmtSolverFactory>& smtSolverFactory)
42 : pomdp(pomdp), targetObservations(
extractObservations(pomdp, targetStates)), targetStates(targetStates), surelyReachSinkStates(surelyReachSinkStates) {
43 this->expressionManager = std::make_shared<storm::expressions::ExpressionManager>();
44 smtSolver = smtSolverFactory->create(*expressionManager);
48 surelyReachSinkStates = surelyReachSink;
59 STORM_LOG_TRACE(
"Questionmark states: " << (~surelyReachSinkStates & ~targetStates));
60 return analyze(k, ~surelyReachSinkStates & ~targetStates, pomdp.getInitialStates());
67 void initialize(uint64_t k);
70 std::unique_ptr<storm::solver::SmtSolver> smtSolver;
72 std::shared_ptr<storm::expressions::ExpressionManager> expressionManager;
73 uint64_t maxK = std::numeric_limits<uint64_t>::max();
75 std::set<uint32_t> targetObservations;
79 std::vector<std::vector<uint64_t>> statesPerObservation;
80 std::vector<std::vector<storm::expressions::Expression>> actionSelectionVarExpressions;
81 std::vector<std::vector<storm::expressions::Variable>> actionSelectionVars;
82 std::vector<storm::expressions::Variable> reachVars;
83 std::vector<storm::expressions::Expression> reachVarExpressions;
84 std::vector<std::vector<storm::expressions::Expression>> pathVars;
This class represents a partially observable Markov decision process.
uint32_t getObservation(uint64_t state) const
OneShotPolicySearch(storm::models::sparse::Pomdp< ValueType > const &pomdp, storm::storage::BitVector const &targetStates, storm::storage::BitVector const &surelyReachSinkStates, std::shared_ptr< storm::utility::solver::SmtSolverFactory > &smtSolverFactory)
bool analyzeForInitialStates(uint64_t k)
Check if you can find a memoryless policy from the initial states.
void setSurelyReachSinkStates(storm::storage::BitVector const &surelyReachSink)
A bit vector that is internally represented as a vector of 64-bit values.
A class that provides convenience operations to display run times.
#define STORM_LOG_TRACE(message)
std::set< uint32_t > extractObservations(storm::models::sparse::Pomdp< ValueType > const &pomdp, storm::storage::BitVector const &states)