Scientists have known for more than a century that a single-celled organism with no nerve cells—much less a brain—can behave in ways that resemble learning. But those observations only went so far. How the organism did that was a mystery.