Skip to content

Commit

Permalink
better truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbouteiller committed Mar 25, 2023
1 parent 9aee8a3 commit 2aa6a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtgym/envs/real_time_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def __update_obs_rew_terminated_truncated(self):
self.__o_set_flag = True
self.__o_lock.release()

def _retrieve_obs_rew_terminated_truncated_info(self):
def _retrieve_obs_rew_terminated_info(self):
"""Waits for new available o r d i and retrieves them.
"""
c = True
Expand Down Expand Up @@ -549,7 +549,7 @@ def step(self, action):
self._run_time_step(action)
if not self.running:
raise RuntimeError("The episode is terminated or truncated. Call reset before step.")
obs, rew, terminated, info = self._retrieve_obs_rew_terminated_truncated_info()
obs, rew, terminated, info = self._retrieve_obs_rew_terminated_info()
truncated = (self.current_step >= self.ep_max_length) if not terminated else False
done = (terminated or truncated)
if not done: # apply action only when not done
Expand Down

0 comments on commit 2aa6a7d

Please sign in to comment.