maddpg-pettingzoo-pytorch icon indicating copy to clipboard operation
maddpg-pettingzoo-pytorch copied to clipboard

implementation of MADDPG using PettingZoo and PyTorch

Results 6 maddpg-pettingzoo-pytorch issues
Sort by recently updated
recently updated
newest added

您好,请问要怎么编写DDPG算法作为这个使用MADDPG算法的对比?期待您的回复,谢谢。

- 环境渲染模式env.render(mode=“human”)和env.close()问题. 在新版中,需要设置在simple_spread_v3.parallel_env(max_cycles=ep_len,render_mode="rgb_array")中, - evaluate.py中的env.close()应放在for episode in range(args.episode_num):循环外 不然报错gym 'NoneType' object has no attribute 'fill' - 修复指定cuda设备运行的Bug 希望有机会向开源项目贡献,这将是我贡献的第一个开源项目

在MADDPG.py中Actor 更新是最大化累积期望回报,即 Q 值,然而这里加上了**Actor 的策略动作概率**平方项均值 我们知道在目标函数中加入熵(entropy)项。通过最大化熵(即在loss函数中加入熵的负数)可以使得actor的输出有一定的多样性 是否这里Actor 的策略动作概率平方项该取**负号**去最大化**Actor 的策略动作概率**平方项均值 ```python # MADDPG.py actor_loss = -agent.critic_value(list(obs.values()), list(act.values())).mean() actor_loss_pse = torch.pow(logits, 2).mean() agent.update_actor(actor_loss + 1e-3 * actor_loss_pse) ```

the main code exacute successfully and after that in result 5 folder i got model.pt but when i run evaluate on this file i get this error i will be...

![training result of maddpg solve simple_tag_v2](https://github.com/Git-123-Hub/maddpg-pettingzoo-pytorch/assets/62536298/859b8f23-071d-48e7-aa74-46bae3bce123)

I am wondering why the simple_spread is not working or at least the training results seem not correct for this environment?