From presenting enemies that can attack more convincingly to the reflexive quest structure of Skyrim, there are lots of ways that game developers can make use of artificial intelligence. Michael Cook's research as part of Imperial College London's Computational Creativity Group is concerned with just one very simple application, however.
That is: can an AI design a game all by itself?
While it's a question that might sound outlandish to many though, Michael's research has already proved that such a thing is at least possible on a limited scale. Earlier this year his ANGELINA AI demonstrated platform games it had built based on newspaper articles and, while the games were certainly crude in construction, they functioned excellently as a proof of concept.
Since then, Michael's been bulking ANGELINA out with extensions such as his new Mechanic Miner sub-system -- a feature which finds new possible mechanics in properly presented engines and can then design levels to suit.
Despite all the progress made though, ANGELINA has yet to light the fire you'd expect among game developers. Aside from a few articles with provocative headlines playing off the idea of human redundancy, ANGELINA has mostly been received with ambivalence - a problem that other researchers in the field have experienced all too often.
"This is one of the problems with computational creativity," says Michael of the muted reaction so far. "Whenever you suggest a piece of software doing work independently and autonomously then professionals don't like it... [But] it's not that people are aggressive -- they just don't think that it could ever reach a decent level of quality."
"I've got colleagues who've had five page emails from professional artists outlining why they're obviously going to fail -- why they should quit their jobs and so on."
A Puzzling Present is ANGELINA’s Christmas themed showcase, created as a 'collaboration' with Michael.
To focus on the question of quality is to miss the point, however. The question the Computational Creativity Group is hoping to answer isn't whether computers can design triple-A games that will render big studios redundant; it's whether creativity is a uniquely organic experience.
Can an AI experience a flash of inspiration, or is that something reserved only for humans?
"I don't think there's any difference between the human mind and a computer," says Michael, though he admits a big problem is that we still know relatively little about how the human mind works. Instead, he thinks that humans tend to romanticize their own thoughts - and he argues it's that which has caused much of the industry's indifference so far.
"This is something that comes up a lot when I explain how ANGELINA uses evolutionary systems for level design, for example," says Michael. When he explains it to people they reject it because it appears like a formalized system, not a creative process.
Broadly speaking, evolutionary systems function pretty much as you'd expect from the name; a random population of objects is assessed according to set parameters, with 'fit' instances then combined and re-assessed until a minimum quality level is attained. When ANGELINA uses such a system to create levels then it does so by creating a random population of 2D levels, then assesses them according to criteria such as 'Is Solvable' and 'Player Must Use Mechanic To Solve'. Passable results are then combined and the whole process loops again until the system is satisfied with the result.
"Because it starts with randomness [researchers] really see evolutionary systems as a good thing," explains Michael. "It's ANGELINA going through 300 random ideas, identifying the good ones and iterating forward. I don't know about you, but that's how I try to solve problems too; I'll sit and doodle."
"Good ideas aren't intentionally produced; you just recognize that one of the random thoughts you were having was good... But nobody thinks of themselves that way. They think of themselves as incredibly creative. Artists will say that their muse descended on them and so on."
A Puzzling Present features levels designed by ANGELINA, with Michael acting as a curator.
It's this sort of misunderstanding that Michael is determined to resolve. Currently he's working with local indie developers such as Alan Hazelden to see if ANGELINA can be imbued with more human-seeming attributes. Is it possible to give ANGELINA a sense of style, for example, that will make the levels it designs recognizable when compared to others? Such an approach will hopefully sift out some of the objectionable randomness, though Michael's aware that the artificiality of it may open ANGELINA to further criticism.
There's the thorny issue of creative repeatability, which has so far proved impossible to resolve. What does it say about ANGELINA that the creativity it displays can be replicated at the press of a button?
"Take The Binding of Isaac, for example. Edmund McMillen won't make another game about his experience of religion as a child and if he did then I imagine he wouldn't make another game like that," explains Michael. "But ANGELINA isn't like that; I can effectively travel back in time by faking the inputs and using snapshots of the sources."
So, even if ANGELINA were able to express a unique style then repeatability would mean that it may still seem to be the product of a system, rather than a creative process. Again, it's an issue that arises from the high opinion we have of ourselves; we think our creativity is unique and therefore valuable, while ANGELINA's is repeatable and therefore worthless; not creative. Michael insists it's an unfair assumption to start out from given that it's impossible to clarify whether our creativity is as rarefied as we think.
"People say that if I re-ran ANGELINA then I'd get the same game again, but I can't prove if that's true or not with humans because I can't go back in time," Michael points out with a sigh. "But people can always go back to these arguments... there are so many Get Out Of Jail Free Cards to oppose this sort of thing that I feel, at some point, we'll have to say we can't engage the arguments because they don't make sense."
"Some artists bring up the nature of the soul; something that is innately human, for example. That's something I feel you may as well disregard until such a point as computers are no longer synthetic," Michael continues. "Because really what you're saying there is that computers are machines and humans aren't."
Meanwhile, one of the issues the Computational Creativity Group is hoping to tackle in the future is developing AI to the point where it can explain its work. Aside from the purely technical issues involved with getting an AI to communicate in this way though, an additional philosophical problem is the gap between humans and computers when it comes to self-awareness.
That is, while computers "know" themselves utterly in the sense that their decisions can always be traced back through their code, humans do not. We may come up with explanations for why we arrived at particular decisions, but there's no certainty that they are correct even to ourselves because we lack that depth of self-knowledge. Computers are meanwhile so transparent that they can seem autonomous rather than creative; their explanations inevitably tracing back to their programming -- or their programmer.
It's a line of reasoning that Michael is often confronted with; observers countering ANGELINA's creativity by pointing out that he wrote the code that directs it.
"They recognize that [ANGELINA's games] can vary, but they say that when they know the story of how it was made then it stops being creative because they can see the system was driving toward that output," Michael explains. "Whereas if Alan Hazelden sits down to create a newsgame then you start by knowing that there are many ways he could diverge from the path he ended up on."
Unless you hold that Alan's creations were also determined by a larger force, such as destiny, then this is a problem without a simple solution. Michael could give ANGELINA the capacity to diverge further from the source, but then he'd still have created that system and the limits of that would still determine the output.
It's an example of what Michael calls 'the infinite rabbit hole of criticisms' - solutions which only delay or lead to further problems.
Michael's work on ANGELINA is mirrored by Simon Colton's painting AI, The Painting Fool.
Instead, a better way to confront the issue may be to remove ANGELINA's traceability altogether. The Computational Creativity Group is currently experimenting with flowcharting systems for higher level programming, for example and the hope is to allow AI such as ANGELINA to build larger programs out of small, modular components while also facilitating divergence.
"Let's say that ANGELINA makes one of these programs, generates a game with it, but then deletes all trace of that program. The random seeds that affect what ANGELINA read and saw to generate such a program are not known. All we'd have to go on is a single text file describing the justification for what you are about to play. Or even better, a little "Ask The Developer" feature in-game that lets you chat to ANGELINA. All you have to go on is what it/she says in response to your questions - that puts us in a new kind of situation."
While ANGELINA's games are currently very low-fi, Michael hopes to change that in the future.
Even apart from the issue of traceability however, ANGELINA's ability to explain decisions may still be thwarted by its capacity to relate those decisions to real-world concepts. It would be unable, for example, to say that it designed a game to play off ideas of religion because it has no concept of how it could interface with religion. It's possible to use a semantic web such as MIT's ConceptNet to give ANGELINA a way to relate ideas to one another, but translating those into mechanics - rather than just images or definitions - is another problem entirely.
Hidden object games are likely the first which ANGELINA will be able to create on a believably human level.
It's an issue Michael's been pondering deeply, especially with the growing number of gamejams acting as such a perfect example.
"Say that the theme for a game jam was 'Space', for example. ConceptNet could tell an AI lots of things about space -- that it has planets in it and low gravity and so on. ANGELINA could then take that and use it; it could use planets for graphics and maybe cast the player as a planet... but it can't translate it into a real-world, mechanical concept. Likewise, Mechanic Miner can come up with new mechanics and it can discover low gravity for itself... but it can't explain it to you, let alone connect it to a real world action."
"Humans, though? If you were designing a game where you picked up a power-up and that let you jump higher, what would you depict that as? Jump-boots, maybe a jetpack?"
Caffeine, I say.
"See? Exactly. It'd be funny to have a game where you're a journalist who has to drink coffee in order to jump higher and better quality coffees let you jump more... but I have no idea how we're going to broach that problem with an AI."
"But, then again, 12 months ago I didn't know how we'd mine the mechanics either."
While some of the Group's projects may have been greeted by ambivalence from the respective industries though, one provocative point that has been seized on is the potentially unethical long-term implications. If five years from now, ANGELINA were capable of creating high-quality games automatically, wouldn't that put game developers everywhere out of a job?
"I don't think people will ever stop paying for human-created or artistic games," Michael says after a moments thought. He mentions a painting on the wall in the Group's office; a rendition of dancers in motion painted with a single line on a black background and something I admired on my way in. It was created by another of the Group's projects -- The Painting Fool AI created by Simon Coulton.
"I'm very surprised when people think The Painting Fool will replace all artists, because I don't think even us researchers think that... People really underestimate the value of knowing a human has produced something."
In a way, the situation is analogous to the issue of mass produced versus hand-made goods in that one has more implied value than the other. Suits made on Saville Row are held to have more worth and be better than generic, mass produced competitors, for example - and that's something borne out of more than just the quality of the final product. There's a whole host of underlying assumptions and emotions that support that impression.
"I was reading about The Binding of Issac the other day, and Ed McMillen talked about his rationale behind the design decisions." says Michael. "As someone who plays games, that discussion really meant a lot to me... even if an AI could create such a thing then it still wouldn't have the same level of meaning to me."
An on-going problem for ANGELINA is being able to integrate assets into finished games...
In the short term meanwhile, Michael doesn't see ANGELINA's function as being to even try and compete with human designers. Instead, he sees it as more of an assistant that could help developers source new ideas or discover new mechanics. It's the latter which excites him most; ANGELINA's latest advance was to discover a way to make players bounce through levels using an elasticity function in Flixel's game library -- a function he hadn't previously known about.
Though crude, ANGELINA is currently making games inspired by articles from The Guardian newspaper.
Michael admits it was a poor mechanic overall, mainly because players had to stand still while they gathered enough momentum to bounce anywhere -- but he says that was an understandable fault given ANGELINA's current limitations.
"It was designed that way because ANGELINA has no concept of boredom. So, yes, it was a bad mechanic -- but it still showed me a thing in the code that I didn't know existed and it showed me how to use it in a game. And that was a very good moment. It felt like something I might have done - like something a human would design."
"We just would design it a lot better, is all."