Skip to content

Commit

Permalink
remove previous model action reset on model change, accidentally made…
Browse files Browse the repository at this point in the history
… it delayed, might need to revisit on another selector run
  • Loading branch information
Kaiyotech committed Jul 25, 2023
1 parent 3a40a79 commit 7736fd9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CoyoteParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,11 @@ def parse_actions(self, actions: Any, state: GameState) -> np.ndarray:
parsed_actions.append(action)
continue
action = int(action[0]) # change ndarray [0.] to 0
# action changed, reset previous actions for stability of model swaps to keep in distribution
if action != self.prev_model_actions[i]:
self.prev_actions[i] = np.asarray([0] * 8)
# # action changed, reset previous actions for stability of model swaps to keep in distribution
# ****** THIS PROBABLY DIDN'T WORK AND MADE IT PLAY BADLY ********
# At least from testing in rlbo this appears to be the case due to the delay of one tick
# if action != self.prev_model_actions[i]:
# self.prev_actions[i] = np.asarray([0] * 8)
# action = 22 # TODO testing remove this
# zero_boost = bool(action >= self.get_model_action_size()) # boost action 1 means no boost usage
# if action >= self.get_model_action_size():
Expand Down

0 comments on commit 7736fd9

Please sign in to comment.