Prsa, M. et al. Neuron 93, 929–939 (2017).

Optogenetics uses light to control the activity of neurons, but reading out neural activity and using the obtained information to provide rapid feedback for continued optogenetic control is challenging. Prsa et al. imaged GCaMP6f-labeled neurons in the mouse motor cortex with two-photon microscopy and transformed the information from this activity sensor, in real time, into optogenetic stimulation pulses in the corresponding somatosensory cortex. When the rate of stimulation exceeded a certain threshold, a water reward was delivered to the mice. The researchers show that mice learned to control the activity of single neurons or combinations of neurons in the motor cortex to increase their reward. They suggest that their technology could pave the way for more efficient brain–machine interfaces, and also could help scientists dissect behavioral circuits.