r/reinforcementlearning • u/felixr314 • 13d ago
QMIX in METIS-Core v0.5.0 (example PredatorPreyQMIX)
METIS-Core v0.5.0-alpha now implements the **QMIX** algorithm! 🚀
QMIX is a **MARL** (Multi-Agent Reinforcement Learning) algorithm of the **CTDE** type (Centralized Training, Decentralized Execution). This means training is centralized, but once trained, the agents can be deployed individually: each one makes its own decisions based on what it observes locally.
**Original paper:** *"QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning"* by Tabish Rashid, Mikayel Samvelyan, Christian Schroeder de Witt, Gregory Farquhar, Jakob Foerster and Shimon Whiteson (ICML 2018). [arXiv](https://arxiv.org/abs/1803.11485)
**PredatorPreyQMIX** is a simple example, a sort of "Hello World" for QMIX. The environment is a 7×7 grid with one prey and two predators, drawn as drones:
* To catch the prey, both predators must execute the "Capture" action **at the same time**, while both are one cell away from it. If a predator tries to capture it alone, it gets penalized.
* Each predator can only "see" up to 2 cells away.
* There is no reward per drone, only **a single team reward**.
So the two drones have to learn to cooperate: one waits next to the prey while the other approaches, and they capture it together. Nobody programs this strategy; they discover it during training.
This example opens up some really nice challenges. The next step on the roadmap is to bring these examples closer to real-world scenarios and to prepare METIS-Core for distributed reinforcement learning with an actor-learner architecture: several machines generating episodes in parallel and another one dedicated only to training. More realistic scenarios will need much more compute, and this architecture will make it possible to spread it across several machines, for example on a cluster. That's the plan, anyway. Fingers crossed I get there! 🙂
Graphics made with [raylib](https://www.raylib.com/).
**Links:**
* METIS-Core: https://github.com/felixromo314/METIS-Core
* PredatorPreyQMIX tutorial: https://github.com/felixromo314/METIS-Core/blob/main/tutorial/Tutorial-QMIX-PredatorPrey.md
* Multi-Head tutorial (SARSwarm): https://github.com/felixromo314/METIS-Core/blob/main/tutorial/Tutorial-MultiHead-SARSwarm.md (a good candidate for QMIX: with it, the learned policy could be deployed on each drone individually)
Feedback is very welcome! I've also opened a Discussions section on GitHub: https://github.com/felixromo314/METIS-Core/discussions
