Experiment allows scientists to watch fish think.