update biac reward

This commit is contained in:
Maximilian Huettenrauch 2021-02-17 18:50:55 +01:00
parent 46fc642c36
commit 7ed22df778
2 changed files with 1 additions and 3 deletions

View File

@ -73,7 +73,6 @@ class BallInACupReward(alr_reward_fct.AlrReward):
# cost = self._get_stage_wise_cost(ball_in_cup, min_dist, dist_final, dist_ctxt) # cost = self._get_stage_wise_cost(ball_in_cup, min_dist, dist_final, dist_ctxt)
cost = 2 * (0.5 * min_dist + 0.5 * dist_final + 0.1 * dist_ctxt) cost = 2 * (0.5 * min_dist + 0.5 * dist_final + 0.1 * dist_ctxt)
reward = np.exp(-1 * cost) - 1e-4 * action_cost reward = np.exp(-1 * cost) - 1e-4 * action_cost
stop_sim = True
success = dist_final < 0.05 and dist_ctxt < 0.05 success = dist_final < 0.05 and dist_ctxt < 0.05
else: else:
reward = - 1e-4 * action_cost reward = - 1e-4 * action_cost

View File

@ -28,7 +28,7 @@ def make_env(rank, seed=0):
dt=env.dt, dt=env.dt,
weights_scale=0.1, weights_scale=0.1,
zero_start=True, zero_start=True,
zero_goal=False zero_goal=True
) )
env.seed(seed + rank) env.seed(seed + rank)
@ -37,7 +37,6 @@ def make_env(rank, seed=0):
return _init return _init
def make_simple_env(rank, seed=0): def make_simple_env(rank, seed=0):
""" """
Utility function for multiprocessed env. Utility function for multiprocessed env.