Skip to content

Commit

Permalink
Update with new wrappers options
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpalms committed Sep 29, 2023
1 parent 69c86ad commit 385d4fd
Show file tree
Hide file tree
Showing 21 changed files with 97 additions and 97 deletions.
10 changes: 5 additions & 5 deletions ray_rllib/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def main(trained_model, env_spaces, test=False):

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.frame_stack = 5
wrappers_settings.normalize_reward = True
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.stack_frames = 5
wrappers_settings.scale = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True

config = {
# Define and configure the environment
Expand Down
10 changes: 5 additions & 5 deletions ray_rllib/dict_obs_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def main():

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.frame_stack = 5
wrappers_settings.normalize_reward = True
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.stack_frames = 5
wrappers_settings.scale = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True

config = {
# Define and configure the environment
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main(cfg_file, trained_model):

# Wrappers Settings
wrappers_settings = load_settings_flat_dict(WrappersSettings, params["wrappers_settings"])
wrappers_settings.reward_normalization = False
wrappers_settings.normalize_reward = False

# Additional obs key list
wrappers_settings.wrappers = [[SplitActionsInMoveAndAttack, {}],
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/doapp/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/doapp/sr6_256x6_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 6
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 6
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/kof98umh/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
normalize_reward: true
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/sfiii3n/sr2_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
stack_frames: 4
dilation: 3
add_last_action_to_observation: true
actions_stack: 36
add_last_action: true
stack_actions: 36
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/sfiii3n/sr6_256x6_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 6
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 6
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/tektagt/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health_1", "own_health_2", "opp_health_1",
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/umk3/sr2_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ settings:
outfits: 1

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
stack_frames: 4
dilation: 3
add_last_action_to_observation: true
actions_stack: 36
add_last_action: true
stack_actions: 36
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines/cfg_files/umk3/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ settings:
outfits: 1

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
add_last_action_to_observation: true
actions_stack: 12
stack_frames: 4
add_last_action: true
stack_actions: 12
scale: true
role_relative_observation: true
role_relative: true
flatten: true

ram_states: ["action_move", "action_attack", "own_health", "opp_health", "own_side", "opp_side", "stage"]
Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def main(cfg_file, trained_model, test=False):

# Wrappers Settings
wrappers_settings = load_settings_flat_dict(WrappersSettings, params["wrappers_settings"])
wrappers_settings.reward_normalization = False
wrappers_settings.normalize_reward = False

# Create environment
env, num_envs = make_sb3_env(settings.game_id, settings, wrappers_settings, no_vec=True)
Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def main():

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.frame_stack = 5
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.normalize_reward = True
wrappers_settings.stack_frames = 5
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.scale = True
wrappers_settings.exclude_image_scaling = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True
wrappers_settings.flatten = True
wrappers_settings.filter_keys = ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/cfg_files/doapp/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
stack_frames: 4
dilation: 1
add_last_action_to_observation: true
actions_stack: 12
add_last_action: true
stack_actions: 12
scale: true
exclude_image_scaling: true
role_relative_observation: true
role_relative: true
flatten: true
filter_keys: ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ settings:
outfits: 2

wrappers_settings:
reward_normalization: true
normalize_reward: true
no_attack_buttons_combinations: true
frame_stack: 4
stack_frames: 4
dilation: 1
add_last_action_to_observation: true
actions_stack: 12
add_last_action: true
stack_actions: 12
scale: true
exclude_image_scaling: true
role_relative_observation: true
role_relative: true
flatten: true
filter_keys: ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/dict_obs_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def main():

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.frame_stack = 5
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.normalize_reward = True
wrappers_settings.stack_frames = 5
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.scale = True
wrappers_settings.exclude_image_scaling = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True
wrappers_settings.flatten = True
wrappers_settings.filter_keys = ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/parallel_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def main():

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.frame_stack = 5
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.normalize_reward = True
wrappers_settings.stack_frames = 5
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.scale = True
wrappers_settings.exclude_image_scaling = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True
wrappers_settings.flatten = True
wrappers_settings.filter_keys = ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down
10 changes: 5 additions & 5 deletions stable_baselines3/saving_loading_evaluating.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def main():

# Wrappers Settings
wrappers_settings = WrappersSettings()
wrappers_settings.reward_normalization = True
wrappers_settings.frame_stack = 5
wrappers_settings.add_last_action_to_observation = True
wrappers_settings.actions_stack = 12
wrappers_settings.normalize_reward = True
wrappers_settings.stack_frames = 5
wrappers_settings.add_last_action = True
wrappers_settings.stack_actions = 12
wrappers_settings.scale = True
wrappers_settings.exclude_image_scaling = True
wrappers_settings.role_relative_observation = True
wrappers_settings.role_relative = True
wrappers_settings.flatten = True
wrappers_settings.filter_keys = ["action", "own_health", "opp_health", "own_side", "opp_side", "opp_character", "stage", "timer"]

Expand Down

0 comments on commit 385d4fd

Please sign in to comment.