In this article, we explore how artificial swarm intelligence evolve through evolutionary algorithms aimed at reducing the system’s sensory surprise. We demonstrate the use of the free energy principle, borrowed from statistical physics, to describe quantitatively the optimization method (reduction of sensory surprise) that can be applied to support continuous learning.