12template<
typename ValueType>
15 std::set<uint32_t> observations;
16 for (
auto state : states) {
22template<
typename ValueType>
30 Statistics() =
default;
39 storm::storage::BitVector const& surelyReachSinkStates, std::shared_ptr<storm::utility::solver::SmtSolverFactory>& smtSolverFactory)
40 : pomdp(pomdp), targetObservations(
extractObservations(pomdp, targetStates)), targetStates(targetStates), surelyReachSinkStates(surelyReachSinkStates) {
41 this->expressionManager = std::make_shared<storm::expressions::ExpressionManager>();
42 smtSolver = smtSolverFactory->create(*expressionManager);
46 surelyReachSinkStates = surelyReachSink;
57 STORM_LOG_TRACE(
"Questionmark states: " << (~surelyReachSinkStates & ~targetStates));
58 return analyze(k, ~surelyReachSinkStates & ~targetStates, pomdp.getInitialStates());
65 void initialize(uint64_t k);
68 std::unique_ptr<storm::solver::SmtSolver> smtSolver;
70 std::shared_ptr<storm::expressions::ExpressionManager> expressionManager;
71 uint64_t maxK = std::numeric_limits<uint64_t>::max();
73 std::set<uint32_t> targetObservations;
77 std::vector<std::vector<uint64_t>> statesPerObservation;
78 std::vector<std::vector<storm::expressions::Expression>> actionSelectionVarExpressions;
79 std::vector<std::vector<storm::expressions::Variable>> actionSelectionVars;
80 std::vector<storm::expressions::Variable> reachVars;
81 std::vector<storm::expressions::Expression> reachVarExpressions;
82 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)