TL;DR
A Markov decision process describes one agent that picks actions in a world whose next state depends only on the current state and action. A Markov game keeps that structure but adds several agents. Each agent picks its own action, the world moves to a next state based on all the actions together, and each agent receives its own reward. Because every agent is also learning or playing a strategy, the game asks what each agent should do given what the others do, which is the question a Nash equilibrium answers.
Builds on: Markov Decision Process, Nash Equilibrium · Leads to: the MADDPG paper, Centralized Training with Decentralized Execution
Where it's used
- Multi-agent reinforcement learning. Teams of learning agents act in shared environments, such as several robots moving objects, or units in a strategy game. The Lowe and colleagues paper (2017) frames its setting as a multi-agent extension of MDPs called partially observable Markov games, and tests it in both competitive and cooperative scenarios, including environments with explicit communication between agents.
- Game-playing with several controlled units. A concurrent paper, cited by the MADDPG paper, applied policy gradient methods with a centralized critic to a StarCraft micromanagement task, where many units are controlled at once.
- Economics. Several firms or bidders act in a market whose state changes over time, and each one's payoff depends on the others' moves. When this repeats over many periods, a stochastic game is the natural model.
How it works
A tiny instance first. There are two agents, Agent 1 and Agent 2. The world has two states, (the start) and . Each agent can take action or action . Use these rules:
- If both agents choose while the world is in , both get reward 1 and the world moves to .
- If any other joint action happens in , both get reward 0 and the world stays in .
- In , whatever the agents do, both get reward 2 and the world stays in .
- The world starts in . Both agents see that state. Check: the starting state is known to both.
- Agent 1 chooses . Agent 2 chooses . This is the joint action . Neither agent knows the other's choice until both are made. Check: the next state depends on both choices together, not on one agent alone.
- The rule for in says both rewards are 0 and the world stays in . Check: Agent 1 chose but gets nothing, because Agent 2 did not match it.
- Both agents now choose , giving . The rule gives each reward 1 and moves the world to . Check: the same agents, the same state, but a different joint action gives a different next state.
- In , any joint action gives both agents reward 2 and keeps the world in . Check: each agent's reward is its own, and they happen to be equal here.
- return from s1 over x steps
The math
A Markov game for agents is a tuple . Here is the set of states; is the set of actions for agent ; is the probability that the next state is given state and the joint action; is agent 's reward; and is the discount factor. Each agent follows a policy , the probability of choosing action in state .
Symbols in words: is "the set of all states"; is the weight on future rewards, so a reward steps ahead counts times as much. An MDP is the case .
Step 2 in symbols
The joint action is the tuple . The transition rule is written with the whole tuple: . The next state depends on jointly, which is why no single agent's choice decides it.
Step 3 and step 4 in symbols
In state the rules say and . For the joint action , and both rewards are 0.
Step 5 in symbols
In , for every joint action and . Agent 's total discounted return is where is the reward at step .
A Markov game is solved by an equilibrium concept. Let be the policies of all agents except . A profile is a Nash equilibrium when, for every , agent 's expected return under with the others fixed is at least as large as under any other policy : Here is the expected return to agent starting from . When this is simply the MDP's optimal policy.
Worked examples
Setup: in , joint action gives rewards and moves to . Joint action gives rewards and stays in .
- Agent 1 plays and Agent 2 plays . Joint action .
- The reward to Agent 1 is 1, and to Agent 2 is 1.
- The next state is .
- Now Agent 2 switches to , giving .
- The reward to Agent 1 is 0, and the next state is .
- Interpretation: Agent 1 gets a reward only when the two choices match in , so its payoff depends on Agent 2's choice.
In both agents keep playing and get reward 2 per step, staying in . The discount is . From , joint action gives reward 1 and moves to .
- The value of satisfies , because the next step is again with reward 2.
- Solve: , so .
- The value of under is , since the reward is 1 now and the world moves to next step.
- Substitute: .
- Interpretation: an agent that reaches is worth 20 from there and 19 from the start.
A team of three robots, each with 5 possible moves, must coordinate in a warehouse whose layout has 10 states.
- Each robot chooses from 5 actions, so a joint action is one choice from each robot.
- The number of joint actions is .
- Each state needs a transition probability for each joint action and each possible next state, so the transition table in one state has rows.
- With 10 states, the full table has rows of transition probabilities.
- Interpretation: the table grows fast with the number of agents, which is why learning methods often avoid writing it down and instead learn from samples.
Try it: a team of four robots, each with 5 actions, in 10 states. How many joint actions are there per state? Answer: .
Common mistakes and tradeoffs
It is tempting to think another agent is just part of the environment, so each agent can use a plain MDP. In fact, the other agents change as they learn, so the environment each agent sees is not stationary, and the MDP assumption fails. This is why multi-agent methods reason about the other agents' policies.
It is tempting to think a Nash equilibrium maximizes the total reward of all agents. In fact each agent maximizes its own return given the others' policies, and the total can be high or low at equilibrium. In a competitive game, one agent's gain can be another's loss; see minimax games for the special zero-sum case.
It is tempting to think that partial observation is just noise on top of the state. In fact, the partially observable version gives each agent a private observation instead of the state, so each agent must act on what it can see. The partially observable case is covered in partially observable MDPs.
Use a Markov game when several agents act at once, their actions change a shared state, and each agent's return depends on the others. Do not use it for one agent (use an MDP) or for a single round of simultaneous choices with no state (use a normal-form game). When all agents share one reward, a single controller over joint actions can be simpler than modeling each agent separately. The main alternative is to treat other agents as part of a non-stationary environment, which is simpler to code but gives weaker guarantees.
History
Lloyd Shapley described stochastic games in 1953. His early results concerned mainly two-player zero-sum games. Michael Littman brought the framework into reinforcement learning in 1994 with the name Markov games, proposing that agents learn in such games as a model of multi-agent learning.
Multi-agent reinforcement learning grew over the next two decades, and the setting became practical as deep networks made it possible to learn policies from raw observations. The MADDPG paper (2017) gave a widely used method for training agents in these games with centralized critics and decentralized policies, and it uses the partially observable Markov game framework that Littman's 1994 setting led to.
Recap
- An MDP has one agent; a Markov game has several, with per-agent rewards.
- The next state depends on the joint action, so no agent controls it alone.
- Each agent maximizes its own discounted return given the others' policies.
- A Nash equilibrium is the solution concept: no agent gains by changing its policy alone.
- Partial observability means agents act on private observations rather than the state.
- The joint action space grows exponentially with the number of agents.
Read next: the MADDPG paper for a method that learns in these games, and centralized training with decentralized execution for the design it uses.
Check yourself
QuestionRecall: how does a Markov game differ from a Markov decision process?Show answer
A Markov game has several agents, each with its own reward and action, and the next state depends on all their actions together. An MDP has one agent whose transition and reward depend only on its own action and the current state.
QuestionComputation: with discount , an agent receives reward 1 at steps 0, 1 and 2 and nothing after. What is its discounted return? Give a number to two decimal places.Show answer
The return is .
QuestionWhy: why is each agent's learning problem not a standard MDP problem when other agents are also learning?Show answer
The other agents change their policies as they learn, so the transition and reward each agent experiences shift over time. An MDP assumes a fixed environment, so the assumption that makes it a standard MDP fails.
QuestionApplied scenario: two delivery drones share a charging station. Their joint choices change how many batteries are free next step. Is this a Markov game, and why?Show answer
Yes. Each drone has its own action and its own reward, and the next state (battery availability) depends on both drones' choices together. Because the outcome depends on the joint action, the situation is a Markov game rather than a single-agent MDP.