Welcome to pymdp's documentation!

pymdp is a Python package for simulating Active Inference agents in discrete-state Markov Decision Process environments. For background and motivation, see the companion JOSS paper: pymdp: A Python library for active inference in discrete state spaces.

This documentation focuses on the JAX backend (the default backend since the 1.0.0 release), which supports:

  • accelerator-friendly execution (CPU/GPU/TPU) and JIT compilation
  • differentiable workflows via autodiff
  • scalable batched simulations and model-fitting workflows (for example, with NumPyro or pybefit)

Cue-chaining demo

Start here

API reference

Legacy docs

Legacy/NumPy material is preserved under an archive path: