Update: minigrid_ona.py: timestep fix
@@ -209,9 +209,11 @@ for i in range(0, 10000000):
successes += 1
if max_steps == -1 or action != default_action: #only record values once for external mode
print("successes=" + str(successes) + " time="+str(timestep))
+ if timestep >= max_steps and max_steps != -1:
+ break
if action != default_action:
timestep += 1
- if done or (timestep+2 >= max_steps and max_steps != -1):
+ if done:
DisableToggle = False
NAR.AddInput("20") #don't temporally relate observations across reset
h+=1
@@ -237,6 +239,5 @@ for i in range(0, 10000000):
while timestep <= max_steps:
print("successes=" + str(successes) + " time="+str(timestep))
timestep += 1
-print(timestep, max_steps)
env.close()
