Figure 1: The architecture of the computational model manifesting the Integrative Theory. Visual stimulus trains (a) a circadian clock where brightness indicates “day” and darkness indicates “night” and (b) a simple model of arousal where a greater change of stimulus over time results in greater arousal. Visual stimulus is broken into components (segmentation) and organized into perceptual groups (clustering) that are averaged to create a fixed number of perceptual abstractions (percepts). The “mental” state of the system is a visual image (rendering) composed from percepts according to their activation (via prediction or stimulus). A predictor learns from the sequence of percepts recognized in stimulus. During waking, the activation of predicted percepts is suppressed such that only precepts corresponding to stimulus are activated. During dreaming and mind wandering this suppression is loosened creating a feedback loop where the predictor predicts itself, rather than predicting current stimulus. This creates a chain of predictions that construct flows of dreaming and mind wandering “experience.” The shift of state between waking and dreaming is determined by the circadian clock that disconnects visual stimulus when it is dark.