Skip to main content
MahiDev — Learn. Build. Become AI-ready.

Lesson 76

QMIX

Mix per-agent Q values into one team value with a network that stays increasing in each agent's Q. One example is on this page.

Intermediate12 min
QMIX MahiDev

What You Will Learn

  • Idea
  • Example
  • When to use it

Idea

QMIX learns a Q for each agent and a mixing network for the team. The mixer uses non-negative weights, so raising one agent's Q never lowers the team Q. The team can be trained from a single shared reward, and each agent can still act from its own Q at execution time.

Example

python
q1, q2 = 1.0, 0.5
w1, w2 = 0.4, 0.6
mixed = w1 * q1 + w2 * q2
print(f"mixed Q: {mixed:.2f}")

Output:

text
mixed Q: 0.70

When to use it

  • Use it for cooperative agents that share one team reward and take discrete actions.
  • Positive mix weights keep the argmax consistent between the team and the agents.
  • The mixer may see the global state during training. Agents do not need it to act.

Loading playground…