Transplant a implementation of MADDPG to the environment provided by openAI (multiagent-particle-envs).
Transplant a pytorch implementation pytorch-maddpg of MADDPG.
paper : multi-agent deep deterministic policy gradient algorithm.
environment : multiagent-particle-envs. (tested it with the simple tag environment and didn't use communication property c).
-
git clone and there are a number of other requirements which can be found in multiagent-particle-envs/environment.yml file if using anaconda distribution.
-
add directories to PYTHONPATH:
export PYTHONPATH=$(pwd):$(pwd)/multiagent
-
python main.py
Trained 1000 episodes:
Two purple spots are agents, red spots are poison, and green spots are food. It can be seen that before the training, the movement of the agent is random. After 1000 iterations, the agent has the actions of chasing, avoiding and cooperating.
read more: