Browse Source

Fix for belief reward computation

tempestpy_adaptions
Alexander Bork 5 years ago
parent
commit
62e3a62686
  1. 5
      src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp

5
src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp

@ -1279,9 +1279,8 @@ namespace storm {
template<typename ValueType, typename RewardModelType>
ValueType ApproximatePOMDPModelchecker<ValueType, RewardModelType>::getRewardAfterAction(uint64_t action, storm::pomdp::Belief<ValueType> &belief) {
auto result = storm::utility::zero<ValueType>();
for (size_t i = 0; i < belief.probabilities.size(); ++i) {
for (auto const &probEntry : belief.probabilities)
result += probEntry.second * pomdp.getUniqueRewardModel().getTotalStateActionReward(probEntry.first, action, pomdp.getTransitionMatrix());
for (auto const &probEntry : belief.probabilities) {
result += probEntry.second * pomdp.getUniqueRewardModel().getTotalStateActionReward(probEntry.first, action, pomdp.getTransitionMatrix());
}
return result;
}

Loading…
Cancel
Save