Log in   •   Sign up   •   Subscribe  feed icon

Angelina: An AI That Makes Video Games

The mad AI - the concept of an artificial consciousness rebelling against its creators - is a common theme in science fiction. It's something writers have been toying with ever since the concept of computers was first introduced. It's also something that isn't likely to occur any time soon - AI's haven't yet reached that point. 

Artificial intelligence is, for all the advances we've made, still remarkably artificial; remarkably limited. Sure, Cleverbot can sometimes hold a conversation. Deep Blue can defeat someone at Chess. Saya can smile and interact with people around it.  At the same time, however, there's something missing - something integral which all of these constructs grasp at, but can't quite reach. Something fundamentally human which we've not yet been able to replicate in an artificial context.

However, even if we haven't created anything 'human,' we've managed some very impressive accomplishments; we are blurring the line more and more with each passing day. ANGELINA is one such feat. She - or it, if you speak to her creator - was developed deep within South Kensington's Imperial College Campus, by a PHD student named Michael Cook. Cook, you see, was working to answer a very unique, very interesting, somewhat odd question: is an AI capable of game development? 

The Dancing Salesman Problem

 

Cook's workplace - the headquarters of Imperial's Computational Creativity Group -  is a reflection of the complications associated with that question. Above his desk where he clacks away at his iMac is a large picture known as The Dancing Salesman Problem. It's a piece of artwork with one very unique quality to it: it wasn't created by human hands. It was conceived and created by a computer program designed by Cook's PHD supervisor, Dr. Simon Colton.

"The problem with all of this," Cook told Eurogamer, glancing at the portrait, "is that when you look at that painting, there are so many ways to interpret it. Somebody will say 'someone wrote that program, and the rest doesn't matter That is not creative outpot: ultimately, it is just expressing whatever Simon gave it. Other people are almost the opposite."

"The truth," he continued with a laugh, "is somewhere in between. You have to say: Simon gave it this grammar to produce those human figures. It didn't come up with that itself. We know we're in early days, but the steps we've taken to get there have been important."

All of this started, Cook explained, with a piece of mathematical discovery software known as HR. Developed by Cook's PHD supervisor, Dr. Simon Colton; HR was a discovery application capable of inventing mathematical sequences.  That fascinating program appears to have become the basis of much of the Computational Creativity Group's work, while The Dancing Salesman Problem serves as a reminder of the capabilities - and limitations - of AI.   

"It did some pretty remarkable things," Cook said. "It found an integer sequence that got accepted to this encyclopedia of integer sequences. It turned out a human had actually discovered it year before, but the idea of independent rediscovery is actually quite popular in computational creativity. It's quite a nice thing to see." 

ANGELINA's Birth

 

The notion of ANGELINA was born several years ago, when Colton asked Cook to investigate whether or not programs could feasibly 'evolve' playable games without human guidance. Cook started small, throwing together an AI capable of creating bare-bones arcade games in which players manipulated a series of dots on a screen. Since then, he's moved on to two-dimensional, Medtroidvania-style titles. Somewhere along the line, he decided to name the AI ANGELINA - "A Novel Game Evolving Labrat I've Named ANGELINA." 

Cook's evidently fond of complex acronyms. 

"Games are fascinating," said Cook. "I think this PhD project has changed my supervisor's view of games in general. Now he sees what a creatively complex task it is. You can talk about generating art, and you can talk about generating music, but those are just subproblems in generating a game. There's so much going on in even the most basic game." 

HR's capability to discover and learn served as the conceptual core of ANGELINA, which posseses the ability to learn about people so that it can create games based on current events. Cook also gifted ANGELINA with memory, enabling it to keep track of the people it 'learned' about. ANGELINA's memory isn't terribly complex - it's merely a text file where it stores the names of everyone it's learned about, along with a number representing its 'opinion' of each person. 

Somehow, the AI has come to rather severely dislike Home Secretary Theresa May. No one's quite sure how it happened. Apparently, that's just the direction in which the opinion of the Internet happened to drift.  It's pretty impressive for an AI which is essentially just a window on Cook's computer screen.

The Learning Process

As a demonstration for Eurogamer, Cook set ANGELINA to the task of creating a game based on the news. He decided how large the game should be, and turned the AI loose. After looking through the top five news stories on The Guardian, it chose one and used it to provide some texture for its title. In this case, it choose a fellow named Vince Cable, and began considering what it thinks of him - a process which Cook described as akin to "cold-reading the Internet."

It doesn't care for him, and in short order, it's put together a game called "Rockstar Presents Cable Tennis" -a rather clever pun - after gathering together appropriate music, pictures, and other assets which it will use to develop a common theme.  

ANGELINA's learning process, explained Cook, is tied to a trick developed by a fellow known as Tony Veale - Cook describes him as one of his favorite people in computational creativity. 

 

"If you want to find out something about doctors," Cook explained, "type in "Why do doctors always' and then look at the auto-complete results. That will tell you things that Doctors probably do, or at least things that people think Doctors do."

"This is incredible," he continued. "You know that doctors wear white coats because of that. You know that dogs eat their own poo because of that. I like this. We've got lots of large knowledge bases and I like them too, but this is a lot more interesting because its rich, live data, and it will change over time. You will be able to ask it about things that happened fairly recently and still get auto-complete results."

"It's difficult data," Cook admits, "but it's very raw and real."  

Making the Games

The newest version of Angelina generates levels by placing each individual block, rather than using templaces (as older builds were designed to do). The process is entirely random - and somewhat time  consuming - as Angeline essentially generates and plays through levels until it finds one that can feasibly be completed by a human player. The process, Cook explains, is called "evolution," and forms what he feels to be the core of ANGELINA. 

"It's remarkably mindless, and remarkably effective. I was blown away by how good evolution was, which is why I've kept it for a number of things. Even the level design in my current games." Evolution, Cook continued, is what's used in computer science to solve "combinatorial optimisation problems." 

Cook explains this in plain english as what happens when "you've got a massive space of possible solutions to a problem, but the actual ones you want are very tiny and they're scattered around and you have no idea where they are. It's like there's a possible level where everything is blocked off and you can't move at all. That's one of the answers in this space, but it's not an interesting one - it's not one we want." 

He describes ANGELINA's process of elimination through an analogy using cakes. 

"If you want to bake a cake but you don't have a recipe, you could use evolution to solve the problem - if you had enough ovens and a shitload of ingredients. The first thing you need to know is what goes into the thing you're evolving. So for cakes it's things like sugar and flour and I think I would normally say water, until my wife told me that was a stupid idea. For a game, you might have blocks, or placements of enemies." 

"Initially," Cook continued, "you just randomly produce loads of cakes. You don't care what's going into them. you just closer your eyes and throw ingredients everywhere. But you bake all of those cakes no matter what they've got in them. This is what ANGELINA starts off doing: making loads of levels and then just playing them. 99.9% of those levels will be awful, just like when you taste most of those cakes they'll be terrible. And even the 0.1% that aren't terrible will still be very bad - they'll just be slightly less terrible than the terrible ones." 

"What you do then is write down what went into those slightly less terrible cakes and try to combine the recipes. You take averages of the values or you swap values around. ANGELINA will take a map that's less terrible than the others, and then she'll take the top half and glue it to the bottom half of another slightly less terrible map. That'll be a new map, and she'll try that."

So how does ANGELINA know whether or not a level is playable?

"There's a piece of code somewhere that says 'if you give me a level, I'll give you a score that says how good this was, and contained in there is a bunch of opinions I've given it.'" This code is known in programming as a fitness function.

Eventually, Cook is thinking of setting it up so that ANGELINA itself decides whether or not a game is good; ANGELINA would hence develop its own ideas and preferences about what makes a game good or bad and about what it 'likes.'

In this way,  ANGELINA could be said to represent Cook's attempts to reach for the 'holy grail' of computational evolution; the perfect 'fitness function.' Ultimately, Cook said, he hopes to nail down a way of generating a fitness function which allows the AI to set its own parameters. 

Limitations of AI

ANGELINA is a fascinating application, and a fabulous idea, but still remains shackled by all the limitations of AI we've seen in the past. For all that it can learn, for all the content it can generate, the games it can create, the opinions it can form; ANGELINA can still only operate within the parameters set by its designer. As a result, it's games lack something fundamental: it can create a game with Theresa May or Vince Cable in it, but it can't really give those games any creative weight. 

"Evolution never gets to the point where it realizes it has something amazing," Cook laughed. "It could actually see this perfect game, and say, 'oh, this is quite good; I'll now mash it up with a load of terrible ones. And it will. It will generate Half-Life 3, and say 'well, okay, let's just cut off the first half of that and put it with something else. It can be one small bit-flip away from perfection and never get there because it's just random reconstitution." 

At the end of the day, what this means is that while ANGELINA is capable of generation, it isn't yet capable of true development or design. 

"What I ultimately want from ANGELINA, the ultimate expression of creativity - and this is really insane and you'll never see it in my lifetime, I'm sure - is for ANGELINA to write Java code with no assistance whatsoever. Then it would have access to an entire design space...but that space is so infinitely huge that there's no way it could get through it. Even evolution would have trouble cutting down that kind of space. So at some point, you have to draw a circle: you have to say 'this is the space I'm interested in." 

Cook has also recently designed a new program with which he's equipped ANGELINA- a tool known as Mechanic Miner. It represents a huge step forward from ANGELINA, but it's still not perfect: although it can independently invent and create its own mechanics and organically generate levels; it lacks reason and motivation behind what it does. It simply...is.

"That sort of thing is just very, very exciting, but even then there are the same frustration. The system can't judge it, and can't polish it. In a way, that story sums up where I am. Every day, I get glimpses of promise, and yet it's this unstable force that explodes. ANGELINA can invent mechanics, but it can't describe them to you. It can't show you how to use them. It can't name them." 

Conclusion: A New Development Frontier? 

For the time being, AIs aren't likely to break into the development space. They simply cannot inject that human element into it, they're incapable of that final, creative, contextual touch.  In the future, however? Cook feels that anything is possible.

"There's nothing a human can do that I don't thinkan AI could be capable of. This is going to sound horrible, but I occasionally save quotes from people where they say 'this is never going to happen, ' because 'never' is the most dangerous word if you work in technology." 

At the same time, Cook doesn't feel that game developers are going to be replaced by AI, either.

"I think there are lots of ways that AIs will be used to design games in the future, and I think that one of them that will be really important is the use of autonomous AIs that actually create games that you do connect with: you commune with the AI and what you're connecting with is the way that technology sees humanity."

"The problem is," Cook continues, "we've only ever experienced one intelligent species, and that's ourselves. There's only one species that has an identifiable culture or a culture we can connect to, and this is a problem, nbecause it means we don't know what it looks like when we see a culture that isn't like ours, or someone that experiences the world in a different way. "

It's a poignant idea - and a staggering one. We've often been so concerned with the ramifications AI might have on our personal lives; so consumed by the looming possibility that we could be replaced, that we've failed to consider the alternative. What if, instead of creating something akin to ourselves, something which does what we do but better; we're building something completely different, a new set of eyes through which we can see the world? 

What if we're creating a new kind of intelligence? 

"Technology's ridiculous, the internet's ridiculous, AI's ridiculous. This is one of the things I genuinely think about. What would it look like if you could have the news presented to you by a machine that did not have an inherent bias to it and could just consume data and represent it in interesting ways? What does that look like?" Cook asked.

"That's a different kind of artistic expression: it's not one that I can connect to because I'm not feeling the same thing as it. It's actually making a comment about humanity. It's saying, 'I don't have any investment in this, it's just something I've noticed.' With ANGELINA, you want to play a game where the designer is saying, 'I'm not trying to be like you. This is what I see instead.'"

It's unlikely ANGELINA and her ilk will ever completely replace game developers, but maybe she doesn't need to. Maybe what we're seeing here is moe than the creation of a new tool for game development. Maybe we're seeing the birth of an entirely new development space -of an entirely new method of thinking- and ANGELINA represents one more baby step towards something which is equal parts remarkable and unfathomable. 

Source: Eurogamer

Check it out! I have an RSS Feed now!

Nicholas Greene
Nick's Games Haven
InventorSpot.com
Follow me on Twitter @OmniscientSpork