Browse Source

reset reward from last action upon reset

tempestpy_adaptions
Sebastian Junges 4 years ago
parent
commit
e3251c7500
  1. 2
      src/storm/simulator/PrismProgramSimulator.cpp

2
src/storm/simulator/PrismProgramSimulator.cpp

@ -107,6 +107,7 @@ namespace storm {
template<typename ValueType>
bool DiscreteTimePrismProgramSimulator<ValueType>::resetToInitial() {
lastActionRewards = zeroRewards;
auto indices = stateGenerator->getInitialStates(stateToIdCallback);
STORM_LOG_THROW(indices.size() == 1, storm::exceptions::NotSupportedException, "Program must have a unique initial state");
currentState = idToState[indices[0]];
@ -115,6 +116,7 @@ namespace storm {
template<typename ValueType>
bool DiscreteTimePrismProgramSimulator<ValueType>::resetToState(generator::CompressedState const& newState) {
lastActionRewards = zeroRewards;
currentState = newState;
return explore();
}
Loading…
Cancel
Save