From e3251c75002a7f0385c4681353c5923529c63c00 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Fri, 26 Mar 2021 12:44:09 -0700 Subject: [PATCH] reset reward from last action upon reset --- src/storm/simulator/PrismProgramSimulator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storm/simulator/PrismProgramSimulator.cpp b/src/storm/simulator/PrismProgramSimulator.cpp index 6f693b3ce..ba58cdc3e 100644 --- a/src/storm/simulator/PrismProgramSimulator.cpp +++ b/src/storm/simulator/PrismProgramSimulator.cpp @@ -107,6 +107,7 @@ namespace storm { template bool DiscreteTimePrismProgramSimulator::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 bool DiscreteTimePrismProgramSimulator::resetToState(generator::CompressedState const& newState) { + lastActionRewards = zeroRewards; currentState = newState; return explore(); }