Skip to content

Commit

Permalink
pass seed during env.reset
Browse files Browse the repository at this point in the history
  • Loading branch information
spMohanty authored and kidzik committed Nov 5, 2017
1 parent 31eaece commit 4f0c537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osim/redis/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run(self):
return self._error_template(_error_message)
else:
self.env = RunEnv(visualize = _payload['visualize'], max_obstacles=10)
_observation = self.env.reset()
_observation = self.env.reset(seed=self.seed_map[self.simulation_count]))
_observation = np.array(_observation).tolist()
_command_response = {}
_command_response['type'] = messages.OSIM_RL.ENV_CREATE_RESPONSE
Expand All @@ -99,7 +99,7 @@ def run(self):
"""
self.simulation_count += 1
if self.seed_map and self.simulation_count < len(self.seed_map):
_observation = self.env.reset()
_observation = self.env.reset(seed=self.seed_map[self.simulation_count])
_observation = list(_observation)
_command_response = {}
_command_response['type'] = messages.OSIM_RL.ENV_RESET_RESPONSE
Expand Down

0 comments on commit 4f0c537

Please sign in to comment.