The stage presence is a little stilted. The tone of voice befits a dry delivery, but there are hints of Henny Youngman. “I once dated a MacBook,” the joke runs. “It didn’t work, because she was all ‘I’ this and ‘I’ that.” The comedian keeps a straight face by design, because he is a robot. “O.K., I will now try to relate to you with more human jokes,” RoboThespian offers. “I understand you like it when humans complain. You know what really pushes my buttons? That guy that’s in control of me.” Watching the performance on YouTube later, Iliza Shlesinger, a winner of the TV show “Last Comic Standing,” thought, Threatened? No.

The audience was understanding, even brightened by his stiffness. People laughed, if not at wit or silliness then at least at the cheap gag of a robot seeking affirmation in such a human way: telling jokes to strangers. Between a microphone and a brick wall, novelty may be no less effective than toilet humor.

“The whole idea of automating something as particular and subjective as comedy—it totally goes against every notion of what comedy and creativity is about. But that doesn’t mean it’s not funny,” said Will Jackson, whose U.K.-based company, Engineered Arts Limited, created RoboThespian. Jackson used to work in advertising, but a few years ago he began dabbling in robots. “It’s kind of acting by proxy,” he said. “Maybe if I had the nerve I’d get up and do it myself, but it’s easier to have a robot get up and do it for me.” Development on RoboThespian began in 2005. He has screens for eyes, because, as Jackson explained, “eyes are the windows to the soul.”

RoboThespian was supposed to be a dramatic actor. He has accrued a few credits over the years: he starred alongside a human in a staging of “Servant of Two Masters” at the University of North Carolina in Chapel Hill, and with a cast of two other RoboThespians in an original production called “Theatre of Robots.”

His latest turn, as a standup, is an attempt to make him more human, Jackson said, by “building people’s empathy with the machine. People anthropomorphize machines. We’re interested in pushing the boundaries of that, and seeing how much people buy a lump of metal as a personality.” They started the project last year, when a graduate student named Kleomenis Katevas arrived from Queen Mary University of London. Katevas’s doctoral thesis addresses the mathematical attributes of comedy; after RoboThespian’s standup début, he said, “It’s clear already that even relatively small changes in the timing of delivery make a big difference to audience response.”

Katevas developed an algorithm for comic timing: tell a joke, wait two seconds to measure audio feedback from the crowd, and pause for laughter, holding for no more than five seconds. If the audience responds positively, encourage them; if not, RoboThespian might say “Hmm” or “Take your time.”

RoboThespian was also embedded with software called SHORE (Sophisticated High-speed Object Recognition Engine) to detect faces in the audience and identify their expressions. The program lets him know whether the crowd is enjoying themselves. If not, RoboThespian could look at them, point, and tell a joke at their expense. “If the whole show is bombing and everything is going terribly wrong,” Jackson said. “Should the robot change course, or should it just keep going like a dumb machine?”

Comedy is an art of precision. “The difference between an amateur and a professional is that it feels off the cuff, but it’s something I’ve worked very hard on,” the comedian Rob Delaney, the author of an eponymous new book, told me. “I have a narrative arc that I want to adhere to. Sure, I’ll make changes, but it’ll be eighty-per-cent similar.” He added, “I do a thing that a robot could do, which is: I listen to the room. That, I think, could be learned.”

One afternoon in Los Angeles, a roboticist from Carnegie Mellon University named Heather Knight sat down for lunch with Delaney. She asked, “What does it mean to work hard on something?”

“It means to record your sets as you do them, so you can play them back for yourself and then learn from them. It means to be integrating and rethinking,” he said. Delaney holds onto audio recordings of all of his shows, for postgame analysis.

“How do you learn from the recording?”

“You hear the audience, you hear what their response was. Do you laugh at yourself? Are you like, Hey, that’s clever, ’cause you didn’t quite catch it or store it to your own hard drive as you were doing it.”

This is how Knight programmed her comedy bot, Data. “He’s almost more of a listener than a performer,” she told me. “Everything about his performance is based on what the audience reaction is.” When Knight was starting to refine Data’s design, in 2010, she had a database of around two hundred jokes, each classified according to their topic, length, interactivity, movement-level, appropriateness, and hilarity. Data’s audience holds up red or green response cards and, at the same time, he monitors the volume of their applause and laughter. “It would use that to look at what the audience was most interested in,” Knight explained. Data selects his next joke based on this feedback, in order to maximize the so-called enjoyment score. This is comedy for the age of Amazon auto-recommendations: you laughed at the one about the Jewish duck, you may enjoy this joke about the drunk turkey.

Now, with the help of Delaney and other comedians, Knight has expanded Data’s stock of material. Data has since gone on tour, if not quite adopting the road-comic lifestyle. “I try to limit performances to once a month, because I’m a Ph.D. student,” said Knight. Data hosted the Robot Film Festival with the comedian Reggie Watts—Data’s line: “I think I’m going to break up with my programmer, because I’ve caught her watching films of other robots”—and he has appeared on “The Steve Harvey Show.” He’s also attracted a sidekick, Ginger. They were married by a drag queen in San Francisco, vowing that they would always share their passwords.

Competitors have also hit the scene. A robot called PaPeRo performed with the Japanese comedian Zenjiro. Inventors from Konan University developed a comic robot duo, Gonta and Aichan, who have performed for students; Aichan (one metre tall) searches the internet for script fodder, while Gonta (fifty-five centimetres tall) mispronounces the words, endlessly playing the screw-up. In November, the British TV personality Jason Bradbury took the stage at a comedy club with a mechanized doppelganger, RoboJase. RoboJase’s set is being broadcast on Bradbury’s program “The Gadget Show” this month.

RoboThespian, with test performances under his belt and recently, an invitation to appear on television, is in need of new material. Jackson is toying with the idea of creating a back story. “A comedian will often tell stories about their childhood or personal relationships. But the robot doesn’t have that,” he said. “Should a comic routine be kind of comic-tragic, where it starts to try to talk about family or relationships, but it realizes it doesn’t have any of that? Was its mother a tin can? And its childhood in a junkyard?”