opendilab / LightZero

[NeurIPS 2023 Spotlight] LightZero: A Unified Benchmark for Monte Carlo Tree Search in General Sequential Decision Scenarios (awesome MCTS)
https://huggingface.co/spaces/OpenDILabCommunity/ZeroPal
Apache License 2.0
1.15k stars 120 forks source link

Could you provide detail code example to customize the env and algo that can run successfully in a entire file? #236

Closed yuuma002 closed 4 months ago

yuuma002 commented 5 months ago

We have read the docs carefully. However, we cannot find such example. All we can find is:

https://github.com/opendilab/LightZero/blob/main/docs/source/tutorials/envs/customize_envs_zh.md

What we want is the code example that can run successfully in a entire files with customized envs, which is not by the config files (e.g. zoo/classic_control/cartpole/config/cartpole_muzero_config.py)

Could you provide detail code example to customize the env and algo that can run successfully in a entire file?

Thank a lot.

PaParaZz1 commented 5 months ago

You can refer to our previous pull request about adding a new environment. Such as:

If you have any other questions, please feel free to ask in this issue.

yuuma002 commented 5 months ago

Should we refer to the source code of ding package when we write code with customized the env or algo?

PaParaZz1 commented 5 months ago

Typically, you do not need to refer to the source code of DI-engine (ding); simply following the examples we provide should suffice. However, if you encounter issues that you are unable to resolve, you may consult the policy/model/env sections of DI-engine or seek assistance by posting issues in LightZero.

yuuma002 commented 5 months ago

Could you provide detail docs of the classes we should used in building RL algorithms?

We find some classes lacks docs in https://di-engine-docs.readthedocs.io/en/latest/01_quickstart/first_rl_program.html:

This makes it diffucult to understand the quickstart tutorial.

Hope you can fix the issue.

Thanks.

PaParaZz1 commented 5 months ago

LightZero uses our old pipeline of DI-engine while the quickstart doc of DI-engine has already presented our new pipeline.

yuuma002 commented 5 months ago

When will the docs be completed (e.g. https://di-engine-docs.readthedocs.io/en/latest/05_api_doc/framework/middleware/functional/explorer.html#eps-greedy-handler)?

image

PaParaZz1 commented 5 months ago

When will the docs be completed (e.g. https://di-engine-docs.readthedocs.io/en/latest/05_api_doc/framework/middleware/functional/explorer.html#eps-greedy-handler)?

image

We have fixed this problem in the latest commit of DI-engine. It is a import bug resulting in the wrong doc format. Now you can visit the corresponding API doc with this doc link.