Last year, David Levy published a book, Love and Sex with Robots, which marked a culmination of years of research about the interactions between humans and computers. His basic idea is that, for humans who cannot establish emotional or sexual connections with other people, they might form them with robots. The topic is ripe for ridicule: On The Colbert Report in January, host Stephen Colbert asked Levy, "Are these people who can't establish relationships with other human beings, are they by any chance people who write about love and sex with robots?" The 62-year-old Levy, though, is quite serious, as he explains to frequent contributor Charles Q. Choi in the Insights story "Not Tonight, Dear, I Have to Reboot," appearing in the March issue of Scientific American. Here is an expanded interview.

How did you first become interested in artificial intelligence (AI)?
Everything happened almost by accident. I learned to play chess by eight—it was my big passion in high school and university. In my last year at university, I came across a thing called a computer. I heard about it, but knew nothing about it. They were incredibly primitive then—they didn't run on transistors, but on vacuum tubes. I got interested in computer programming through programming games. Then I head about a subject called AI, which people in Edinburgh were working on, such as Donald Michie, the head of the department of machine intelligence at the University of Edinburgh, who worked with Alan Turing on breaking German codes. Donald Michie was an amazing guy who was killed just recently in a car crash. He was the founding father of AI in the U.K. and introduced me and others to AI.

So your interest in chess programs led you to computers and, ultimately, artificial intelligence?
Back then, people wrote chess programs to simulate human thought processes. It turned out in time that approach didn't work, that chess programs would use completely different techniques that are not humanlike at all. But I was still left interested in simulating human thought processes and emotions and personality. I thought, "Wouldn't it be interesting if there were artificial people we could talk to?" So that started me thinking even more about the way humans interact with computers—not just by typing on a keyboard, but how people could interact with computers in a humanlike way. I funded a project for three years that won the Loebner Prize in 1997, a world championship for conversational computer programs decided by a Turing test–type conversation.

In other words, the program's responses tried as much as possible to be indistinguishable from those of a human, and in Turing's conception, the machine could be said to think. So, moving on from mere conversation, you began researching how, um, far interaction between humans and robots could go?
Around the year 2003, I started researching this topic very seriously. I was writing a book, Robots Unlimited, with a couple of chapters on robot emotion—love, even sex. I found so much material that when I finished that book, I wanted to look even more deeply in human emotional relationships with computers, with the possibility of sexual relations. I decided to call the book I wrote Love and Sex with Robots.

Did any of the research you found prove especially memorable?
The one single thing that made me go into this subject deeply was when I read a book by Sherry Turkle, The Second Self. In there, she wrote about some students she interviewed in her attempts to figure out how people related to computers. In one anecdote with a student dubbed "Anthony," he tried having girlfriends but preferred relationships with computers. With girls, he wasn't sure how to react; but with computers, he knew how to react. I thought that was so fascinating. And there are loads of Anthonys out there who find it difficult to, or can't form satisfying relationships with, humans. I dedicated my book Love and Sex with Robots to Anthony and all the other Anthonys before and since of both sexes—to all those who feel lost and hopeless without relationships, to let them know there will come a time when they can form relationships with robots.

So what was it like researching the possibility of sex with robots? You ended up writing a lot about sex dolls—did you know about sex dolls before you wrote your book?
I hadn't thought about them beforehand at all. It was absolutely fascinating doing the research. Then I got the idea that sex with dolls is like sex with prostitutes—you know the prostitute doesn't love you and care for you, is only interested in the size of your wallet. So I think robots can simulate love, but even if they can't, so what? People pay prostitutes millions and millions for regular services. I thought prostitution was a very good analogy.

And, as you mention in Love and Sex with Robots, brothels in Japan and South Korea already offer sex with dolls for the same rates they would charge for human prostitutes. So in studying sex with prostitutes, you figured you might begin to understand what the thinking behind sex with robots would be.
I started analyzing the psychology of clients of prostitutes. One of the most common reasons people pay for sex was that people wanted variety in sex partners. And with robots, you could have a blonde robot today or a brunette or a redhead. Or people want different sexual experiences. Or they don't want to commit to a relationship, but just to have a sexual relationship bound in time. All those reasons that people want to have sex with prostitutes could also apply to sex with robots.

But sex with robots won't just be a guy thing?
When I started, the research was almost entirely on male clients, but the number of women who pay for sex is on the increase, although there's not much published on the subject. That shows both sexes are interested and willing and desirous to get sex they paid for. Heidi Fleiss is proposing to open a brothel in Nevada where all the sex workers are male and the clients are female. You already have something similar in Spain.

If people fall in love with robots, aren't they just falling in love with an algorithm?
It's not that people will fall in love with an algorithm, but that people will fall in love with a convincing simulation of a human being, and convincing simulations can have a remarkable effect on people.

When I was 10, I was in Madame Tussauds waxworks in London with my aunt. I wanted to find someone to get to some part of the exhibition and I saw someone, and it didn't dawn on me for a few seconds that that person was a waxwork. It had a profound effect on me—that not everything is as it seems, and that simulations can be very convincing. And that was just a simple waxwork.

And if you or others could be taken in just by a wax figure, even for a moment, imagine what a realistic robotic simulation of a person would do. But if people are aware that a robot's just electronics, won't that be an obstacle to true love?
By 40 or 50 years, everyone of a marriageable age will have grown up with electronics all around them at home, and not see them as abnormal. People who grow up with all sorts of electronic gizmos will find android robots to be fairly normal as friends, partners, lovers.

Now did science fiction inspire you at all? Because science fiction is naturally one of the first things that leapt to my mind when I think of a society with robots in it.
I don't read science fiction at all. The only sci-fi book I ever read was as a favor to a publisher who wanted a quote from me on the back cover, but the book was so dreadful that I couldn't support it.

Are advances in robotics really going to happen that fast? Wouldn't the technology take up rooms of electronics?
Computer technology is getting faster and more powerful and smaller all the time. What fits in a backpack now could fit in a matchbook in 30 years' time.

If we don't yet completely understand humans, how can we make a humanlike robot?
It will be an iterative process, to be sure. But while we don't understand humans perfectly, we know quite a bit now about human behavior and psychology, and we could program that in.

Isn't your prediction about humans marrying robots in 50 years optimistic?
If you went back 100 years, if you proposed the idea that men would be marrying men, you'd be locked up in the loony bin. And it was only in the second half of the 20th century that you had the U.S. federal government repealing laws in about 12 states that said marriage across racial boundaries was illegal. That's how much the nature of marriage has changed.

I think the nature of marriage in the future is that it will be what we want it to be. If you and your partner decide to be married, you decide what the bounds are, what its purpose is to you.

Would people really want a robot that agreed with everything you wanted or were completely predictable?
I do think there is often a need for friction in relationships. You wouldn't actually want a robot that does everything you want. Most people might want robots that sometimes say, "I don't really want to do that," that rejects certain requests from time to time. So you could program that in, the level of disagreement you want.

And you could program a robot to have different tastes from you. I personally find it very beneficial that my wife has interests that I do not. You could find it fascinating, for instance, that your robot knows a lot about 19th-century South African stamps or the like.

How might human–robot relationships alter human society?
I don't think the advent of emotional and sexual relationships with robots with end or damage human–human relationships. People will still love people and have sex with people. But I think there are people who feel a void in their emotional and sex lives for any number of reasons who could benefit from robots. Other people might try out a relationship with a robot out of curiosity, or be fascinated by what's written in the media. And there are always people who want to keep up with the neighbors.

One point a friend made to me was that there will be people who say, "Oh, you're only a robot." But I also think there will be people who take the view, "Oh, you're only a human."

Isn't falling in love with a robot reminiscent of falling in love in a chat room?
I think it's a very small step at the end of the day—if you are sitting at home talking in a chat room with someone who purports to be a 26-year-old female—between that person being a human or a robot. It's a kind of Turing test. So many people nowadays are developing strong emotional attachments across the Internet, even agreeing to marry, that I think it doesn't matter what's on the other end of the line. It just matters what you experience and perceive.

Do you think others will follow this field?
I was actually recently contacted by a woman at the University of Washington, who wants to write a thesis on human–robot relationships.

What directions will you pursue now?
I'm writing an academic paper on the ethical treatment of robots. Not just the ethics of designing robots to do certain things—people write about whether we should design robots to go into combat and kill people, for instance—but should we be treating robots in an ethical way. If we treat robots in an unethical way, would that be a very bad lesson for other people and children? If it's seen as okay to maltreat robots, would that send a message about living creatures? Robots can certainly have a semblance of being alive.

What does your wife think?
She has a different slant from me. She's not a science person at all—her background's in English and drama; she's not interested in computers or robots or AI. She was totally skeptical of the idea that humans would fall in love with robots. She's still fairly skeptical, but she's beginning to appreciate something like this will happen.

What happens if 50 years from now your predictions have not proved true, and humans and robots don't marry?
I know some people think the idea is totally outlandish. But I am totally convinced it's inevitable. I would be absolutely astounded if I'm proven wrong—not if I'm a few years off, but if I'm proven completely wrong.