diff --git a/ray_rllib/agent.py b/ray_rllib/agent.py index 9816362..96909c2 100644 --- a/ray_rllib/agent.py +++ b/ray_rllib/agent.py @@ -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 diff --git a/ray_rllib/dict_obs_space.py b/ray_rllib/dict_obs_space.py index bca0425..c7aa07c 100644 --- a/ray_rllib/dict_obs_space.py +++ b/ray_rllib/dict_obs_space.py @@ -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 diff --git a/stable_baselines/agent.py b/stable_baselines/agent.py index eba8a2e..6100ee6 100644 --- a/stable_baselines/agent.py +++ b/stable_baselines/agent.py @@ -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, {}], diff --git a/stable_baselines/cfg_files/doapp/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/doapp/sr6_128x4_das_nc.yaml index 48ad335..776b582 100644 --- a/stable_baselines/cfg_files/doapp/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/doapp/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/doapp/sr6_256x6_das_nc.yaml b/stable_baselines/cfg_files/doapp/sr6_256x6_das_nc.yaml index 44c8b03..f8b6c26 100644 --- a/stable_baselines/cfg_files/doapp/sr6_256x6_das_nc.yaml +++ b/stable_baselines/cfg_files/doapp/sr6_256x6_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/kof98umh/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/kof98umh/sr6_128x4_das_nc.yaml index a30c60c..0388b97 100644 --- a/stable_baselines/cfg_files/kof98umh/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/kof98umh/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_c.yaml b/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_c.yaml index 37a647c..159e397 100644 --- a/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_c.yaml +++ b/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_c.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_nc.yaml index f870e4e..470995b 100644 --- a/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/samsh5sp/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/sfiii3n/sr2_128x4_das_nc.yaml b/stable_baselines/cfg_files/sfiii3n/sr2_128x4_das_nc.yaml index d79f56d..b648b30 100644 --- a/stable_baselines/cfg_files/sfiii3n/sr2_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/sfiii3n/sr2_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml index e0ef682..754112d 100644 --- a/stable_baselines/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/sfiii3n/sr6_256x6_das_nc.yaml b/stable_baselines/cfg_files/sfiii3n/sr6_256x6_das_nc.yaml index 80ae630..4eb8ba4 100644 --- a/stable_baselines/cfg_files/sfiii3n/sr6_256x6_das_nc.yaml +++ b/stable_baselines/cfg_files/sfiii3n/sr6_256x6_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/tektagt/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/tektagt/sr6_128x4_das_nc.yaml index c4154af..19e62a3 100644 --- a/stable_baselines/cfg_files/tektagt/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/tektagt/sr6_128x4_das_nc.yaml @@ -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", diff --git a/stable_baselines/cfg_files/umk3/sr2_128x4_das_nc.yaml b/stable_baselines/cfg_files/umk3/sr2_128x4_das_nc.yaml index fcf13ca..08ececa 100644 --- a/stable_baselines/cfg_files/umk3/sr2_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/umk3/sr2_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines/cfg_files/umk3/sr6_128x4_das_nc.yaml b/stable_baselines/cfg_files/umk3/sr6_128x4_das_nc.yaml index f3d73dc..4bc1d1a 100644 --- a/stable_baselines/cfg_files/umk3/sr6_128x4_das_nc.yaml +++ b/stable_baselines/cfg_files/umk3/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines3/agent.py b/stable_baselines3/agent.py index 775d89b..8445a4a 100644 --- a/stable_baselines3/agent.py +++ b/stable_baselines3/agent.py @@ -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) diff --git a/stable_baselines3/basic.py b/stable_baselines3/basic.py index 06d22b6..b36ad42 100644 --- a/stable_baselines3/basic.py +++ b/stable_baselines3/basic.py @@ -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"] diff --git a/stable_baselines3/cfg_files/doapp/sr6_128x4_das_nc.yaml b/stable_baselines3/cfg_files/doapp/sr6_128x4_das_nc.yaml index 81e168f..ba63068 100644 --- a/stable_baselines3/cfg_files/doapp/sr6_128x4_das_nc.yaml +++ b/stable_baselines3/cfg_files/doapp/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines3/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml b/stable_baselines3/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml index 49d1e28..4730350 100644 --- a/stable_baselines3/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml +++ b/stable_baselines3/cfg_files/sfiii3n/sr6_128x4_das_nc.yaml @@ -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"] diff --git a/stable_baselines3/dict_obs_space.py b/stable_baselines3/dict_obs_space.py index fc0caac..e7773c5 100644 --- a/stable_baselines3/dict_obs_space.py +++ b/stable_baselines3/dict_obs_space.py @@ -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"] diff --git a/stable_baselines3/parallel_envs.py b/stable_baselines3/parallel_envs.py index fc0caac..e7773c5 100644 --- a/stable_baselines3/parallel_envs.py +++ b/stable_baselines3/parallel_envs.py @@ -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"] diff --git a/stable_baselines3/saving_loading_evaluating.py b/stable_baselines3/saving_loading_evaluating.py index a12178c..5aa445c 100644 --- a/stable_baselines3/saving_loading_evaluating.py +++ b/stable_baselines3/saving_loading_evaluating.py @@ -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"]