starry-sky6688 / MADDPG

Pytorch implementation of the MARL algorithm, MADDPG, which correspondings to the paper "Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments".
516 stars 80 forks source link

请问为什么在reference环境无法使用 #6

Closed a2821952 closed 3 years ago

a2821952 commented 3 years ago

非常感谢你的代码,这里有一个小问题,这个代码我在其他环境可以运行,但是在simple_reference还有simple_world_comm环境中报错,提示是‘multidiscrete’没有 n这个属性,请问您有解决的方法嘛?

starry-sky6688 commented 3 years ago

截一下错误的图片?我看看在哪一行出错了

a2821952 commented 3 years ago

image 运行simple_tag是没问题的,可能是类型不同,请问您有什么办法吗?

starry-sky6688 commented 3 years ago

应该是版本的问题,你可以看看issue 1,也是类似的问题

a2821952 commented 3 years ago

你好,我阅读了那个问题, Hi, when I first run the python main.py --scenario-name=simple_tag --evaluate-episodes=10, I met the problem as : action_shape.append(content.n) AttributeError: 'Box' object has no attribute 'n' 和他不同的是simple_tag 这个任务我是可以运行的,换成了simple_world_comm任务后变无法运行,我也更新了MPE的版本,还是会遇到我刚发的问题,请问在你的电脑上可以训练simple_world_comm任务吗?

starry-sky6688 commented 3 years ago

我的也不行,我看了一下,你可以修改一下代码,现在env.action_space里的第一个是一个multidiscrete类,你取它的num_discrete_space,后面5个都还是n,应该就可以了

image

a2821952 commented 3 years ago

您好,感谢您的耐心回答,我尝试了您说的方法,还是不行,因为后面执行action的时候维度会报错,请问您还有什么建议吗?

starry-sky6688 commented 3 years ago

我也不知道该怎么办了~要不你试试去MPE的github下面问问simple_world_comm环境怎么用,我也没在这个环境上跑过

sdabj commented 1 year ago

请问这个问题您解决了吗