Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred after the environment name was changed to simple_adversary #22

Open
restlessfish opened this issue Apr 11, 2024 · 0 comments

Comments

@restlessfish
Copy link

I change the env_name to simple_adversary, then I got the problem below:
Traceback (most recent call last):
File "D:/WorkSpace/PycharmWorkSpaces/MARL-code-pytorch-main/MARL-code-pytorch-main/1.MAPPO_MPE/MAPPO_MPE_main.py", line 149, in
runner.run()
File "D:/WorkSpace/PycharmWorkSpaces/MARL-code-pytorch-main/MARL-code-pytorch-main/1.MAPPO_MPE/MAPPO_MPE_main.py", line 54, in run
self.evaluate_policy() # Evaluate the policy every 'evaluate_freq' steps
File "D:/WorkSpace/PycharmWorkSpaces/MARL-code-pytorch-main/MARL-code-pytorch-main/1.MAPPO_MPE/MAPPO_MPE_main.py", line 70, in evaluate_policy
episode_reward, _ = self.run_episode_mpe(evaluate=True)
File "D:/WorkSpace/PycharmWorkSpaces/MARL-code-pytorch-main/MARL-code-pytorch-main/1.MAPPO_MPE/MAPPO_MPE_main.py", line 90, in run_episode_mpe
a_n, a_logprob_n = self.agent_n.choose_action(obs_n, evaluate=evaluate) # Get actions and the corresponding log probabilities of N agents
File "D:\WorkSpace\PycharmWorkSpaces\MARL-code-pytorch-main\MARL-code-pytorch-main\1.MAPPO_MPE\mappo_mpe.py", line 163, in choose_action
obs_n = torch.tensor(obs_n, dtype=torch.float32) # obs_n.shape=(N,obs_dim)
ValueError: expected sequence of length 8 at dim 1 (got 10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant