Skip to content

Commit

Permalink
correcting a last missing typo changing t by nb_timestep
Browse files Browse the repository at this point in the history
  • Loading branch information
marota committed Dec 21, 2021
1 parent 639202f commit 51afa77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oracle4grid/core/replay/agent_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def replay(action_path: list, max_iter: int,

# Check reward as expected
expected_reward = extract_expected_reward(kpis)
if (not isclose(expected_reward, agent_reward, rel_tol=rel_tol)) and t==max_iter:
if (not isclose(expected_reward, agent_reward, rel_tol=rel_tol)) and nb_time_step==max_iter:
warnings.warn("During replay - oracle agent does not retrieve the expected reward. Some timestep may have break some game rules in real condition. Expected reward: "+str(expected_reward)+" Reward obtained: "+str(agent_reward))
elif nb_time_step==max_iter: # if pas de game over
print("Expected reward of "+str(expected_reward)+" has been correctly obtained in replay conditions")
Expand Down

0 comments on commit 51afa77

Please sign in to comment.