Skip to content
Anders Reenberg Andersen edited this page Nov 13, 2026 · 45 revisions

Logo


MDPSolver (mdpsolver) is a Python package for large Markov Decision Processes (MDPs) with infinite horizons. This wiki includes details about the documentation of MDPSolver and other information, such as performance tests.

Overview

  • Fast solver: Our C++-based solver is substantially faster than other CPU-based MDP packages available for Python, depending on the problem size and parameters. See the Performance tests section in this wiki.
  • Available on PyPI (for Python 3.10–3.15).
  • Two optimality criteria: Discounted and Average reward.
  • Three optimization algorithms: Value iteration, Policy iteration, and Modified policy iteration.
  • Three value-update methods: Standard, Gauss–Seidel, and Successive over-relaxation.
  • Uses span norm or supremum norm stopping criterion depending on the selected update method.
  • Supports sparse matrices and parallel computing.

How to install

Install directly from PyPI.

pip install mdpsolver

PyPI has ready-built packages for Linux (x86_64), Windows (64-bit) and macOS 15 or newer on Apple Silicon. Elsewhere, e.g. on Intel Macs or Linux on ARM, pip builds MDPSolver from source, which needs a C++ compiler. On macOS, parallel computing needs OpenMP, which Apple's compiler lacks. Install it with brew install libomp, and point the build at it with CMAKE_PREFIX_PATH="$(brew --prefix libomp)" pip install mdpsolver. Without it, MDPSolver runs serially.

Requirements

  • Operating system: Linux, Windows, or macOS.
  • Python 3.10 or newer.

How to cite

Andersen et al., (2025). MDPSolver: An Efficient Solver for Markov Decision Processes. Journal of Open Source Software, 10(109), 7544, https://doi.org/10.21105/joss.07544

BibTeX

@article{Andersen2025,
        doi = {10.21105/joss.07544},
        url = {https://doi.org/10.21105/joss.07544},
        year = {2025}, publisher = {The Open Journal},
        volume = {10},
        number = {109},
        pages = {7544},
        author = {Anders Reenberg Andersen and Jesper Fink Andersen},
        title = {MDPSolver: An Efficient Solver for Markov Decision Processes},
        journal = {Journal of Open Source Software} }

Clone this wiki locally