# Solves discounted MDP using linear programming algorithm

### Description

Solves discounted MDP with linear programming

### Usage

1 | ```
mdp_LP(P, R, discount)
``` |

### Arguments

`P` |
transition probability array. P is a 3 dimensions array [S,S,A]. Sparse matrix are not supported. |

`R` |
reward array. R can be a 3 dimensions array [S,S,A] or a list [[A]], each element containing a sparse matrix [S,S] or a 2 dimensional matrix [S,A] possibly sparse. |

`discount` |
discount factor. discount is a real which belongs to ]0; 1[ |

### Details

mdp_LP applies linear programming to solve discounted MDP for non-sparse matrix only.

### Value

`V` |
optimal value fonction. V is a S length vector |

`policy ` |
optimal policy. policy is a S length vector. Each element is an integer corresponding to an action which maximizes the value function |

`cpu_time` |
CPU time used to run the program |

### Examples

1 2 3 4 5 6 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.