I read about that in introduction to Psychology; that, and the chapter on caged rats who'd give themselves electric shocks for something to do And the one on the pigeons, trained to peck a button that made a grain of corn appear. Three groups of them: the first got one grain per peck, the second one grain every other peck, the third was random. When the man in charge cut off the grain, the first group gave up quite soon, the second group a little later. The third group never gave up. They'd peck themselves to death, rather than quit. Who knew what worked?