Merge pull request #74 from HongyiZhouCN/fix_reacher_random

This commit is contained in:
Hongyi Zhou 2023-09-06 12:53:12 +02:00 committed by GitHub
commit a3ceac7126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,11 +79,11 @@ class ReacherEnv(MujocoEnv, utils.EzPickle):
# I Quadrant
# self.goal = self.np_random.uniform(low=0, high=self.n_links / 10, size=2)
# II Quadrant
# self.goal = np.random.uniform(low=[-self.n_links / 10, 0], high=[0, self.n_links / 10], size=2)
# self.goal = self.np_random.uniform(low=[-self.n_links / 10, 0], high=[0, self.n_links / 10], size=2)
# II + III Quadrant
# self.goal = np.random.uniform(low=-self.n_links / 10, high=[0, self.n_links / 10], size=2)
# self.goal = self.np_random.uniform(low=-self.n_links / 10, high=[0, self.n_links / 10], size=2)
# I + II Quadrant
# self.goal = np.random.uniform(low=[-self.n_links / 10, 0], high=self.n_links, size=2)
# self.goal = self.np_random.uniform(low=[-self.n_links / 10, 0], high=self.n_links, size=2)
if np.linalg.norm(self.goal) < self.n_links / 10:
break