Nehrer Samuel William, Ehrenreich Laursen Jonathan, Heins Conor, Friston Karl, Mathys Christoph, Thestrup Waade Peter
School of Culture and Communication, Aarhus University, 8000 Aarhus, Denmark.
Department of Collective Behaviour, Max Planck Institute of Animal Behavior, D-78457 Konstanz, Germany.
Entropy (Basel). 2025 Jan 12;27(1):62. doi: 10.3390/e27010062.
We introduce a new software package for the Julia programming language, the library ActiveInference.jl. To make active inference agents with Partially Observable Markov Decision Process (POMDP) generative models available to the growing research community using Julia, we re-implemented the pymdp library for Python. ActiveInference.jl is compatible with cutting-edge Julia libraries designed for cognitive and behavioural modelling, as it is used in computational psychiatry, cognitive science and neuroscience. This means that POMDP active inference models can now be easily fit to empirically observed behaviour using sampling, as well as variational methods. In this article, we show how ActiveInference.jl makes building POMDP active inference models straightforward, and how it enables researchers to use them for simulation, as well as fitting them to data or performing a model comparison.
我们为Julia编程语言引入了一个新的软件包——ActiveInference.jl库。为了让使用Julia的不断壮大的研究群体能够使用具有部分可观测马尔可夫决策过程(POMDP)生成模型的主动推理智能体,我们重新实现了用于Python的pymdp库。ActiveInference.jl与为认知和行为建模设计的前沿Julia库兼容,因为它在计算精神病学、认知科学和神经科学中都有应用。这意味着现在可以使用采样以及变分方法,轻松地将POMDP主动推理模型拟合到经验观察到的行为。在本文中,我们展示了ActiveInference.jl如何使构建POMDP主动推理模型变得简单直接,以及它如何使研究人员能够将其用于模拟,以及将其拟合到数据或进行模型比较。