PKU-MARL / HARL

Official implementation of HARL algorithms based on PyTorch.
484 stars 59 forks source link

Can you give some example ? #34

Closed 513617298 closed 7 months ago

513617298 commented 7 months ago

There are very few demo runs available, which are not very user-friendly for beginners. Additionally, running the code exactly as it is written in the documentation may lead to errors.

513617298 commented 7 months ago

When you run it: for seed in $(seq 1 3) do python train.py --algo happo --env smac --exp_name test --seed $seed done ,it will report an error. raceback (most recent call last): File "train.py", line 95, in main() File "train.py", line 90, in main runner.run() File "/home/lbw/HARL-main/harl/runners/on_policy_base_runner.py", line 177, in run self.warmup() File "/home/lbw/HARL-main/harl/runners/on_policy_base_runner.py", line 272, in warmup obs, share_obs, available_actions = self.envs.reset() File "/home/lbw/HARL-main/harl/envs/env_wrappers.py", line 276, in reset results = [remote.recv() for remote in self.remotes] File "/home/lbw/HARL-main/harl/envs/env_wrappers.py", line 276, in results = [remote.recv() for remote in self.remotes] File "/home/lbw/anaconda3/envs/harl/lib/python3.8/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/home/lbw/anaconda3/envs/harl/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes buf = self._recv(4) File "/home/lbw/anaconda3/envs/harl/lib/python3.8/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError

513617298 commented 7 months ago

I hope you can provide a complete tutorial, so that your students can follow it to run the code successfully under a newly set up environment. It is not suitable for beginners to be asked to provide bugs for you to fix the basic code.

Ivan-Zhong commented 7 months ago

Hello.

We provide tuned configs for algorithms on each environment, which can be run directly as reference. For simplicity, you can refer to the experiments on MPE, which are relatively straightforward and lightweight.

To facilitate usage, we explain the installation steps in details, which have been tested on several desktop machines as well as servers. After installation, all the experiments should be able to run without errors. As for the bug you mentioned, we have never encountered it. Maybe you could provide more information so that we can help you with it.