Article
i/2008/06/chipsandsalsa

Working Backwards: Designing the AI First

Dave Mark on July 1, 2008

This week’s developer discussion on AiGameDev.com is introduced by Dave Mark, CEO and AI designer at Intrinsic Algorithm. Where does AI find its place in the game design process? Let him know what you think and post a comment below!

There’s a reason why we don’t call it salsa & chips.

I’m a big fan of chips and salsa. I have my favorite salsas — some off the shelf and some at restaurants. It’s only a slight stretch to say that I could actually select a salsa based on my mood at the time. But the chips? To be honest, I don’t care so much. The chip is only a means of transportation for the salsa. It is a delivery mechanism only. A means of conveyance of what is really important… the salsa itself. The only time I think about the quality of the chip is when it is really bad. At the point, there is something about the quality of the chip that takes it out of its role as a content provider and becomes a distraction. It’s not meant to be the focus. That’s the way of the chips and salsa world.

Given that… no one probably goes out and designs the chip first. Even restaurants that serve it as a focus probably didn’t say “Ok. Now that we have this really cool tortilla chip, let’s see if we can find some salsa around here someplace.” You would think that they spent a lot of time designing just the right salsa, making sure that every nuance of the flavor sensation that they wanted to express, and then turned to the chip dudes and said “Look… all we need is for you to get this masterpiece up to the person’s face. Don’t screw it up.

And yet, unless you are willing to eat your salsa with a spoon, the chip is, indeed, a required component of the “chips and salsa” experience. If the chip is not right — especially if it is distractingly poor — then the salsa is compromised by association. And that makes the salsa guys a little grumpy.

But what if the situation were reversed somewhat? What if someone decided to design the salsa to match the chip? What if a bunch of chip designers got together and said “we are sick of the chip being simply a means to an end! We want to make it the focal point of the experience!“? They may even decide that the salsa should be crafted specifically to highlight particular taste features of the chip. Heck, how thick should they make the salsa based on the surface characteristics said corn-based masterpiece? What changes if you design the delivery mechanism first and then design what is normal the focal point to match? How different does the experience become? (Note: I’m going to eject from my metaphor before it breaks down completely. I’m also getting hungry.)

Putting the AI Out Front

At this point, it may be a bit obscure as to where I’m headed with this. (Unless you are exceedingly clever and read the title of this week’s column.) However, there is a thread floating around in the AiGameDev.com forums under the subject “Game designs that showcase AI.” The concept of that thread is slightly obscured by the vague wording of the title. Forum member JamesFord42 wasn’t looking for existing games that showcase AI, but rather for game design concepts that have, as a notable feature, an AI technique or concept that is “out front.” Examples he gave of the games he had in mind included Creatures, Nintendogs, and Façade. There were a few other suggestions in the thread — but it really hasn’t had a chance to mature yet.

The Norns in Creatures were almost nauseatingly cute.

What got me thinking, however, is what would happen if you set out on a game development quest by designing the AI first? I suppose that you can make the case that Creatures was likely done that way. There are some obvious, little-used AI techniques in play there. For example, I can see the conversation that would include “if we were to make a game using genetic algorithms, would it make sense to use it for… uh… genetics?” (For an in-depth analysis of the AI of Creatures, see the AIGameDev article, “Evolving with Creatures’ AI: 15 Tricks to Mutate into Your Own Game“.) Façade is similar in the sense that the game grew out of a specific, new-fangled AI concept that the developers were trying to showcase. (Façade Specifics) But I want to set those cases aside for purposes of this premise.

Putting the AI at the Core

What I want to think of is what would happen if you took the standard game concept — as standard as the ubiquitous pairing of chips and salsa — and designed the AI first and only then fleshed out the game? I’m sure that there are loads of pitfalls along this road I’m staggering along here. However, often a mental exercise such as this isn’t necessarily logistically feasible. It does make one think. And I suppose that is what I’m trying to accomplish.

There are certain genres that lend themselves more to this idea than others. For example, it is rough to do this sort of thing on a story-based game (Façade aside). Something along the lines of an RTS or TBS would be more conducive to this exercise. For example, Warcraft and Starcraft likely created the concept, created the units, designed their abilities, did much of the initial balancing of stats, and… in the process of all of this… the AI of the individual units and enemy player AI sort of falls out. Only then did they probably work all of the above into the the single-player campaign as a way of introducing the units via some semblance of a story.

Ghandi from Civ 4. Do you think he looks a little like a Norn from Creatures?

The evolution of the Civilization series has touched on this as well. While Sid may have had a concept of the game at first and then set about designing AI that served his needs, much of the progression of the series was driven by changes in AI. In fact, Brian Reynolds gave an excellent GDC lecture in 2004 entitled “AI and Design: How AI Enables Designers”. In that, he explained how observations of gameplay in one game would lead to an AI fix in the next installment. More importantly, he spoke of how the AI advancement actually led to new and different design features. And that is where we get close to designing the chip first and letting the salsa follow.

What’s the Payoff?

Probably a decent way of approaching this is to ask the question “why?” What’s the payoff in doing things this way? I would like to think that by designing the AI, it would be an effective way of determining the boundaries of what could be performed in the game. That is, “what is the maximum that can we pull off here?” By answering that question, it sets up the parameters for the experience much as a painter needs to see what colors he has in his supply before he can decide what he is going to paint. (Or alternately, much like how, while I was in college, I decided what I was having for dinner based on what I happened to have in the cabinet and all the, uh… creative ways I could combine them.) For example, if you decide after a massive brainstorming session that you can really do some nifty stuff with subtle facial expression of emotion, you may want to flesh that out (so to speak) and see where it leads you.

Note that there is no shrimp-flavored ramen in this picture. Not sure about the oregano.

Speaking of “where it leads you”, I really don’t have any idea where I’m headed with this. Thankfully, the premise of this column is “developer discussion”. I just whip up whatever I have available and see where you guys take it. (Which reminds me of a particularly sensational dining adventure based on shrimp-flavored ramen, Velveeta, and oregano.) I guess what I want to suggest this week is that perhaps we have been spending too long thinking of AI as only a content delivery mechanism — the tortilla chip as it were. Our role for so long has been to only serve up the main course that the designers whip up. And that may not be a good thing. Maybe we haven’t considered what we could accomplish if we were to push the limits of what is truly a powerful component of interactive entertainment and then design a game around whatever AI masterpiece it is we come up with.

(Final note: Never mix Velvetta and shrimp ramen. On the other hand, it may work well with the chips.)

Discussion 9 Comments

Ian Morrison on July 2nd, 2008

Dave, I am in AWE of your ability to grab the wierdest metaphor available and then just run with it. It's a neat subject matter, and, to be honest, I think that's really the only way to go. Game mechanics should be designed with at least a nod to the way the AI will interact with them. If you design the mechanics beyond what the AI is capable of matching, the gap is going to show and your game AI will be dismissed, but if you scale the mechanics back (or make them easier for the AI to deal with) your AI can look proportionally more competent!

zoombapup on July 2nd, 2008

It does make you think. I tend to prefer to think of how much I can bring to life the characters I'm trying to create for the game. How much can I make the player really want to interact with this AI? In terms of game design, I'm definitely a ludologist rather than a narratologist, but essentially I'm talking about making the AI ludology work well enough that it enables the formation of a player/NPC narrative. Thats what is interesting me right now I think. How close can you get to making an empathic experience for a player based on current techniques.

Dave Mark on July 2nd, 2008

It's a developer discussion column. My job is to elicit comments of all types. (If Alex and I look away for a bit, sometimes I manage to elicit pr0n spam as well... although we aren't sure how...) However, the Halo 3 comment may stir up more nastiness from people than anything I have written. Did you seriously think the AI was poor? (Perhaps this is a discussion for the forums lest the angry savage hoardes over-run us all.)

Dave Mark on July 2nd, 2008

Incidentally, with apologies to Richard Evans et al, I want to acknowledge that I completely forgot to put "Black & White" in the column as an example of a game that was based entirely around an AI technology premise. I hope he doesn't slap me soundly, dress me in a spiky leash, and send me off to eat trees and rocks.

PaulTozour on July 3rd, 2008

Games are about interactivity. Interactivity should always be designed first. There's nothing "backward" about that -- it only seems that way because we so often approach things from the opposite direction, starting by worrying about the story and the art style and all the other things that really should be dependent on the core interactive experience of the game. In games where AI has a large role in shaping the player experience, there's no way to design that interactivity without designing AI from the start to go hand-in-hand with the player experience.

Dave Mark on July 3rd, 2008

I agree. A simple rhetorical question would be "interacting with what? And how?"

Ian Morrison on July 4th, 2008

Actually, Ryan, Halo 3's AIs DO get smarter and more aggressive as the difficulty cranks up. By the time you hit Legendary, they've generally gotten very aggressive. If I remember correctly, the enemies are getting additional behaviours and such unlocked, in addition to simply surviving longer by virtue of having more health.

Andrew on July 4th, 2008

Great discussion, or rather thoughts. I think many games would have benefited from AI being built first, or designed first (or with it in mind). Too many games sell on the singleplayer, and suffer for it, for instance - while the AI might not be the total focus, there are obvious times when the AI is entirely scripted in a game where you might have thought, if the AI was designed with the circumstance in mind and the game evolved around it, the situation would be much more natural. There haven't been many games which have had the design centered around AI, so I wish there were more examples of good and bad games that did it, it'd be more interesting to discuss those.

Dave Mark on July 4th, 2008

[quote=Ian Morrison;3392]Actually, Ryan, Halo 3's AIs DO get smarter and more aggressive as the difficulty cranks up. By the time you hit Legendary, they've generally gotten very aggressive. If I remember correctly, the enemies are getting additional behaviours and such unlocked, in addition to simply surviving longer by virtue of having more health.[/quote] The first time I switched on 'Legendary' and the grunts started lobbing sticky grenades at me, I knew I was in trouble.

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!