Closed yizhangliu closed 1 year ago
Server: gdrl --trainer sb3 --env_path=debug Godot example: Racer from https://github.com/edbeeching/godot_rl_agents_examples
func get_action_space(): return { "turn" : { "size": 1, "action_type": "continuous" }, "accelerate" : { "size": 2, "action_type": "discrete" }, "brake" : { "size": 2, "action_type": "discrete" }, } func set_action(action): if action["accelerate"] != action["brake"]: print(action) turn_action = action["turn"][0] acc_action = action["accelerate"] == 1 brake_action = action["brake"] == 1
During the debugging process,the returned action is always : action["accelerate"] == action["brake"].
Is there something wrong?
@edbeeching
I got it.
https://github.com/edbeeching/godot_rl_agents/blob/16deecac4a178fbba437fac9d63a86358bc8f1f7/godot_rl/core/utils.py#L88
after this line, should add : counter += 1
@yizhangliu , nice spot! Would you be able to make a PR with the fix?
Fixed in #99, thanks.
Server: gdrl --trainer sb3 --env_path=debug Godot example: Racer from https://github.com/edbeeching/godot_rl_agents_examples
During the debugging process,the returned action is always : action["accelerate"] == action["brake"].
Is there something wrong?