The scientists inserted two genes into neurons in the visual cortices of mice. One gene made the neurons sensitive to the red laser light. The other caused neurons to produce a green flash when turned on, letting the researchers track their activity in response to stimuli.

The engineered mice were shown pictures on a monitor. Some were of vertical stripes, others of horizontal stripes. Sometimes the stripes were bright, sometimes fuzzy. The researchers trained the mice to lick a pipe only if they saw vertical stripes. If they performed the test correctly, they were rewarded with a drop of water.

As the mice were shown images, thousands of neurons in their visual cortices flashed green. One population of cells switched on in response to vertical stripes; other neurons flipped on when the mice were shown horizontal ones.

The researchers picked a few dozen neurons from each group to target. They again showed the stripes to the mice, and this time they also fired light at the neurons from the corresponding group. Switching on the correct neurons helped the mice do better at recognizing stripes.

Then the researchers turned off the monitor, leaving the mice in darkness. Now the scientists switched on the neurons for horizontal and vertical stripes, without anything for the rodents to see. The mice responded by licking the pipe, as if they were actually seeing vertical stripes.