MADDPG in PyTorch
A PyTorch reference implementation of Multi-Agent Deep Deterministic Policy Gradients (MADDPG).
- Stars
- ★ 379
- Last updated
- 5y ago
- Primary language
- Python
- FA score
- 17/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changes
- Cost
- Free, no paid service needed
- Setup effort
- High · needs real infrastructure
- You'll need
- 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
- Source review
- 17/100 · Major gaps 6 safety controls not found
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.
- Researchers reproducing a MADDPG baseline for comparison against their own experiments.
- Students following the linked video tutorial to learn how multi-agent actor-critic is written in PyTorch.
- Developers setting up quick cooperative or competitive multi-agent experiments on MAPE particle environments.
- Researchers modifying the critic input structure to try algorithm variants.
- 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.0How 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>.pyThe 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?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
Has marginal value as a teaching implementation, but output usability and cost-benefit lack supporting evidence, so a conservative 1.
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.
- 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.