Reading The Papers: Ludus Ex Machina

Original Author: Michael Cook

I haven’t discussed my own research in this column yet, but you may know that I’m interested in automating the process of game design in its entirety. At the highest level, game designers produce mechanics that connect to our understanding of reality – gravity makes you fall, projectiles hurt things they hit, touching food heals you – and through this convey meaning that can be anything from representational to metaphorical and artistic. Can machines do this? This week on Reading The Papers: a system that tries to connect the real world to game mechanics.

We’re reading read Mark’s excellent summary of some elements of the work here). The paper contains a lot of interesting discussion about game generation and the nature of game design – and I recommend flicking through the whole thing as a result – but we’ll be focusing on a section describing a simple system for generating WarioWare-like minigames from open-ended textual inputs. We’ll look at the kinds of resources leveraged to make this happen, the pitfalls of the approach, and what other resources developers might find useful.

The system described in the paper takes a verb and a noun as input, such as shooting ducks and then attempts to generate a short, simple minigame based on the input. The minigames are inspired by the game WarioWare, which tasked players with completing a series of quickfire minigames that all lasted just a few seconds each. Each one has a simple core action the player has to complete, and a strong theme for each one that relates to the mechanic somehow. In the example at the top of the article, the player must press an action button repeatedly to make the athlete squat a certain number of times within a short time limit.

The main focus for this system is not generating the game mechanics themselves. Instead, it relies on a small collection of existing game mechanics, and focus on intelligently relating the noun/verb pair with one of the mechanics that already exist. They identify a few abstract game ideas:

  • Avoid games, where one object must avoid colliding with a group of other objects (the player can control either side) for a time period.
  • Acquire games, where the player must find an object within a time limit.
  • Fill games, where the player must fill a progress bar within a time limit.

These abstracts are implemented through a few concrete game templates, with specific roles that the player can take on, starting configurations of objects (such as an Avoid game with one avoider and three dangers to avoid) and so on. So you give your input phrase – shoot ducks – and the system now has to decide two things: which mechanic is most appropriate, and what objects are included in the game in which roles?

In order to start solving these problems, the authors call on two great resources for this kind of thing: Ask it about ducks, for instance, and it’ll tell you that they can quack, that they have feathers, and that they can be shot.

How does this help us? Well, the system the authors write about in the paper associates a set of verbs with each mechanic and game template. So an Avoid game where the player is the attacker might be related to verbs like injure, or attack. If any of these verbs match, it’s easy to make the connection between the input data, and a particular game mechanic.

The chances are it won’t match exactly, however, and when that happens the system tries to calculate the distance between the input verbs and nouns and each type of game template it has in its database. It does this using both WordNet and ConceptNet. WordNet can help make connections between similar nouns, thanks to its data on synonyms and hypernyms, and ConceptNet can make connections between verbs by examining links in the graph, in a similar manner to how Argument Champion worked.. From shoot pheasant the system makes the connection with the Avoid mechanic, where the player tries to target a pheasant.

This is something of an ideal example, of course, but if you’re concerned that a completely open input might be too unpredictable, you can always try and restrict inputs, or only generate games when you have a minimum level of confidence in your results. A game like Scribblenauts doesn’t claim to be able to show you everything – but what it can do is incredibly entertaining. A simple implementation of this minigame generator with a restricted input language (instead of all nouns, maybe restrict it to jobs? Animals?) could add a lot of interesting content to the right kind of game.

One of the reasons I wanted to discuss this work is because it’s a very clean example of how to use ConceptNet in a procedural generation system, and tools like ConceptNet have a huge potential to generate interesting content for games. As a footnote here, I’d like to mention Threatened. Disturbed.

It’s not a perfect tool. It has some crazy potential outputs. But there’s a lot of data tucked away in there, and a lot can be done with it. I prototyped a very silly demo in half an hour that uses Metaphor Magnet to generate patron animals for RPG heroes. It does this through a very straightforward lookup of a noun and returns metaphorical interpretations, but also takes advantage of Metaphor Magnet’s positive/negative spin to provide different angles on a particular noun.

WordNet, it’s hip cousin Wordnik, ConceptNet and Metaphor Magnet are just a few examples of amazing web resources that can be leveraged for new and unusual procedural content generation – content that isn’t abstract levels or weapons, but content that is based on knowledge of the real world and the culture we live in. That’s the kind of off-the-wall procedural generation I want to see more of.

Where to Find More

Michael Mateas is Associate Professor at the equally legendary UC Santa Cruz. Both are very approachable chaps and doing extremely interesting research right now. Get in touch with them if you want to know more!

A little announcement besides: I’m going to be talking at Indievelopment in Utrecht this April. I’m probably going to be talking about some of the things in this week’s column, as well as general things I’ve learned through ANGELINA that might be useful to people making games today. It’s going to be a lot of fun – please say hi if you see me there!