 As part of a project to understand how the brain learns, biologists have written memories into the cells of a fruit fly&#039;s brain, making it think it had a terrible experience. The memory trace was written by shining light into the fly&#039;s brain and activating a special class of cells involved in learning how to avoid an electric shock.