Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -40,3 +40,8 @@ events.out.tfevents.*
|
|||||||
# OS
|
# OS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
# 排除掉几个需要输出的图片
|
||||||
|
!comparison_curve.png
|
||||||
|
!sac_learning_curve.png
|
||||||
|
!ppo_learning_curve.png
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 689 KiB |
@@ -16,4 +16,4 @@ batch_size: 256 # 每次梯度更新抽样的 batch 大小
|
|||||||
# --- 训练循环控制 ---
|
# --- 训练循环控制 ---
|
||||||
max_episodes: 200 # 总共训练多少个 episode
|
max_episodes: 200 # 总共训练多少个 episode
|
||||||
max_steps: 200 # 每 episode 最多步数 (Pendulum-v1 默认 200 步截断)
|
max_steps: 200 # 每 episode 最多步数 (Pendulum-v1 默认 200 步截断)
|
||||||
start_steps: 10000 # 纯随机动作探索的步数
|
start_steps: 3000 # 纯随机动作探索的步数
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 496 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 327 KiB |
@@ -35,7 +35,7 @@ def load_config(path: str) -> dict:
|
|||||||
|
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.abspath(__file__))
|
ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||||
SAC_CFG_PATH = os.path.join(ROOT, "configs", "pendulum_config.yaml")
|
SAC_CFG_PATH = os.path.join(ROOT, "configs", "sac_pendulum_config.yaml")
|
||||||
PPO_CFG_PATH = os.path.join(ROOT, "configs", "ppo_pendulum_config.yaml")
|
PPO_CFG_PATH = os.path.join(ROOT, "configs", "ppo_pendulum_config.yaml")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user