Wilson began his experiment by training rats to run through mazes. While a rat was running through one of these labyrinths, Wilson measured clusters of neurons in the hippocampus with multiple electrodes surgically implanted in its brain. As he'd hypothesized, Wilson found that each maze produced its own pattern of neural firing. To figure out how dreams relate to experience, Wilson recorded input from these same electrodes while the rats were sleeping. The results were astonishing. Of the 45 rat dreams recorded by Wilson, 20 contained an exact replica of the maze they had run earlier that day. The REM sleep was recapitulating experience, allowing the animals to consolidate memory and learn new things. Wilson's lab has since extended these results, demonstrating that "temporally structured replay" occurs in both the hippocampus and visual cortex.