viapoint reacher reward bug fix

This commit is contained in:
Maximilian Huettenrauch
2021-02-19 16:17:55 +01:00
parent 1e3f036478
commit 60e1673ee1
3 changed files with 15 additions and 5 deletions
+3 -2
View File
@@ -23,11 +23,12 @@ def make_viapointreacher_env(rank, seed=0):
num_dof=5,
num_basis=5,
duration=2,
alpha_phase=2,
alpha_phase=2.5,
dt=_env.dt,
start_pos=_env.start_pos,
learn_goal=False,
policy_type="velocity")
policy_type="velocity",
weights_scale=50)
_env.seed(seed + rank)
return _env
+1 -1
View File
@@ -83,7 +83,7 @@ class ViaPointReacher(gym.Env):
if not self._is_collided:
if self._steps == 100:
dist_reward = np.linalg.norm(self.end_effector - self.via_point)
if self._steps == 200:
if self._steps == 199:
dist_reward = np.linalg.norm(self.end_effector - self.goal_point)
reward = - dist_reward ** 2