浏览代码

[Bug Fix] Issue 5204 : GymToUnityWrapper must call reset if done (#5207)

(cherry picked from commit 21548e02e83a563c75a0b6bae0cbbe1ceb6552e0)
/release_16_branch
Ervin Teng 4 年前
当前提交
44dd1e29
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
      gym-unity/gym_unity/envs/__init__.py

6
gym-unity/gym_unity/envs/__init__.py


done (boolean/list): whether the episode has ended.
info (dict): contains auxiliary diagnostic information.
"""
if self.game_over:
raise UnityGymException(
"You are calling 'step()' even though this environment has already "
"returned done = True. You must always call 'reset()' once you "
"receive 'done = True'."
)
if self._flattener is not None:
# Translate action into list
action = self._flattener.lookup_action(action)

正在加载...
取消
保存