Skip to content

Commit

Permalink
roll back to 1930 and roll back rewards and start polishing. Add some…
Browse files Browse the repository at this point in the history
… more random rotation to car.
  • Loading branch information
Kaiyotech committed Dec 30, 2022
1 parent 3eb8e4e commit 3481387
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Constants_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
TIME_HORIZON = 2 # horizon in seconds
T_STEP = FRAME_SKIP / 120 # real time per rollout step
ZERO_SUM = False
STEP_SIZE = 500_000
STEP_SIZE = 1_000_000
DB_NUM = 8
17 changes: 7 additions & 10 deletions learner_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@
fps = 120 / frame_skip
gamma = np.exp(np.log(0.5) / (fps * half_life_seconds))
config = dict(
actor_lr=1e-4,
critic_lr=1e-4,
actor_lr=1e-5,
critic_lr=1e-5,
n_steps=Constants_recovery.STEP_SIZE,
batch_size=250_000,
minibatch_size=125_000,
epochs=30,
gamma=gamma,
save_every=10,
save_every=5,
model_every=1000,
ent_coef=0.015,
ent_coef=0.01,
)

run_id = "recovery_run6.04"
run_id = "recovery_run6.05"
wandb.login(key=os.environ["WANDB_KEY"])
logger = wandb.init(dir="./wandb_store",
name="Recovery_Run6.04",
name="Recovery_Run6.05",
project="Opti",
entity="kaiyotech",
id=run_id,
Expand All @@ -84,13 +84,10 @@
velocity_pb_w=0.01,
boost_gain_w=0.25,
punish_boost=True,
touch_ball_w=2,
touch_ball_w=3,
boost_remain_touch_w=.75,
touch_grass_w=-0.03,
supersonic_bonus_vpb_w=0.02,
zero_touch_grass_if_ss=True,
turtle_w=-0.04,
final_reward_ball_dist_w=1,
),
lambda: CoyoteAction(),
save_every=logger.config.save_every * 3,
Expand Down
6 changes: 4 additions & 2 deletions setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,15 @@ def __init__(self, mode, end_object_choice=None):
AugmentSetter(ReplaySetter(low_recovery_replays[i], random_boost=False,
zero_ball_weight=0.8,
zero_car_weight=0.2,
rotate_car_weight=0.3,
rotate_car_weight=0.2,
backward_car_weight=0.15,
vel_div_weight=0.2,
), False, True, False),
AugmentSetter(ReplaySetter(high_recovery_replays[i], random_boost=False,
zero_ball_weight=0.8,
zero_car_weight=0.2,
rotate_car_weight=0.3,
rotate_car_weight=0.2,
backward_car_weight=0.15,
vel_div_weight=0.2,
), False, True, False),
HalfFlip(),
Expand Down
5 changes: 1 addition & 4 deletions worker_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
velocity_pb_w=0.01,
boost_gain_w=0.25,
punish_boost=True,
touch_ball_w=2,
touch_ball_w=3,
boost_remain_touch_w=.75,
touch_grass_w=-0.03,
supersonic_bonus_vpb_w=0.02,
zero_touch_grass_if_ss=True,
turtle_w=-0.04,
final_reward_ball_dist_w=1,
)
frame_skip = Constants_recovery.FRAME_SKIP
fps = 120 // frame_skip
Expand Down

0 comments on commit 3481387

Please sign in to comment.