Skip to content

Commit

Permalink
updates to point env randgoal - make it 1d
Browse files Browse the repository at this point in the history
  • Loading branch information
cbfinn committed Jan 19, 2017
1 parent c94b235 commit 8126059
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/point_env_randgoal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ def reset(self, reset_args=None):
goal = reset_args
if goal is not None:
self._goal = goal
elif self._goal is None:
#elif self._goal is None:
else:
# Only set a new goal if this env hasn't had one defined before.
self._goal = np.random.uniform(-1, 1, size=(2,))
self._state = (0, 0) #np.random.uniform(-1, 1, size=(2,))
self._goal = np.random.uniform(0, 1, size=(2,))
self._goal[1] = 0

self._state = (0, 0)
observation = np.copy(self._state)
return observation

Expand Down

0 comments on commit 8126059

Please sign in to comment.