Skip to content

Commit

Permalink
first steps towards discrete action space
Browse files Browse the repository at this point in the history
  • Loading branch information
manila95 committed Sep 22, 2023
1 parent 96e0238 commit 28e13f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleanrl/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def linear_schedule(start_e: float, end_e: float, duration: int, t: int):
)
args = parse_args()
run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}"
action_map = {0: np.array([args.action_scale, args.action_scale]), 1: np.array([0., args.action_scale]), 2: np.array([args.action_scale, 0.])}
action_map = {0: np.array([args.action_scale, args.action_scale]), 1: np.array([-args.action_scale, args.action_scale]), 2: np.array([args.action_scale, -args.action_scale]), 3: np.array([-args.action_scale, -args.action_scale])}
def action_map_fn(action):
return action_map[action]

Expand Down

0 comments on commit 28e13f8

Please sign in to comment.