# Markov decision process

*34,203*pages on

this wiki

Assessment |
Biopsychology |
Comparative |
Cognitive |
Developmental |
Language |
Individual differences |
Personality |
Philosophy |
Social |

Methods |
Statistics |
Clinical |
Educational |
Industrial |
Professional items |
World psychology |

**Statistics:**
Scientific method ·
Research methods ·
Experimental design ·
Undergraduate statistics courses ·
Statistical tests ·
Game theory ·
Decision theory

**Markov decision processes (MDPs)** provide a mathematical framework for modeling decision-making in situations where outcomes are partly random and partly under the control of the decision maker. MDPs are useful for studying a wide range of optimization problems solved via dynamic programming and reinforcement learning. MDPs were known at least as early as in the fifties (cf. Bellman 1957). Much research in the area was spawned due to the book by Ronald A. Howard in 1960. Today they are used in a variety of areas, including robotics, automated control, economics and in manufacturing.

More precisely a Markov Decision Process is a discrete time stochastic control process characterized by a set of states; in each state there are several actions from which the decision maker must choose. For a state s and an action a, a state transition function determines the transition probabilities to the next state. The decision maker earns a reward for each state visited. The states of an MDP possess the Markov property. This means that if the current state of the MDP at time is known, transitions to a new state at time are independent of all previous states.

## DefinitionEdit

A Markov Decision Process is a tuple , where

- is the State space,
- is the action space,
- is the probability that action in state at time will lead to state at time ,
- is the immediate reward received in state .

The goal is to maximize some cumulative function of the rewards, typically the discounted sum under a discounting factor (usually just under 1). This would look like:

where is the discount rate and satisfies . The sum is to be maximised.

Markov decision processes are an extension of Markov chains; the difference is the addition of actions (allowing choice) and rewards (giving motivation). If there were only one action, or if the action to take were somehow fixed for each state, a Markov decision process would reduce to a Markov chain.

## SolutionEdit

The solution to a Markov Decision Process can be expressed as a *policy* , which gives the action to take for a given state, regardless of prior history. Note that once a Markov decision process is combined with a policy in this way, this fixes the action for each state and the resulting combination behaves like a Markov chain.

The standard family of algorithms to calculate the policy requires storage for two arrays indexed by state: *value* , which contains real values, and *policy* which contains actions. At the end of the algorithm, will contain the solution and will contain the discounted sum of the rewards to be earned (on average) by following that solution.

The algorithm then has the following two kinds of steps, which are repeated in some order for all the states until no further changes take place.

Their order depends on the variant of the algorithm; one can also do them for all states at once or state by state, and more often to some states than others. As long as no state is permanently excluded from either of the steps, the algorithm will eventually arrive at the correct solution.

### Notable variantsEdit

#### Value iterationEdit

In value iteration (Bellman 1957), the array is not used; instead, the value of is calculated whenever it is needed.

Substituting the calculation of into the calculation of gives the combined step:

#### Policy iterationEdit

In policy iteration (Howard 1960), step one is performed once, and then step two is repeated until it converges. Then step one is again performed once and so on.

Instead of repeating step two to convergence, it may be formulated and solved as a set of linear equations.

This variant has the advantage that there is a definite stopping condition: when the array does not change in the course of applying step 1 to all states, the algorithm is completed.

#### Modified policy iterationEdit

In modified policy iteration (Puterman and Shin 1978), step one is performed once, and then step two is repeated several times. Then step one is again performed once and so on.

#### Prioritized sweepingEdit

In this variant, the steps are preferentially applied to states which are in some way important - whether based on the algorithm (there were large changes in or around those states recently) or based on use (those states are near the starting state, or otherwise of interest to the person or program using the algorithm).

## ExtensionsEdit

### Partial observabilityEdit

*Main article: partially observable Markov decision process*

The solution above assumes that the state is known when action is to be taken; otherwise cannot be calculated. When this assumption is not true, the problem is called a partially observable Markov decision process or POMDP.

### LearningEdit

If the probabilities are unknown, the problem is one of reinforcement learning.

For this purpose it is useful to define a further function, which corresponds to taking the action and then continuing optimally (or according to whatever policy one currently has):

While this function is also unknown, experience during learning is based on pairs (together with the outcome ); that is, "I was in state and I tried doing (and happened)". Thus, one has an array and uses experience to update it directly. This is known as Q-learning.

### Minor extensionsEdit

These extensions are minor in that they complicate the notation, but make no real difference to the problem or its solution.

- The reward may be a function of the action as well as the state, .
- The reward may be a function of the resulting state as well as the action and state, .
- The action space may be different at each state, so that it is rather than

## Alternative notationsEdit

The terminology and notation for MDPs are not entirely settled; there are two main streams — one using action, reward, value and , while the other uses control, cost, cost-to-go and . In addition, the notation for the transition probability varies.

in this article | alternative | comment |
---|---|---|

action | control | |

reward | cost | is the negative of |

value | cost-to-go | is the negative of |

policy | policy | |

discounting factor | discounting factor | |

transition probability | transition probability |

In addition, transition probability is sometimes written , or, rarely,

## ReferencesEdit

- R. Bellman.
*A Markovian Decision Process*. Journal of Mathematics and Mechanics 6, 1957. - R. E. Bellman.
*Dynamic Programming*. Princeton University Press, Princeton, NJ. - Ronald A. Howard
*Dynamic Programming and Markov Processes*, The M.I.T. Press, 1960. - M. L. Puterman.
*Markov Decision Processes*. Wiley, 1994. - H.C. Tijms.
*A First Course in Stochastic Models*. Wiley, 2003. - Sutton, R.S.
*On the significance of Markov decision processes*. In W. Gerstner, A. Germond, M. Hasler, and J.-D. Nicoud (Eds.) Artificial Neural Networks -- ICANN'97, pp. 273-282. Springer. - Sutton, R. S. and Barto A. G.
*Reinforcement Learning: An Introduction*. The MIT Press, Cambridge, MA, 1998

## See alsoEdit

- Partially observable Markov decision process
- Bellman equation for applications to economics.

## External linksEdit

- MDP Toolbox for Matlab - An excellent tutorial and Matlab toolbox for working with MDPs.
- Reinforcement Learning An Introduction by Richard S. Sutton and Andrew G. Barto
- SPUDD A structured MDP solver for download by Jesse Hoey

- fr:Processus de décision markovien
- de:Markowkette

This page uses Creative Commons Licensed content from Wikipedia (view authors). |