Simulation of the Prisoner’s Dilemma Using a Cognitive Model Based on the Free Energy Principle
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
This paper develops a cognitively grounded agent-based model of trust and cooperation in the iterated Prisoner’s Dilemma. To move beyond the common “black box” treatment of decision-making in simulation research, it operationalizes the Free Energy Principle and active inference as an explicit process of Bayesian belief updating and prediction-error minimization. Agents are implemented with a hierarchical recurrent neural network inspired by predictive coding and trained to jointly forecast both players’ next actions, payoffs, and opponent-type indicators from interaction histories. In an Axelrod-style tournament, the resulting agent is evaluated against canonical strategies (ALLC, ALLD, Random, and Tit-for-Tat) and in dyadic interaction with another independently initialized agent of the same kind. The agent exhibits conditional cooperation with reciprocating opponents, rapid withdrawal under sustained defection, and systematic vulnerabilities under stochastic play. Crucially, trajectories of latent internal states provide a process-level account of how cooperation emerges, stabilizes, and collapses, linking observable behavior to evolving expectations about the social environment. The study demonstrates how cognitive modeling can enrich sociological accounts of trust by making the micro-dynamics of inference empirically inspectable within simulations, and it outlines a transferable framework for extending such models to richer action spaces and institutional settings.