Jingliang-Duan / DSAC-v1

DSAC; Distributional Soft Actor-Critic
108 stars 31 forks source link

How can I train my environment to results? #3

Open Yu-zx opened 4 months ago

Yu-zx commented 4 months ago

I want to ask, how should I train my scene environment to run, I see you input is a trained file, you can tell me, how should I train my scene environment

drsssssss commented 4 months ago

Hello, Thanks for your attention.

Regarding training your 'scene environment,' we don't know what kind of problem your env is solving, so we can't provide you with a detailed answer.

However, if your env is a standard gym-style environment, like https://github.com/openai/gym/blob/master/gym/envs/mujoco/humanoid_v3.py, you just need to create a env_gym/gym_xxxx_data.py and then gym.make it as same as other gym envs. And replace the env_id parameter of example_train/main.py or example_train/dsac_mlp_humanoidconti_offserial.py with gym_xxxx. Then you can train it.

Or if your environment can be disclosed, we can assist with that as well.

Yu-zx commented 4 months ago

First of all, thank you very much for your reply. What if I create my own customized environment, such as a drone path planning scenario or a mobile robot path planning scenario, and refer to the MPE environment. How should I train through this code? to obtain correct experimental results

drsssssss commented 4 months ago

If your environment can be disclosed, please send your_env.py to xlm2223@gmail.com. We can help you with some standardization.

In your_env.py, the model needs to be built correctly, and the STEP function, the REWARD calculation, the state space, the action space, the Done condition, etc. need to be set correctly. You can refer to ‘’https://github.com/Intelligent-Driving-Laboratory/GOPS/tree/dev/gops/env‘’ for a simple design of your env.

Yu-zx commented 4 months ago

I have contacted you by email, have you received it? Thank you again for your timely reply

drsssssss commented 4 months ago

Already got your email, I looked at the repository you posted.

You firstly need to write the robot_warehouse interface call, and secondly, refer to a trajectory tracking optimal control task: https://github.com/Intelligent-Driving-Laboratory/GOPS/blob/dev/gops/env/env_ocp/pyth_mobilerobot.py Ensure that your_env_data have the right functions for reset function, step function, work_space, action_space and observation_space, and design the right feedback, you don't need the ‘constraint’ related ones in this environment!

Yu-zx commented 4 months ago

Can you guide me on how to access the environment, or provide some specific suggestions on how to modify my task scene environment for this environment

drsssssss commented 4 months ago

Please add my wechat: tip911