see also:

Basics of Active Inference

Active inference posits that the brain continuously generates predictions about incoming sensory data based on a model of the world it has built from past experiences. It then compares these predictions to the actual sensory input. Discrepancies between the predicted and actual input (prediction errors) are used to update the model and guide behavior to minimize these errors. Essentially, the brain is constantly trying to reduce the mismatch between what it expects and what it experiences through perception and action.