Skip to content

Commit 6b6cc90

Browse files
committed
ensured prev_reward is always defined
1 parent 1663b8f commit 6b6cc90

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_mdp_playground.py

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def test_continuous_dynamics_move_along_a_line(self):
7373
# Test 3: that random actions lead to bad reward and then later a sequence of optimal actions leads to good reward. Also implicitly tests sequence lengths.
7474
env = RLToyEnv(**config)
7575
state = env.get_augmented_state()['curr_state'].copy() #env.reset()
76+
prev_reward = None
7677
for i in range(40):
7778
if i < 20:
7879
action = env.action_space.sample()
@@ -97,6 +98,7 @@ def test_continuous_dynamics_move_along_a_line(self):
9798
config["delay"] = 1
9899
env = RLToyEnv(**config)
99100
state = env.get_augmented_state()['curr_state'].copy() #env.reset()
101+
prev_reward = None
100102
for i in range(40):
101103
if i < 20:
102104
action = env.action_space.sample()

0 commit comments

Comments
 (0)