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

Discrete action #3

Open
Bruce-Lan-ZY opened this issue Sep 9, 2022 · 5 comments
Open

Discrete action #3

Bruce-Lan-ZY opened this issue Sep 9, 2022 · 5 comments

Comments

@Bruce-Lan-ZY
Copy link

(MARL) root@5e4fd369caa6:~/code/MARL-code-pytorch/4.MADDPG_MATD3_MPE# python3 MADDPG_MATD3_main.py --algorithm MADDPG
Traceback (most recent call last):
File "MADDPG_MATD3_main.py", line 142, in
runner = Runner(args, env_name=env_names[env_index], number=1, seed=0)
File "MADDPG_MATD3_main.py", line 19, in init
self.env = make_env(env_name, discrete=False) # Continuous action space
TypeError: make_env() got an unexpected keyword argument 'discrete'

Then, I try to remove this argument'discrete' ------self.env = make_env(env_name). There appear this problem:

(MARL) root@5e4fd369caa6:~/code/MARL-code-pytorch/4.MADDPG_MATD3_MPE# python3 MADDPG_MATD3_main.py --algorithm MADDPG
Traceback (most recent call last):
File "MADDPG_MATD3_main.py", line 142, in
runner = Runner(args, env_name=env_names[env_index], number=1, seed=0)
File "MADDPG_MATD3_main.py", line 23, in init
self.args.action_dim_n = [self.env.action_space[i].shape[0] for i in range(self.args.N)] # actions dimensions of N agents
File "MADDPG_MATD3_main.py", line 23, in
self.args.action_dim_n = [self.env.action_space[i].shape[0] for i in range(self.args.N)] # actions dimensions of N agents
IndexError: tuple index out of range

Could anyone help me?

@air-tea
Copy link

air-tea commented Oct 13, 2022

I also met this problem, have you solved it?

@Bruce-Lan-ZY
Copy link
Author

No, I used other repos.

@wydxry
Copy link

wydxry commented Oct 27, 2022

You should add multiagent and change make_env.py about discrete

@air-tea
Copy link

air-tea commented Oct 27, 2022

Got it, Thanks for your answering~

@weiyu0258
Copy link

I remove the argument 'discrete',and then change the multiagent-particle-envs-master\multiagent\environment\self.discrete_action_input = True, the code run successfully

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

4 participants