Optimal behaviour is quintessentially belief based.
Behaviour can be described as optimising expected free energy.
Expected free energy entails pragmatic and epistemic value.
Habits are learned by observing one’s own goal directed behaviour.
Habits are then selected online during active inference.