From 277fbcca32ec784439c0184dee9ef460d54bb27e Mon Sep 17 00:00:00 2001 From: thomasnol Date: Sun, 20 Jul 2025 18:51:08 -0400 Subject: [PATCH 1/2] (feat) added directories of configuration.json files for every category and game --- src/gym/atari/.gitkeep | 0 src/gym/box2d/.gitkeep | 0 .../classic_control/Acrobot-v1/configuration.json | 12 ++++++++++++ .../classic_control/CartPole-v1}/cartpole.py | 0 .../classic_control/CartPole-v1/configuration.json | 12 ++++++++++++ .../MountainCar-v0/configuration.json | 12 ++++++++++++ .../MountainCarContinuous-v0/configuration.json | 12 ++++++++++++ .../classic_control/Pendulum-v1/configuration.json | 12 ++++++++++++ 8 files changed, 60 insertions(+) create mode 100644 src/gym/atari/.gitkeep create mode 100644 src/gym/box2d/.gitkeep create mode 100644 src/gym/classic_control/Acrobot-v1/configuration.json rename src/{ => gym/classic_control/CartPole-v1}/cartpole.py (100%) create mode 100644 src/gym/classic_control/CartPole-v1/configuration.json create mode 100644 src/gym/classic_control/MountainCar-v0/configuration.json create mode 100644 src/gym/classic_control/MountainCarContinuous-v0/configuration.json create mode 100644 src/gym/classic_control/Pendulum-v1/configuration.json diff --git a/src/gym/atari/.gitkeep b/src/gym/atari/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/gym/box2d/.gitkeep b/src/gym/box2d/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/gym/classic_control/Acrobot-v1/configuration.json b/src/gym/classic_control/Acrobot-v1/configuration.json new file mode 100644 index 0000000..8d87840 --- /dev/null +++ b/src/gym/classic_control/Acrobot-v1/configuration.json @@ -0,0 +1,12 @@ +{ + "Environment": { + "env_name": "Acrobot-v1", + "action_space_size": 3, + "observation_shape": [ + 6 + ] + }, + "Training": { + "num_episodes": 500 + } +} \ No newline at end of file diff --git a/src/cartpole.py b/src/gym/classic_control/CartPole-v1/cartpole.py similarity index 100% rename from src/cartpole.py rename to src/gym/classic_control/CartPole-v1/cartpole.py diff --git a/src/gym/classic_control/CartPole-v1/configuration.json b/src/gym/classic_control/CartPole-v1/configuration.json new file mode 100644 index 0000000..ab03302 --- /dev/null +++ b/src/gym/classic_control/CartPole-v1/configuration.json @@ -0,0 +1,12 @@ +{ + "Environment": { + "env_name": "CartPole-v1", + "action_space_size": 2, + "observation_shape": [ + 4 + ] + }, + "Training": { + "num_episodes": 500 + } +} \ No newline at end of file diff --git a/src/gym/classic_control/MountainCar-v0/configuration.json b/src/gym/classic_control/MountainCar-v0/configuration.json new file mode 100644 index 0000000..6e4eeb5 --- /dev/null +++ b/src/gym/classic_control/MountainCar-v0/configuration.json @@ -0,0 +1,12 @@ +{ + "Environment": { + "env_name": "MountainCar-v0", + "action_space_size": 2, + "observation_shape": [ + 4 + ] + }, + "Training": { + "num_episodes": 500 + } +} \ No newline at end of file diff --git a/src/gym/classic_control/MountainCarContinuous-v0/configuration.json b/src/gym/classic_control/MountainCarContinuous-v0/configuration.json new file mode 100644 index 0000000..e02eea3 --- /dev/null +++ b/src/gym/classic_control/MountainCarContinuous-v0/configuration.json @@ -0,0 +1,12 @@ +{ + "Environment": { + "env_name": "MountainCarContinuous-v0", + "action_space_size": 2, + "observation_shape": [ + 4 + ] + }, + "Training": { + "num_episodes": 500 + } +} \ No newline at end of file diff --git a/src/gym/classic_control/Pendulum-v1/configuration.json b/src/gym/classic_control/Pendulum-v1/configuration.json new file mode 100644 index 0000000..e88d831 --- /dev/null +++ b/src/gym/classic_control/Pendulum-v1/configuration.json @@ -0,0 +1,12 @@ +{ + "Environment": { + "env_name": "Pendulum-v1", + "action_space_size": 2, + "observation_shape": [ + 4 + ] + }, + "Training": { + "num_episodes": 500 + } +} \ No newline at end of file From 014aa77d5657c9e06df7f7ef8bed7de8537e52d3 Mon Sep 17 00:00:00 2001 From: thomasnol Date: Sun, 20 Jul 2025 19:16:36 -0400 Subject: [PATCH 2/2] (feat) moved configuration.json files, made them complete --- {src/gym => gymnasium}/atari/.gitkeep | 0 {src/gym => gymnasium}/box2d/.gitkeep | 0 .../Acrobot-v1/configuration.json | 54 ++++++++++++++++++ .../CartPole-v1/configuration.json | 54 ++++++++++++++++++ .../MountainCar-v0/configuration.json | 54 ++++++++++++++++++ .../configuration.json | 56 +++++++++++++++++++ .../Pendulum-v1/configuration.json | 56 +++++++++++++++++++ .../CartPole-v1 => }/cartpole.py | 0 .../Acrobot-v1/configuration.json | 12 ---- .../CartPole-v1/configuration.json | 12 ---- .../MountainCar-v0/configuration.json | 12 ---- .../configuration.json | 12 ---- .../Pendulum-v1/configuration.json | 12 ---- 13 files changed, 274 insertions(+), 60 deletions(-) rename {src/gym => gymnasium}/atari/.gitkeep (100%) rename {src/gym => gymnasium}/box2d/.gitkeep (100%) create mode 100644 gymnasium/classic_control/Acrobot-v1/configuration.json create mode 100644 gymnasium/classic_control/CartPole-v1/configuration.json create mode 100644 gymnasium/classic_control/MountainCar-v0/configuration.json create mode 100644 gymnasium/classic_control/MountainCarContinuous-v0/configuration.json create mode 100644 gymnasium/classic_control/Pendulum-v1/configuration.json rename src/{gym/classic_control/CartPole-v1 => }/cartpole.py (100%) delete mode 100644 src/gym/classic_control/Acrobot-v1/configuration.json delete mode 100644 src/gym/classic_control/CartPole-v1/configuration.json delete mode 100644 src/gym/classic_control/MountainCar-v0/configuration.json delete mode 100644 src/gym/classic_control/MountainCarContinuous-v0/configuration.json delete mode 100644 src/gym/classic_control/Pendulum-v1/configuration.json diff --git a/src/gym/atari/.gitkeep b/gymnasium/atari/.gitkeep similarity index 100% rename from src/gym/atari/.gitkeep rename to gymnasium/atari/.gitkeep diff --git a/src/gym/box2d/.gitkeep b/gymnasium/box2d/.gitkeep similarity index 100% rename from src/gym/box2d/.gitkeep rename to gymnasium/box2d/.gitkeep diff --git a/gymnasium/classic_control/Acrobot-v1/configuration.json b/gymnasium/classic_control/Acrobot-v1/configuration.json new file mode 100644 index 0000000..ae15860 --- /dev/null +++ b/gymnasium/classic_control/Acrobot-v1/configuration.json @@ -0,0 +1,54 @@ +{ + "Network architecture": { + "hidden_dim": 128, + "num_blocks": 2, + "conv_channels": 32 + }, + "Training": { + "batch_size": 64, + "learning_rate": 0.01, + "weight_decay": 0.0001, + "target_update_frequency": 250, + "checkpoint_interval": 50, + "num_episodes": 1220, + "train_frequency": 2, + "checkpoint_root_dir": "checkpoints" + }, + "MCTS": { + "num_simulations": 25, + "c_puct": 1.25, + "dirichlet_alpha": 0.25, + "exploration_fraction": 0.25 + }, + "Environment": { + "env_name": "Acrobot-v1", + "action_space_size": 3, + "observation_shape": [ + 6 + ] + }, + "Self-Play": { + "num_unroll_steps": 5, + "td_steps": 10, + "discount": 0.997 + }, + "Memory": { + "memory_capacity": 2000, + "min_memory_size": 100, + "min_memory_pct": 0.1, + "per_alpha": 0.6, + "per_epsilon": 1e-06, + "per_beta": 0.4 + }, + "Data Types": { + "model_dtype": "float32", + "action_dtype": "int32", + "target_dtype": "float32" + }, + "Device": { + "device_type": "cpu" + }, + "Other": { + "seed": 42 + } +} \ No newline at end of file diff --git a/gymnasium/classic_control/CartPole-v1/configuration.json b/gymnasium/classic_control/CartPole-v1/configuration.json new file mode 100644 index 0000000..79383e2 --- /dev/null +++ b/gymnasium/classic_control/CartPole-v1/configuration.json @@ -0,0 +1,54 @@ +{ + "Network architecture": { + "hidden_dim": 128, + "num_blocks": 2, + "conv_channels": 32 + }, + "Training": { + "batch_size": 64, + "learning_rate": 0.01, + "weight_decay": 0.0001, + "target_update_frequency": 250, + "checkpoint_interval": 50, + "num_episodes": 1220, + "train_frequency": 2, + "checkpoint_root_dir": "checkpoints" + }, + "MCTS": { + "num_simulations": 25, + "c_puct": 1.25, + "dirichlet_alpha": 0.25, + "exploration_fraction": 0.25 + }, + "Environment": { + "env_name": "CartPole-v1", + "action_space_size": 2, + "observation_shape": [ + 4 + ] + }, + "Self-Play": { + "num_unroll_steps": 5, + "td_steps": 10, + "discount": 0.997 + }, + "Memory": { + "memory_capacity": 2000, + "min_memory_size": 100, + "min_memory_pct": 0.1, + "per_alpha": 0.6, + "per_epsilon": 1e-06, + "per_beta": 0.4 + }, + "Data Types": { + "model_dtype": "float32", + "action_dtype": "int32", + "target_dtype": "float32" + }, + "Device": { + "device_type": "cpu" + }, + "Other": { + "seed": 42 + } +} \ No newline at end of file diff --git a/gymnasium/classic_control/MountainCar-v0/configuration.json b/gymnasium/classic_control/MountainCar-v0/configuration.json new file mode 100644 index 0000000..cd94895 --- /dev/null +++ b/gymnasium/classic_control/MountainCar-v0/configuration.json @@ -0,0 +1,54 @@ +{ + "Network architecture": { + "hidden_dim": 128, + "num_blocks": 2, + "conv_channels": 32 + }, + "Training": { + "batch_size": 64, + "learning_rate": 0.01, + "weight_decay": 0.0001, + "target_update_frequency": 250, + "checkpoint_interval": 50, + "num_episodes": 1220, + "train_frequency": 2, + "checkpoint_root_dir": "checkpoints" + }, + "MCTS": { + "num_simulations": 25, + "c_puct": 1.25, + "dirichlet_alpha": 0.25, + "exploration_fraction": 0.25 + }, + "Environment": { + "env_name": "MountainCar-v0", + "action_space_size": 3, + "observation_shape": [ + 2 + ] + }, + "Self-Play": { + "num_unroll_steps": 5, + "td_steps": 10, + "discount": 0.997 + }, + "Memory": { + "memory_capacity": 2000, + "min_memory_size": 100, + "min_memory_pct": 0.1, + "per_alpha": 0.6, + "per_epsilon": 1e-06, + "per_beta": 0.4 + }, + "Data Types": { + "model_dtype": "float32", + "action_dtype": "int32", + "target_dtype": "float32" + }, + "Device": { + "device_type": "cpu" + }, + "Other": { + "seed": 42 + } +} \ No newline at end of file diff --git a/gymnasium/classic_control/MountainCarContinuous-v0/configuration.json b/gymnasium/classic_control/MountainCarContinuous-v0/configuration.json new file mode 100644 index 0000000..8955252 --- /dev/null +++ b/gymnasium/classic_control/MountainCarContinuous-v0/configuration.json @@ -0,0 +1,56 @@ +{ + "Network architecture": { + "hidden_dim": 128, + "num_blocks": 2, + "conv_channels": 32 + }, + "Training": { + "batch_size": 64, + "learning_rate": 0.01, + "weight_decay": 0.0001, + "target_update_frequency": 250, + "checkpoint_interval": 50, + "num_episodes": 1220, + "train_frequency": 2, + "checkpoint_root_dir": "checkpoints" + }, + "MCTS": { + "num_simulations": 25, + "c_puct": 1.25, + "dirichlet_alpha": 0.25, + "exploration_fraction": 0.25 + }, + "Environment": { + "env_name": "MountainCarContinuous-v0", + "action_space_size": [ + 1 + ], + "observation_shape": [ + 2 + ] + }, + "Self-Play": { + "num_unroll_steps": 5, + "td_steps": 10, + "discount": 0.997 + }, + "Memory": { + "memory_capacity": 2000, + "min_memory_size": 100, + "min_memory_pct": 0.1, + "per_alpha": 0.6, + "per_epsilon": 1e-06, + "per_beta": 0.4 + }, + "Data Types": { + "model_dtype": "float32", + "action_dtype": "int32", + "target_dtype": "float32" + }, + "Device": { + "device_type": "cpu" + }, + "Other": { + "seed": 42 + } +} \ No newline at end of file diff --git a/gymnasium/classic_control/Pendulum-v1/configuration.json b/gymnasium/classic_control/Pendulum-v1/configuration.json new file mode 100644 index 0000000..104bee8 --- /dev/null +++ b/gymnasium/classic_control/Pendulum-v1/configuration.json @@ -0,0 +1,56 @@ +{ + "Network architecture": { + "hidden_dim": 128, + "num_blocks": 2, + "conv_channels": 32 + }, + "Training": { + "batch_size": 64, + "learning_rate": 0.01, + "weight_decay": 0.0001, + "target_update_frequency": 250, + "checkpoint_interval": 50, + "num_episodes": 1220, + "train_frequency": 2, + "checkpoint_root_dir": "checkpoints" + }, + "MCTS": { + "num_simulations": 25, + "c_puct": 1.25, + "dirichlet_alpha": 0.25, + "exploration_fraction": 0.25 + }, + "Environment": { + "env_name": "Pendulum-v1", + "action_space_size": [ + 1 + ], + "observation_shape": [ + 3 + ] + }, + "Self-Play": { + "num_unroll_steps": 5, + "td_steps": 10, + "discount": 0.997 + }, + "Memory": { + "memory_capacity": 2000, + "min_memory_size": 100, + "min_memory_pct": 0.1, + "per_alpha": 0.6, + "per_epsilon": 1e-06, + "per_beta": 0.4 + }, + "Data Types": { + "model_dtype": "float32", + "action_dtype": "int32", + "target_dtype": "float32" + }, + "Device": { + "device_type": "cpu" + }, + "Other": { + "seed": 42 + } +} \ No newline at end of file diff --git a/src/gym/classic_control/CartPole-v1/cartpole.py b/src/cartpole.py similarity index 100% rename from src/gym/classic_control/CartPole-v1/cartpole.py rename to src/cartpole.py diff --git a/src/gym/classic_control/Acrobot-v1/configuration.json b/src/gym/classic_control/Acrobot-v1/configuration.json deleted file mode 100644 index 8d87840..0000000 --- a/src/gym/classic_control/Acrobot-v1/configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Environment": { - "env_name": "Acrobot-v1", - "action_space_size": 3, - "observation_shape": [ - 6 - ] - }, - "Training": { - "num_episodes": 500 - } -} \ No newline at end of file diff --git a/src/gym/classic_control/CartPole-v1/configuration.json b/src/gym/classic_control/CartPole-v1/configuration.json deleted file mode 100644 index ab03302..0000000 --- a/src/gym/classic_control/CartPole-v1/configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Environment": { - "env_name": "CartPole-v1", - "action_space_size": 2, - "observation_shape": [ - 4 - ] - }, - "Training": { - "num_episodes": 500 - } -} \ No newline at end of file diff --git a/src/gym/classic_control/MountainCar-v0/configuration.json b/src/gym/classic_control/MountainCar-v0/configuration.json deleted file mode 100644 index 6e4eeb5..0000000 --- a/src/gym/classic_control/MountainCar-v0/configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Environment": { - "env_name": "MountainCar-v0", - "action_space_size": 2, - "observation_shape": [ - 4 - ] - }, - "Training": { - "num_episodes": 500 - } -} \ No newline at end of file diff --git a/src/gym/classic_control/MountainCarContinuous-v0/configuration.json b/src/gym/classic_control/MountainCarContinuous-v0/configuration.json deleted file mode 100644 index e02eea3..0000000 --- a/src/gym/classic_control/MountainCarContinuous-v0/configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Environment": { - "env_name": "MountainCarContinuous-v0", - "action_space_size": 2, - "observation_shape": [ - 4 - ] - }, - "Training": { - "num_episodes": 500 - } -} \ No newline at end of file diff --git a/src/gym/classic_control/Pendulum-v1/configuration.json b/src/gym/classic_control/Pendulum-v1/configuration.json deleted file mode 100644 index e88d831..0000000 --- a/src/gym/classic_control/Pendulum-v1/configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Environment": { - "env_name": "Pendulum-v1", - "action_space_size": 2, - "observation_shape": [ - 4 - ] - }, - "Training": { - "num_episodes": 500 - } -} \ No newline at end of file