Remove double call to reset_internal_state() on gym environments (#364)
This commit is contained in:
1 parent
a576ab5659
commit
587b74e04a
2 files changed
+4
-6
No files matched your search
@@ -392,9 +392,6 @@ class GymEnvironment(Environment):
|
||||
else:
|
||||
screen.error("Error: Environment {} does not support human control.".format(self.env), crash=True)
|
||||
|
||||
# initialize the state by getting a new state from the environment
|
||||
self.reset_internal_state(True)
|
||||
|
||||
# render
|
||||
if self.is_rendered:
|
||||
image = self.get_rendered_image()
|
||||
@@ -405,7 +402,6 @@ class GymEnvironment(Environment):
|
||||
self.renderer.create_screen(image.shape[1]*scale, image.shape[0]*scale)
|
||||
|
||||
# the info is only updated after the first step
|
||||
self.state = self.step(self.action_space.default_action).next_state
|
||||
self.state_space['measurements'] = VectorObservationSpace(shape=len(self.info.keys()))
|
||||
|
||||
if self.env.spec and custom_reward_threshold is None:
|
||||
|
||||
Reference in new issue
Block a user