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. We express our thoughts on how to integrate this optimization method with evolutionary algorithms to accelerate the development of specialized artificial neural networks that define the proprioceptive configuration of certain robotic elements of the swarm. We consider how free energy principle can contribute to the homeostasis of the swarm system, ensuring its ability to stay within sensory limits throughout its active life. We demonstrate how complex distributed cognitive systems can be created as a hierarchical modular system consisting of specialized micro-intelligent agents connected by information exchange channels. We also consider the coevolution of various robotic elements of the swarm, which may lead to the development of proprioception and a deep understanding of environmental properties. Finally, we briefly describe how this system can be implemented, and our achievements in this field.