Skip to content

Commit

Permalink
fix some possible int/float zero issues with previous action and others
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiyotech committed Jul 25, 2023
1 parent 5a690e1 commit 3a40a79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CoyoteObs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(self, tick_skip=8, team_size=3, expanding: bool = True, extra_boost
if self.doubletap_indicator:
self.floor_bounce = False
self.backboard_bounce = False
self.prev_ball_vel = np.asarray([0] * 3)
self.prev_ball_vel = np.asarray([0.] * 3)
assert not (selector_infinite_boost is not None and not selector)
self.n = 0
self.selector_infinite_boost = selector_infinite_boost
Expand Down
2 changes: 1 addition & 1 deletion CoyoteParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def __init__(self, obs_info=None):
self._lookup_table = self.make_lookup_table(len(self.models))
# self.prev_action = None
# self.prev_model = None
self.prev_actions = np.asarray([[0] * 8] * 8)
self.prev_actions = np.asarray([[0.] * 8] * 8)
self.prev_model_actions = np.asarray([-1] * 6)

@staticmethod
Expand Down
6 changes: 3 additions & 3 deletions learner_gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
ent_coef=0.01,
)

run_id = "gp_run_2v2_3.54"
run_id = "gp_run_2v2_3.55"
wandb.login(key=os.environ["WANDB_KEY"])
logger = wandb.init(dir="./wandb_store",
name="GP_Run_2v2_3.54",
name="GP_Run_2v2_3.55",
project="Opti",
entity="kaiyotech",
id=run_id,
Expand Down Expand Up @@ -154,7 +154,7 @@
disable_gradient_logging=True,
)

alg.load("GP_saves/Opti_1683132125.3858902/Opti_42240/checkpoint.pt")
alg.load("GP_saves/Opti_1689183465.5270734/Opti_42370/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

0 comments on commit 3a40a79

Please sign in to comment.