ButtonMasher: AI takes on humans to create video game

ButtonMasher is our new column about video games and gaming culture – from the offbeat fringes to the cutting-edge innovations behind the latest blockbusters

Making video games that are engaging and creative is always a challenge. Could an AI outdo humans?

That's what Mike Cook of Goldsmiths, University of London, is investigating with Angelina, his AI game designer. Last month, Angelina submitted its first entry to the game-making event Ludum Dare.

"I can safely say that the game created by Angelina has better gameplay and graphics than several other entries," says Alan Zucconi, a game developer and researcher at Imperial College London who also took part.

Cook is developing Angelina as part of his work on computational creativity – looking at whether software can be made to do things that would be considered creative if done by a human. Games are the perfect medium for this work, he says, because they draw on multiple aspects of creativity at once, from sound and visual design to picking rules that lead to an engaging experience for the player.

Angelina has created many games in controlled situations, but this is the first time an AI has competed against humans in such a setting. Ludum Dare is a game jam, held four times a year, in which developers create games from scratch over a weekend. It has been growing in popularity, with 2064 entries to this latest event.

"Making a game is a process that requires months, often years, of work," says Zucconi. Game jams instead encourage people to see what they can create in a few hours.

At the end, the games are posted online and everyone who took part is asked to vote for their favourite. In addition to the time constraint, entries are also judged on how well they reflect a theme picked from a shortlist by popular vote at the start of the competition. This time the winning theme was "You Only Get One".

Most entries incorporated the theme by making it a feature of the gameplay, giving players only one life or one item. For example, in Zucconi's entry, Orbitalis, you have one chance to launch a projectile into the orbit of a gravity well. In another game, called Cat Gentlemans Play: Insult Spinner 10 Cents(pictured above) and created by Calvin Goble and Alix Stolzer of the studio RobotLovesKitty, you have one opportunity to settle a duel between glove-slapping, cat-headed Victorians.

In Angelina's game, To That Sect, the player must collect one type of object and avoid another. The rules are a variation of a pre-coded template, but the rest, including the aesthetic choices, is the work of the AI. The game is set in a place with blood-red walls and unsettling music, and the atmosphere this creates is striking. Voters have described the result as "creepy" and having "a weird little unsettling vibe" – positives from the point of view of creating an engaging experience.

But Angelina does fall down on the theme. "I remember looking at the theme choices beforehand and thinking, 'If this one comes up, Angelina is screwed,'" says Cook. The game does not reflect it particularly well, he admits.

Angelina starts by identifying a key noun in the phrase and using that to search an online database for associated words and images. In this case, it looked up associations for the word "one".

"That was way too general," says Cook. The database gave about 240,000 associations. If it finds too many occurrences, Angelina throws out the first word and picks a related one. This time, it chose "founder" – related to "one" in the sense of being the first or the originator.

Angelina then expands the interpretation by looking up this word in a database of metaphors. This gave terms such as "charmed", "tombs" and "disgruntled child", which it then used to search for suitable colours, images, objects and music.

A future version of Angelina will be better at creating games to suit the theme, Cook says.

Much of what Angelina does when it creates a game is a form of procedural generation, in which content is created by algorithm rather than by hand. It is commonly used by human game designers to create beautiful one-off game worlds. A designer sets certain parameters that provide a style guide or palette, and from this the algorithm generates visuals, music, game levels and even whole worlds. Advances in computer hardware mean that they can produce increasingly sophisticated creations, often on the fly or at the start of each game.

Games like Proteus , MirrorMoon and the recently announced No Man's Sky turn players into explorers, letting them walk across uniquely generated landscapes that no other human has ever seen. Cook thinks in the hands of an AI, procedural generation can be something very different. In the trailer for No Man's Sky, for example, which promises a procedurally generated universe containing everything from plants and animals to planets, we glimpse a worm-like monster. "That's cool," says Cook. "But the concept of a giant creature that tunnels through a planet was created by a human."

If you would like to reuse any content from New Scientist, either in print or online, please contact the syndication department first for permission. New Scientist does not own rights to photos, but there are a variety of licensing options available for use of articles and graphics we own the copyright to.

Could AIs match this kind of surreality? (Image: RobotLovesKitty/Ludum Dare)