mimic
Her-darling 2 months ago
parent 371e761a44
commit 6c9467f21e

@ -259,6 +259,7 @@ class dribble(gym.Env):
def close(self):
Draw.clear_all()
self.player.terminate()
def execute(self, action):
# Actions:
@ -354,7 +355,7 @@ class dribble(gym.Env):
loss = self.loss(obs, action_p, action_r)
# 计算奖励
reward = np.linalg.norm(w.ball_cheat_abs_vel) * cos_theta
reward = np.linalg.norm(w.ball_cheat_abs_vel) * cos_theta + loss
if self.ball_dist_hip_center_2d < 0.115:
reward = 0

Loading…
Cancel
Save