Skip to content

Commit

Permalink
change to zero mean on both kickoff and pinch, freeze actor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiyotech committed Sep 27, 2022
1 parent eeb96ea commit d7fb525
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Constants_kickoff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FRAME_SKIP = 4
TIME_HORIZON = 4 # horizon in seconds
T_STEP = FRAME_SKIP / 120 # real time per rollout step
ZERO_SUM = False
ZERO_SUM = True
STEP_SIZE = 1_000_000
2 changes: 1 addition & 1 deletion Constants_pinch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FRAME_SKIP = 4
TIME_HORIZON = 4 # horizon in seconds
T_STEP = FRAME_SKIP / 120 # real time per rollout step
ZERO_SUM = False
ZERO_SUM = True
STEP_SIZE = 1_000_000
DB_NUM = 1
4 changes: 2 additions & 2 deletions learner_kickoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
fps = 120 / frame_skip
gamma = np.exp(np.log(0.5) / (fps * half_life_seconds))
config = dict(
actor_lr=1e-4,
actor_lr=0,
critic_lr=1e-4,
n_steps=STEP_SIZE,
batch_size=100_000,
Expand Down Expand Up @@ -128,7 +128,7 @@
disable_gradient_logging=True,
)

alg.load("kickoff_saves/Opti_1664201562.2237294/Opti_1640/checkpoint.pt")
alg.load("kickoff_saves/Opti_1664218733.7430687/Opti_1800/checkpoint.pt")
alg.agent.optimizer.param_groups[0]["lr"] = logger.config.actor_lr
alg.agent.optimizer.param_groups[1]["lr"] = logger.config.critic_lr

Expand Down
10 changes: 5 additions & 5 deletions learner_pinch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
fps = 120 / frame_skip
gamma = np.exp(np.log(0.5) / (fps * half_life_seconds))
config = dict(
actor_lr=1e-4,
actor_lr=0,
critic_lr=1e-4,
n_steps=Constants_pinch.STEP_SIZE,
batch_size=100_000,
Expand Down Expand Up @@ -79,11 +79,11 @@
concede_w=-10,
velocity_pb_w=0.025,
velocity_bg_w=0.5,
acel_ball_w=3,
punish_low_touch_w=-0.1, # increase later
acel_ball_w=5,
punish_low_touch_w=-0.5, # increase later
team_spirit=1,
cons_air_touches_w=1,
jump_touch_w=1.5,
jump_touch_w=1,
wall_touch_w=1,
),
lambda: CoyoteAction(),
Expand Down Expand Up @@ -128,7 +128,7 @@
disable_gradient_logging=True,
)

alg.load("pinch_saves/Opti_1664165982.0115736/Opti_2070/checkpoint.pt")
alg.load("pinch_saves/Opti_1664215027.7179081/Opti_2550/checkpoint.pt")
alg.agent.optimizer.param_groups[0]["lr"] = logger.config.actor_lr
alg.agent.optimizer.param_groups[1]["lr"] = logger.config.critic_lr

Expand Down
6 changes: 3 additions & 3 deletions worker_pinch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
concede_w=-10,
velocity_pb_w=0.025,
velocity_bg_w=0.5,
acel_ball_w=3,
punish_low_touch_w=-0.1, # increase later
acel_ball_w=5,
punish_low_touch_w=-0.5, # increase later
team_spirit=1,
cons_air_touches_w=1,
jump_touch_w=1.5,
jump_touch_w=1,
wall_touch_w=1)
frame_skip = Constants_pinch.FRAME_SKIP
fps = 120 // frame_skip
Expand Down

0 comments on commit d7fb525

Please sign in to comment.