fix distance reward calculation
This commit is contained in:
@@ -409,7 +409,7 @@ class PyBulletDeepMimicEnv(Env):
|
|||||||
if self.goal.is_hit:
|
if self.goal.is_hit:
|
||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
goalPos = self.goal.goal_data
|
goalPos = self.goal.world_pos
|
||||||
distanceSquared = sum([(x - y)**2 for (x, y) in zip(goalPos, linkPos)])
|
distanceSquared = sum([(x - y)**2 for (x, y) in zip(goalPos, linkPos)])
|
||||||
return math.exp(-4*distanceSquared)
|
return math.exp(-4*distanceSquared)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user