Skip to content

Commit

Permalink
kill the quick first flip resest, not working, try the Opti Reset shot.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiyotech committed Dec 6, 2022
1 parent f1ece29 commit 294766a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Constants_flip_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
TIME_HORIZON = 4 # horizon in seconds
T_STEP = FRAME_SKIP / 120 # real time per rollout step
ZERO_SUM = False
STEP_SIZE = 250_000
STEP_SIZE = 1_000_000 # 250_000
DB_NUM = 6
19 changes: 10 additions & 9 deletions learner_flip_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
ent_coef=0.01,
)

run_id = "flip_reset_run7.12"
run_id = "flip_reset_run7.14_fast_shot"
wandb.login(key=os.environ["WANDB_KEY"])
logger = wandb.init(dir="./wandb_store",
name="Flip_reset_7.12",
name="Flip_reset_7.14_fast_shot",
project="Opti",
entity="kaiyotech",
id=run_id,
Expand All @@ -77,20 +77,21 @@
tick_skip=Constants_flip_reset.FRAME_SKIP,
team_size=3, extra_boost_info=False),
lambda: ZeroSumReward(zero_sum=Constants_flip_reset.ZERO_SUM,
flip_reset_w=2,
flip_reset_w=1,
wall_touch_w=.2,
flip_reset_help_w=0,
double_tap_w=10,
double_tap_w=0,
flip_reset_goal_w=10,
concede_w=-10,
velocity_bg_w=0,
has_flip_reset_vbg_w=0.2,
has_flip_reset_vbg_w=0,
velocity_pb_w=0.01,
jump_touch_w=0,
inc_flip_reset_w=0,
prevent_chain_reset=True,
quick_flip_reset_w=4,
quick_flip_reset_norm_sec=1.5,
prevent_chain_reset=False,
quick_flip_reset_w=0,
quick_flip_reset_norm_sec=0,
exit_velocity_w=2,
),
lambda: CoyoteAction(),
save_every=logger.config.save_every * 3,
Expand Down Expand Up @@ -144,7 +145,7 @@
disable_gradient_logging=True,
)

alg.load("flip_reset_saves/Opti_1670338972.1363978/Opti_9000/checkpoint.pt")
alg.load("flip_reset_saves/Opti_1670123638.7511785/Opti_12350/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
2 changes: 1 addition & 1 deletion setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__(self, mode):
),
# (0, 0, 0, 0.5, 0, 0.5)
# (0, 0, 0, 1, 0, 0, 0)
(0.35, 0.05, 0.05, 0.35, 0.1, 0, 0.05)
(0.5, 0.05, 0.05, 0.35, 0.05, 0, 0)
)
)

Expand Down
15 changes: 8 additions & 7 deletions worker_flip_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@

if __name__ == "__main__":
rew = ZeroSumReward(zero_sum=Constants_flip_reset.ZERO_SUM,
flip_reset_w=2,
flip_reset_w=1,
wall_touch_w=.2,
flip_reset_help_w=0,
double_tap_w=10,
double_tap_w=0,
flip_reset_goal_w=10,
concede_w=-10,
velocity_bg_w=0,
has_flip_reset_vbg_w=0.2,
velocity_pb_w=0.01,
has_flip_reset_vbg_w=0,
velocity_pb_w=0,
jump_touch_w=0,
inc_flip_reset_w=0,
prevent_chain_reset=True,
quick_flip_reset_w=4,
quick_flip_reset_norm_sec=1.5,
prevent_chain_reset=False,
quick_flip_reset_w=0,
quick_flip_reset_norm_sec=0,
exit_velocity_w=2,
)
frame_skip = Constants_flip_reset.FRAME_SKIP
fps = 120 // frame_skip
Expand Down

0 comments on commit 294766a

Please sign in to comment.