MADDPG in PyTorch

A PyTorch reference implementation of Multi-Agent Deep Deterministic Policy Gradients (MADDPG).

Stars
★ 379
Last updated
5y ago
Primary language
Python

At a glance

How it runs
Library / SDK
Works with
Portable with changes
Cost
Free, no paid service needed
Setup effort
High · needs real infrastructure
You'll need
Python virtual environment for MAPEPyTorch 1.4.0Multi Agent Particle Environment (MAPE)make_env function from MAPEShell / CLINetwork accessLocal filesystem
Typical use
Researchers reproducing a MADDPG baseline for comparison against their own experiments.
Not a fit if
  • Teams that want a turnkey setup without assembling the MAPE environment
  • Projects pinned to the latest PyTorch, as the code notes an in-place operation issue in 1.8
  • Teams looking for a production-grade multi-agent training platform

What does this agent do, and when should you use it?

This repository is a PyTorch implementation of the MADDPG algorithm from the paper 'Multi Agent Actor Critic for Mixed Cooperative-Competitive Environments'. It is not a packaged product but training code that must be paired with OpenAI's Multi Agent Particle Environment (MAPE): the main file imports the make_env function from that package, so the README suggests cloning this repo into the same directory as MAPE. The README asks for a virtual environment holding MAPE's somewhat outdated dependencies and recommends PyTorch 1.4.0, noting that 1.8 appears to break an in-place operation used in the critic loss. A companion video tutorial is linked. It best serves people reading or modifying a MADDPG implementation for study and research rather than teams needing a deployable system.

The code implements MADDPG's centralized-training, decentralized-execution scheme: each agent has actor and critic networks, and the critic consumes observations and actions from all agents when computing its loss. It instantiates a multi-agent particle environment through make_env imported from MAPE, interacts with it to collect experience, computes the critic loss, and updates the policy networks. The output is trained policy networks and their behavior in cooperative or competitive multi-agent scenarios; users drive this by running or editing the main training script. There is no packaged install, CLI, or hosted service.

  1. Researchers reproducing a MADDPG baseline for comparison against their own experiments.
  2. Students following the linked video tutorial to learn how multi-agent actor-critic is written in PyTorch.
  3. Developers setting up quick cooperative or competitive multi-agent experiments on MAPE particle environments.
  4. Researchers modifying the critic input structure to try algorithm variants.
  5. Instructors who want a readable MADDPG code sample for course material.

How do you install or deploy this agent?

The README gives no pip install or packaging step; it describes manual environment setup: install MAPE in a virtual environment with its older dependencies, then clone this repo alongside MAPE because the main file imports make_env from it.

git clone https://github.com/openai/multiagent-particle-envs
python -m venv mape-env
source mape-env/bin/activate
# Install MAPE dependencies (they are outdated; follow the MAPE repo instructions)
pip install torch==1.4.0

How do you use this agent?

After cloning this repository next to MAPE, activate the virtual environment prepared for MAPE and run the main training script, which builds the particle environment via make_env and starts MADDPG training.

git clone https://github.com/philtabor/Multi-Agent-Deep-Deterministic-Policy-Gradients
source mape-env/bin/activate
python <main_training_file>.py

The README does not name the main file or its tunable parameters; check the repository source for those.

What are this agent's strengths and limitations?

Pros
  • Maps directly to the MADDPG paper, making it a readable implementation of centralized training and decentralized execution.
  • Built on PyTorch, so researchers familiar with the framework can modify networks and losses easily.
  • The README names a concrete version constraint (PyTorch 1.8 in-place operation issue), saving debugging time.
  • Links a companion video tutorial for guided learning.
Limitations
  • Depends on the external MAPE repo and requires placing both repositories in the same directory, making setup fiddly.
  • The recommended PyTorch 1.4.0 is significantly outdated, so newer environments may need version rollback or code fixes.
  • No pip package, CLI, or tests are provided; the main training file and parameters must be read from source.
  • The license is unspecified, so authorization should be confirmed before commercial or redistributed use.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
MADDPG in PyTorch This agent 17 · Major gaps Library / SDKFree ★ 379 5y ago Python —
AgileRL 71 · Some gaps Library / SDKFreemium ★ 959 today Python —
MARO Resource Optimization Platform 44 · Major gaps Library / SDKFree ★ 929 2y ago Python —
Mava 41 · Major gaps CLIFree ★ 938 1mo ago Python —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
17/ 100 5-point scale 0.9 / 5
Trust 1/29
Reliability 3/14
Adaptability 4/18
Convention 3/18
Effectiveness 4/13
Verifiability 2/8
Why each dimension lost points
Trust1 / 29 · 0.2/5

Only a README is present; no evidence of least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, or rollback. Source attribution is thin: the README cites the arXiv paper and the MAPE repository, earning 1.

Reliability3 / 14 · 1.1/5

The README is self-consistent with the cited paper, but there are no failure messages or error-handling notes. Dependency availability is only a textual warning that MAPE is outdated and PyTorch 1.4.0 is recommended, which is a hint rather than a guarantee, so 1.

Adaptability4 / 18 · 1.1/5

Targets a single audience of MADDPG learners; boundaries are only implied by the instruction to clone next to MAPE. No trigger precision or environment-fit detail, so low scores.

Convention3 / 18 · 0.8/5

Information architecture is a single README paragraph; install notes are informal advice; no naming/version record, no FAQ, no license, no changelog, no maintenance responsibility. Only known limitations (PyTorch version issue) are mentioned.

Effectiveness4 / 13 · 1.5/5

Has marginal value as a teaching implementation, but output usability and cost-benefit lack supporting evidence, so a conservative 1.

Verifiability2 / 8 · 1.3/5

The paper link is traceable, but there is no cross-source corroboration and fact/inference separation rests only on README self-description; overall evidence is thin.

Risks and how to mitigate them
  • Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: data-flow disclosureWatch which external services it contacts (proxy or firewall logs) and keep sensitive data out until you know where it goes.
  • Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
  • Not found in source: disclosed external effectsEstablish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • The repository contains only a README; no code, tests, or license are available to verify implementation quality or compliance.
  • The MAPE dependency is outdated and the README recommends pinning PyTorch 1.4.0, posing environment compatibility risk.
  • Publisher identity is unverified and must not be used to infer reliability or safety.
Evidence confidence: Low Reviewed Oct 18, 2026 Reviewed revision a3c294aa6834
Review evidence README.md
See the full review method →

FAQ

Can I run it with the latest PyTorch?
The README recommends PyTorch 1.4.0 and says 1.8 appears to have an issue with an in-place operation used in the critic loss; newer versions may require code changes.
Is MAPE required?
Yes. The main file relies on the make_env function from the MAPE package, and the README suggests cloning this repo into the same directory as MAPE.
Is this a deployable multi-agent system?
No. It is training code only, with no packaged install, server, or command-line interface; you run and adapt the training script yourself.
What license applies?
The license is listed as unknown, so confirm the terms with the repository before use or redistribution.
View on GitHub ↗ Install ↓

Related agents