From 55e45fe14e50169922dd3cdccab730e69ce24dd1 Mon Sep 17 00:00:00 2001 From: weixin_46229132 Date: Tue, 18 Mar 2025 14:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=94=B9ddpg=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DDPG_solver/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DDPG_solver/main.py b/DDPG_solver/main.py index 0bd634a..8f19591 100644 --- a/DDPG_solver/main.py +++ b/DDPG_solver/main.py @@ -1,3 +1,4 @@ +from env import PartitionMazeEnv from utils import str2bool, evaluate_policy from datetime import datetime from DDPG import DDPG_agent @@ -6,9 +7,9 @@ import os import shutil import argparse import torch + import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from env import PartitionMazeEnv '''Hyperparameter Setting''' parser = argparse.ArgumentParser() @@ -52,9 +53,10 @@ print(opt) def main(): - EnvName = ['Pendulum-v1', 'LunarLanderContinuous-v2', 'Humanoid-v4', + EnvName = ['PartitionMaze_DDPG', 'Pendulum-v1', 'LunarLanderContinuous-v2', 'Humanoid-v4', 'HalfCheetah-v4', 'BipedalWalker-v3', 'BipedalWalkerHardcore-v3'] - BrifEnvName = ['PV1', 'LLdV2', 'Humanv4', 'HCv4', 'BWv3', 'BWHv3'] + BrifEnvName = ['PM_DDPG', 'PV1', 'LLdV2', + 'Humanv4', 'HCv4', 'BWv3', 'BWHv3'] # Build Env # env = gym.make(EnvName[opt.EnvIdex], render_mode = "human" if opt.render else None)