In Spike Jonze’s new movie Her, Joaquin Phoenix is an introverted writer on the verge of divorce who falls in love with his computer’s intelligent operating system. Exactly how far-fetched or credible you think that is probably depends on how invested you are in technology. It was after all, inspired by the real-life web application Cleverbot, which lets visitors engage in conversations with an AI program; and in a lot of ways the movie is a study of our growing reliance on devices as mediators in our social lives and love affairs. From Siri to Tinder, our smartphones and tablets are simultaneously humansing themselves while mechanising our relationships with other humans. How long before we fall for the devices themselves?

Really though, this is already happening in video games, where non-player characters are becoming ever more complex, both in terms of visual representation and “intelligence”. In narrative adventures like Mass Effect and The Walking Dead, players stay with the same characters over the course of several games, communicating with them through simple conversation trees and trying to keep them safe through endless dangerous encounters with aliens and zombies. Mass Effect even allows players to form sexual relationships with other characters, which can have a profound impact on the gaming experience – even if the sense of reciprocity is minimal. In Mass Effect, the love affairs are story functions and the AI characters merely pawns in a set of narrative possibilities. They don’t love you back. Not really.

But what if they could? In some ways this is more likely than the scenario envisaged in Her. Unlike operating systems, which are the practical interface between us and the computer, video games provide a playful environment in which we’re invited to identify with the onscreen avatars and events. Just as literature has done for hundreds of years, games invite us to identify with characters, they function to make us feel. It may be just a matter of time before a clever game designer uses cutting edge AI routines to simulate emotion. We know that basic speech recognition and conversational abilities are already possible, but can these be extended from chatbot programs into sophisticated game characters?



Will we see AIs capable of falling for players?

An intelligent question



The first challenge here is in defining the “intelligence” part of artificial intelligence. Although huge advances have been made in academic AI research involving elements such as affective computing and machine perception, in video games the concept is still mostly confined to navigating the game world and responding to basic player actions. An AI character in an action game will be able to find a route through the environment, and will be able to hear and see the player-character, responding with a series of set actions. But they’re little more than marionettes or remote-controlled robots that have been given basic motor functions.



The next step perhaps is to go from spatial to emotional pathfinding. “One thing that’s really important in social interaction is being able to think about what someone else might be thinking – it’s how we learn and plan things,” says Michael Cook, a researcher at Imperial College who has built an AI that can design its own games. “When you’re designing AI, you mostly focus on the end result, what a character actually does and whether that’s intelligent. But for us to relate to characters, we might need to make AI mimic the thought processes we go through as well. The way an AI plans to walk across a room in an FPS game is completely different to how you or I plan the same route. I think thought processes are a really interesting area for AI generally, since making believable mistakes and being outwitted in games also need this kind of work to be done.”

For love, there has to be true adaptive intelligence. The main problem is that we’re not sure what that means. “True intelligence is a big phrase that hides a multitude of sins,” says Cook. “Is my dog truly intelligent? It can definitely do things that many video game characters can’t – it can learn actions, it can connect sounds to meanings, it can make friends with people and remember them – but it’s not the kind of intelligence we want from game characters. I think we’re getting closer to a new generation of game character, but the hard problems remain hard, and one of the biggest in terms of relationships with avatars is communication and language. We’re a long, long way off having natural conversations with characters that don’t slip right into the uncanny valley.”

The problem is that we don’t actually know about a lot of the stuff we’d need to simulate in order to make a game character who could fall in love with the player. ”When we talk about going beyond AI that can win the game, we get into really murky territory of how much we actually understand the human condition,” says AI researcher and game developer Luke Dicken. “I think that we’re both quite close and also a long way away from this kind of NPC in games.



“From the code or computer science point of view, it’s a horsepower problem now and that’s just going to get solved over time either by streamlining techniques or extra muscle in PCs, so we’re close-ish in some ways. On the other hand, from a behavioural science point of view, we don’t understand words like ‘intelligent’, ‘characterful’ or ‘deep personality’ and what that truly means in a deep connectionist kind of way – we know it when we see it, but that’s not necessarily enough to reliably construct something, and when we miss, we miss by a long way.”

Mind the gap



But the thing about games is, players are more likely to fill in the gaps themselves. With a ‘thinking’ operating system, we’re starting with a dispassionate productivity application; an operating system is designed to be useful not loveable and it exists as a functional system. But in games, there’s often a narrative, there’s a script and there is playful interaction – games like Mass Effect provide an environment in which we want to establish relationships with characters – we naturally humanise the experience, because, look, there are people on the screen and they’re doing interesting stuff. Games usually have very simple stories and very broad characteristations, but because we’re invested in the experience we imprint emotional depth on to the framework. So surely the task of generating a convincing, attractive AI is a little more simple for game makers than OS designers?

“Characters can generate really strong emotive feelings in us already,” says Dicken. “Telltale Games do this really well – you want to protect Clementine and I definitely fell a bit in love with Snow White in The Wolf Among Us Episode 1. Right now though, I think a lot of that emotive nature is stemming from putting ourselves in the role of the player character. Crystal Dynamics infamously talked about trying to make the player feel protective of Lara Croft in the latest Tomb Raider and I think that’s a mistake not only because of the gender issues it raises, but because their job is to make the player be Lara. Did I fall a bit in love with Snow White, or did my version of the player character, Bigby Wolf? It’s a blurry line there.



“But stepping back from games a little and looking at something like Lionhead’s Project Milo, this was a kid that you could play with, he had toys and a personality and was super expressive. We’re still talking about virtual characters, but in this setting you as yourself get to interact with the character - this is a stark contrast from most games which are still about ‘role-playing’. This puts a divide between the player’s emotions and the game world, so I think an emotional attachment really needs to stem from ourselves not from our perception of the character’s self.”

The social scene



So let’s assume that we begin to see a new era of games in which gamers are invited to play as themselves, and to establish unmoderated relationships with AI characters. What then? “One big step forward I can see on the horizon is subtle social interaction,” says Cook. “The Impulsion Project, which I saw at AIIDE in 2012, blew my mind. This kind of stuff in games would go a long way to boosting the perceived intelligence of NPCs.” The Impulsion project is a social intelligence engine developed by Claudio Pedica at Reykjavik University’s AI lab. It seeks to generate lifelike interactive characters who understand their surroundings and can grasp the meaning of player interactions. Pedica has worked with Icelandic game developer CCP to explore the possibility of implanting his tech into future titles. And once you have AI characters who know where they are, what they are doing and what the player wants, we’re getting toward relationships.



Closer, but not quite there – games have to start to think about non-player characters in a different way; not as functional automatons in a narrative sequence, but as functioning beings that will generate a range of responses to the gamer - because range is important. “One of the real things here is how we interact with stuff,” says Dicken. “In general, people can’t make meaningful attachments to things that they can only interact with in very limited ways. That’s why natural language processing is so important, so that the character can understand what we are saying and that has symbolic meaning to them. Right now our complex romantic interactions in a lot of games boils down to ‘Press X to sexytime’ and a few canned pieces of dialogue and for some people maybe that’s enough, but it’s not what most people would consider sufficient for a meaningful relationship.”

Perhaps the most interesting element in all of this is the idea of reciprocity. In the movie Her, the AI operating system responds to the lead character and their relationship is mutual – there is a sense of shared enjoyment. Can a computer appreciate conversation? Can it get jokes?



Analysing the likelihood of this scenerio recently, Gartner researcher, Jackie Fenn, wrote: “Humour and creativity will be among the more challenging areas for artificial intelligence, but even here researchers are experimenting with clever algorithms and deep learning. If a computer can learn what makes people laugh – and more importantly what makes you laugh – based on watching and analysing over time, there is no theoretical reason that a computer couldn’t eventually display and respond to humour. Similarly with music or art – by experimenting, analysing and learning, it could figure out which compositions create the best emotional resonance in the human brain.”

Dicken, however, is unsure of how much reciprocity could be implemented into a game system. “I think it’s a really thorny notion,” he says. “If a character is programmed to love the player, can that ever truly be reciprocal since it’s also effectively non-consensual? If you’re programmed with the capacity to love and you use that capacity, is that true reciprocity or has the player ’gamed the system’ to cause it to happen? It’s really interesting the asymmetry it introduces in that the participants are less on an equal footing than in a traditional relationship because a virtual character will always be constrained by their programming. You could maybe argue that the same is true for humans - although that opens a whole other philosophical avenue - but two humans are equally unknowable and complex to each other.”

Learning and doing



In academic AI research, we are seeing learning systems that can begin to draw emergent conclusions. Google’s own search tools are using machine learning and re-enforcement learning techniques to make the system more pro-active and usefully predictive. The company’s head of research, Alfred Spector, talks about combining neural networks with user feedback and natural language parsing to create a system that effectively simulates intelligence.



Indeed, in games we’re already seeing interesting users of networked systems – or cloud-based computing - to learn player behaviours. The driving game Forza Motorsport 5 studies the behaviour of individual players, and then creates a Drivatar, which mimics and represents them online. Could similar systems be used to gather behavioural and conversational data from thousands of gamers to construct more authentic AI characters? Could the cloud become a sort of neural network? We have seen something sort of like this with the MIT Media Lab’s project The Restaurant, which combines the experiences of thousands of participants to re-model social behaviours in the virtual space and create a new game.



Certainly, the ability to remotely save elements of gameplay opens up the possibility of more sustained relationships with characters. If data is stored online, the player’s relationships can be stored too, from one game to the next. In 2012 game designer and author Jessie Schell gave a talk at the Game developers’ Conference in San Francisco about game characters and how they are evolving.



“One of the biggest changes we’re going to see over the coming 10 years is our relationship with virtual characters,” he says. “I think they are going to start to become more intelligent, they are going to talk to you – because voice recognition is coming – and what I argue is they’re going to become something I call virtual companions - the idea being that the characters will have a sort of cloud-based memory of everything they’ve ever done with you and they’ll remember from game to game. I mean, it drives me nuts right now; I’ll load up the new Mario game, and he’s all ‘It’s a-me, Mario, what’s your name?’, and I’m like, ‘Mario, we’ve been playing games together for 20 years - are you kidding me? Do you really not remember?!’ But I think he is going to start to remember - characters will know they have relationships with us.”

For Cook, the question is more about motivation than capability. Why should a developer worry about making characters that we can fall in love with and that love us back and remember us? “I’m not sure what kind of game would make the best use of this, actually. Perhaps one with strong companions – Glados from Portal would be an excellent character to develop a relationship with over many games, or a game with characters that can learn things. If the Torchlight pets remembered you between games and learned tricks, that would be a phenomenal sell for me! Actually, animals might not be a bad place to start when exploring love and intelligent NPCs. After all, we love our pets almost as much as we love other humans, and you don’t have to spend thousands of dollars working out how to get a pet to speak to the player, either.”

The big change



One thing is certain, developers are already making the shift from love affairs that exist only within the enclosed narrative of a game, toward sentient game characters that form their own relationships. Love isn’t just something that comes from a script, it is coming from game systems; it is emergent. We see this to some extent in Redshirt, the fascinating Facebook parody game from Tiniest Shark which Dicken wrote the AI for. Here, the whole game is experienced through a social network interface (SpaceBook) and ou actions create friendships and rivalries that shape the action. Very quickly, players begin to humanise the other inhabitants of the world and deeper motivations are invented.



Elsewhere, Maxis, the creator of the Sims series of life simulations is expanding the AI and emotional responses of the characters for Sims 4, finely tuning them to what the player does. And Second Life developer Linden Lab recently ran a gaming experiment named Versu, a sort of choose-you-own-adventure ebook in which reader actions combined with AI characters to modify the story. It was also fascinating how many Halo players fell head-over-heels in love with Cortana, the lead character’s AI guide and assistant. In some ways the emerging ‘love affair’ between this synthetic being and the game’s hero Master Chief is a sort of simulcrum of where we’re going with human/character interactions – it was a machine relationship played out within a simulation.



Emotional story-telling is of growing importance in the games industry. Years ago, plots were basically about getting the girl and saving the planet, but with a much more diverse and mature audience, studios are having to be smarter. Games like Gone Home, The Last of Us and The Walking Dead are as much to do with emotion as they are with action and combat – so it seems logical that the next step will be finding a way to strengthen our relationships with the people onscreen, even if they are controlled by computers.

For Dicken it’s about developers changing the way they think about making non-player characters, it’s about providing AIs with the capability of interpreting the script. “We’re at some point going to reach a point where characters in games are much more like actors,“ he says. “Rather than having to get down and dirty writing code and hacking in hardcoded solutions to specific problems, game development becomes much more similar to being a film director where you’re instructing actors on their motivation and tone. The last five years of my life have pretty much been about taking the first steps down this path, and I really hope I get to continue that.”

Faking feelings



So the best we can hope for from game characters is better actors? We can’t provide them with a simulation of the emotional process – just the ability to fake it? “I think it’s inevitable that we’re going to get better at creating more lifelike and real characters and I think that over time, some sort of virtual companion could easily become a thing,” says Dicken. “Many long distance relationships could already be taken over by an AI system that talked to you on Facebook and played a game like World of Warcraft with you. I think that its going to end up more of a service and a virtual pet than a true partnership though, because there are inherent limitations that would prevent an equal partnership. I don’t know - we’re easily 20 years from being close to having to worry about this. More probably.”

I don’t know. I think people fundamentally want to connect – and we will conveniently detach ourselves from the aspects of reality that prevent this from happening. From teenage crushes to stalking, we develop patterns of thought and behaviour that facilitate our needs, even when those needs aren’t adequately reciprocated. So if a game character were to make even the tiniest gestures toward recognition and romance, players will close the gap. Of course, most of us don’t actually want an actual relationship with a virtual being – we’re not all in Spike Jonze movies. But we wouldn’t an emotionally resonant narrative game be more compelling if it felt like there was a true connection? It would be something utterly unique to games.



“I don’t think we’ll ever have true reciprocation from AI,” says Cook. “They lack a lot of important qualities that make something like love possible - emotions, mortality, a culture that has a concept of love in it. But the thing about love is that it doesn’t need to be two-way. People have always fallen in love with video game characters, and they’ll continue to do so, and characters will get better at learning, at responding, and at seeming to reciprocate. In the movie Her, we never really know whether any of what the AI says is true or not, from start to finish. But that doesn’t stop the movie’s protagonist from falling in love. As long as the illusion is there, we’ll find a way - and game developers have been honing the art of illusion for decades.”

Human perception is a network of assumptions, automatic behaviours and subjective distortions; we are easily manipulated by our desires. “Thou blind fool, Love, ” Shakespeare wrote. “What dost thou to mine eyes/ That they behold, and see not what they see?” Give a game character a few good lines and a nice smile and I think we can do the rest. We are programmed to do the rest.



• Are the robots about to rise? Google’s new director of engineering thinks so…