(a) Visualization of the contribution of replay in the hippocampal complex (HC) and the neocortex during different stages. Specifically, during waking hours, experiences are encoded in the HC and neocortex. While asleep, humans cycle between NREM and REM sleep stages, with NREM stages getting shorter and REM stages getting longer as the night progresses. In NREM, recent experiences are consolidated. In REM, internal experiences are organized. We also illustrate spike traces of neocortical outputs during (b) awake activity, (c) faster replay (NREM), (d) partial replay (NREM and REM), and (e) reverse replay (reinforcement learning). Note that activity during REM has been observed to be similar to that during waking experiences.