Scientists demonstrate reinforcement learning on photonic chips that compute using optical spikes instead of electronic signals.