When setting out to make her new documentary, “Swiped: Hooking Up in the Digital Age,” journalist Nancy Jo Sales says she wanted to humanize the people who used dating apps. She wanted to show that they are real people and not just pictures to be swiped left or right on.

She found out that they’re also participants in a decades-old psychological experiment. In the documentary, Tinder CSO Jonathan Badeen — a.k.a. the guy who invented swiping — tells Sales that he was partly inspired by college psychology classes in which he had studied the work of B.F. Skinner.

In one of Skinner’s experiments, he conditioned hungry pigeons to believe that food, which was actually being delivered at random times, was prompted by random pecking. So, the pigeons began pecking more often in certain ways, in the hopes of getting more food.

“That’s the whole swiping mechanism,” Sales said. “You swipe, you might get a match, you might not. And then you’re just like excited to play the game … Skinner essentially turned pigeons into gamblers.”