IA Logo


IA Information
Communication

Dave Mark's book,
"Behavioral Mathematics
for Game AI
"
is available on Amazon.com!

Other books Dave Mark
has contributed to:

IA on AI


Archive for the ‘Technical’ Category

AIIDE 2009

Wednesday, October 14th, 2009

I’m at AIIDE this year for the first time. I will try to post some comments here or there throughout the week. Considering the speakers that they have invited–Paul Tozour, Richard Evans, Michael Mateas, David Hernandez-Cerpa, Steve Gargolinski and Leland Helper–I figure I’m good for a while.

And the award for Best AI goes to…

Thursday, May 28th, 2009

(This is a repost from my Gamasutra Expert Blog)

At the last GDC, I attended a session by David Sirlin entitled Balancing Multiplayer Competitive Games. Being an AI designer and programmer, this session may seem like somewhat of an outlier in my typical GDCfare. However, a simple strikethrough on the title could yield Balancing Competitive Games – which falls squarely into the AI and simulation programmer’s purview. While the session was interesting in its own right, there was one comment that really broke through the noise for me. Forgive me for paraphrasing somewhat (the audio or video on this session is not up on the GDC Vault), but one of the comments that David made was along the lines of the following:

“If 1% of your art assets are not perfect, not too many people notice. If 1% of your audio assets are not perfect, it doesn’t hurt too much. On the other hand, if 1% of your game balance is off, it can potentially affect the entire game.”

This is remarkably true. If we garner thousands of players who play hundreds of iterations of the game each, the combinatorial explosion of in-game interactions is fairly impressive. That’s a lot of exposure that each and every portion of our game gets. People are remarkably adept at discerning the proverbial “golden path” through the mechanics of our games. Add the communicative nature of today’s internet and the gaming community as a whole can “solve” our games in a matter of days if not hours after release.

Of course, they aren’t really “solving” our games as much as they are finding the weakness(es). That’s like saying a thief is “solving” a lock by picking it. While he may view it as a success, the maker of the lock sees it as a failure. What’s more, the owner of the lock is going to be disappointed that the lock did not serve its intended purpose. If our players manage to, on their own or with assistance of the hive mind, “solve” our games quickly, we are depriving them of the longevity of gameplay that they are paying for. The game is essentially “broken” for them. While there may be transient amusement in finding the magically exploitive combination that works every time, this is soon replaced by a sense of loss at the experience that “could have been.” Remember how funny it was when someone discovered the concept of a Zergling rush in Starcraft? It got annoying quickly, however; no one could play a game that lasted more than 5 minutes.

The unfortunate problem is that this phenomenon is not limited to multi-player games. This is an issue that we face in AI design and programming all the time. Looking at the above quote again – with a twist:

“If 1% of your art assets are not perfect, not too many people notice. If 1% of your audio assets are not perfect, it doesn’t hurt too much. On the other hand, if 1% of your AI is off, it can potentially affect the entire game.

The “AI” in the above statement could be behavioral AI, squad tactics, strategic management, or an underlying simulation model. The bottom line is that those components — “AI” for convenience’ sake — have the potential to make or break the experience of a game.

And now for the irony…

Most game review sites, if they break down the games’ “score” into multiple components at all, usually include the usual players of visual, audio, controls, lifespan, and the somewhat obscure “gameplay.” Notice that there is no hint of AI or balancing in there. I suppose that AI could get wrapped up into that nebulous “gameplay” category… but only because AI affects gameplay so significantly as we noted above. Many people use that gameplay category to herald/rag on things like the story or the pacing. The only time that AI gets mentioned is in the text section of reviews… and then only rarely is it addressed.

We could ascribe some of this oversight to the fact that reviews and players are not as familiar with what goes on “under the hood” of games. Certainly the people inside the industry know how difficult it is to build, tweak, and tune a game so that the last 1% is polished enough to not “break” the game, right? To address this point, I turn to the list of award categories from the Game Developers Choice Awards. May I have the stack of envelopes please?

  • Best Game Design
  • Best Visual Art
  • Best Technology
  • Best Writing
  • Best Audio
  • Best Debut
  • Innovation
  • Best Handheld
  • Best Downloadable
  • Game of the Year

Hmmm… no “Best Artificial Intelligence?” No “Most Balanced Simulation Mechanics?” No “Deepest Character Personality?” No “Most Convincing Squad Tactics?” Even “Most Life-like Animation” would be nice – although that tends to get swallowed up by the visual art category.

For a discipline that can make or break a game with that dreaded “sub-optimal 1%,” there isn’t much in the way of representation in the GDCA. Sure, these issues could go into the categories of game design, technology, or innovation… but do they? How much attention to we really pay to benefits of AI in our games? Or do we only notice it when it becomes the proverbial “squeaky wheel” and makes the game look bad? Even then, there is no award for “AI Good Enough to Help Us Avoid a Bad Review.”

The Rise of AI

The problem is, AI is now becoming the focus of a lot of game studios. Now that the visual aspect of games is asymptotically approaching the grail of photorealism, orchestrated game soundtracks are available on Amazon, and game writing has finally achieved acceptance as a viable art formrivaling Hollywood and the fiction literature industries, the AI of games is more exposed. Players (and somewhat later, dragging their feet like a petulant toddler, producers) started noticing that AI was not up to par with the rest of the industry.

The result was that AI “departments” went from one person (or less!) to entire conclaves of programmers dedicated to the behavior, animation, and simulation of those very pretty, very impressive-sounding characters. There are now even sub-specialties in the AI arena because there is simply too much for any one person to keep up with. Rather than being an afterthought before ship, AI people are now invited to sit in with the designers at initial pre-production meetings. There is even a growing number of “AI Designer” jobs being created to sit in that gap between pure designers andthe hard-core AI programmers. All of these AI designers and programmers are increasingly becoming part of the “critical path” to the success of a game. The pressure is on them to make sure there isn’t that 1% fissure through which all of the hard work of the rest of the team can fall through into the abyss of “a broken game”.

And where is our cute little trophy? Where is our faux-wood plaque stating, even to people who come into our humble office, that (being all out of bubble gum) we kicked some serious algorithmic ass?

Who are Those Geeks?

Last year, I was part of the formation of the AI Game Programmers Guild. Our first, and most self-serving, mission was to be able to exchange ideas with each other. We also wanted to eventually have a place where we could recognize each other’s successes with our own little awards ceremony. For what that’s worth.

Our first public act was to organize the 2-day AI Summit at GDC. This event was so well-attended that the fire marshal had to stop people at the door. My impromptu poll during the welcome session showed that the demographics of the 220+ people was mostly existing AI programmers (many of whom are now in the guild), and soon-to-be AI programmers.

Oddly, and somewhat to the amusement of the programmers in the room, there was only one “media” person in the room. This, despite the fact that the Summit showcased some of the people responsible for the best and most innovative AI ever created in the game industry. If I was only marginally more cynical, I would interpret this as the collective media saying “bah… who cares about AI?”

On the other side of the equation, many of the Summit presenters (including myself) were accosted repeatedly throughout the week and thanked wholeheartedly for what the attendees viewed as a messiah-like arrival of AI to GDC. To be fair, GDC has had AI sessions in the past, but it has not kept pace with AI’s place in the industry. I believe that is why the Summit was accepted with almost rabid enthusiasm by the attendees (which, if true, would have involved Animal Control in addition to the Fire Marshall). It is also why the GDC folks have already invited the AIGPG to run the AI Summit again next year. (Note to GDC… a room for 220 isn’t going to cut it next year.)

So, after a heady two days on the second floor of Moscone West, we all wandered across to the Game Developers Choice Awards… only to feel a let down. Does anyone really care about what we do? We know we make a difference. A BIG one. The industry knows we make a difference. But where is that recognition? Where are the accolades? We can only hope that is going to change; that someday wegoing to hear…

“And the award for Best Artificial Intelligence goes to…”

2009 GDC AI Roundtable Audio

Sunday, April 12th, 2009

I have just posted the audio from the GDC AI roundtables on my GDC 2009 page. You can either stream it from the plug-in or you can download it to your own machine.

Choices: Not Just for Players Anymore

Friday, April 10th, 2009

In a recent opinion article by James Portnow entitled The Problem Of Choice, the idea was posited that there are two types of decisions that a player can be faced with in a game: “problems” and”choices”. The former is something that involves a “right answer” such as a mathematically optimal solution. Therefore, theoretically it can be solved. We are all familiar with such challenges ingames — especially when designers make them all too transparent.The other type of decision is the “choice”. These are a little more amorphous in that there is no “right answer”. Games such as Bioshock (i.e. the Little Sisters) have these elements but others such as Black & White and the two Fable games are rife with them. In fact, the entire game mechanic is built upon the idea of “make a choice and change the whole experience.”

While I agree with the excellent points that James made, I believethat this same mentality can be extended to the realm of AI as well. In fact, Imade this point in my lecture, Breaking the Cookie-Cutter: Modeling Individual Personality, Mood, and Emotion in Characters at the AI Summit at GDC a few weeks ago.  Specifically, I suggested that the incorporation of differences between characters can enable game design choices for us as developers which, in turn, enables gameplay choices for our audience. However, it is not simply the incorporation of personality, mood, and emotion that does this. It is often even simpler than that.

As programmers, we deal in a world of algorithms. Algorithms are, by definition, a series of steps designed to solve a particular problem. Even the ubiquitous yet humble A* pathfinding algorithm is sold as guaranteeing to”return the shortest path to a goal if a path exists.” The emphasis is mine. It returns the shortest path — the best decision. Now that we are using A* for other uses such as sifting through planning algorithms todecide on non-path-related actions, we are subscribing to the same approach. What is the best action I can take at this time? Unfortunately, that leads our AI agents along the same path as the player… “how can I solve this game?” The simple fact that our agents are looking for the one solution necessarily limits the variety and depth that they are capable of exhibiting. 

The irony involved here is that, in designing things this way, we cause our agents to approach something that should be a choice (as defined by Portnow) and turn it into a problem (i.e. somethingthat can be solved). Whether there is any “best” decision or not, our agents believe that there is… “belief” in this case coming in the form of whatever decision algorithm we happened to design into their little brains.

The solution to this is not necessarily technical. It is more of a willingness by designers and AI programmers to allow our agents to either

a) not make the “best” decision all the time, or

b) include decisions in the design to which there is no”best” solution at all.

Unfortunately, we have established a sort of industry meme that “we can’t allow our agents to do something that is not entirely predictable”. We are afraid of losing control. Here’s a startling tip, however… if we can predict what our agents are going to do, so can our players! And I nominate predictability as one of worst air leaks in the tires of replayability.

One of the quotes that I used in that lecture and in my book on behavioral AI is from Sid Meier who suggested that a game is “a series ofinteresting choices”. It is a natural corollary that in order for the player to make interesting choices, he needs interesting options (not math problems). One of the ways that we can present those interesting options is to allow our agents to make interesting choices (not solve problems) as well.

Fun with a GA-cycle!

Friday, December 19th, 2008

Just happened to StumbleUpon this page while I was eating at my desk. Apparently, the author is using a genetic algorithm to construct a cycle-type device that will go over the bumps. If you watch for a few minutes you can see it evolve from a mass of confused wheels, weights and bars into something that actually moves… into something that actually climbs over the terrain.

Each generation has a population of 20. Once each of the 20 is tested and scored (left side scroll), we advance one generation. The graph in the upper right apparently shows the fitness function results from one generation (green) to the next (black). It’s auto-scaled so the highest one sets the vertical range.

It doesn’t take too long to see familiar configurations appear. You kinda start rooting them on, too!

Kinda nifty.

Damian Isla’s 2005 AIIDE Slides

Friday, July 4th, 2008

Got linked to this by Paul Tozour. Here are Damian Isla’s (Bungie) slides from his 2005 AIIDE presentation on “spatial competence” entitled “Dude, where’s my Warthog?” It includes info on a ton of the stuff he/they did in Halo 2. Included is information on pathfinding – especially with regard to how we (as people) process spatial information. It’s nice to see someone else tapping into psychology as a source for potential solutions for game AI.

Fantastic stuff… and left me dying for the audio.

Why always the shortest path?

Tuesday, May 27th, 2008

Christer Ericson, Director of Tools and Technology at Sony Santa Monica (the God of War team), has posted a teaser of sorts on his blog, realtimecollisiondetection.net. In Don’t follow the shortest path!, he points out the near fanatical restriction to have the heuristic in A* be admissible, which is defined as not overestimating the theoretical path cost to the goal.

When the heuristic (h) is admissible, A* will return the shortest possible path. However, it also takes longer than when h is not admissible by the above definition. Even when not admissible, A* will find the path, but it may not necessarily be the shortest. His point is that we are spending a lot of calculation time achieving that shortest path when plenty of other paths would do.

When h(x) is admissible, meaning it doesn’t overestimate the true cost of reaching a goal, A* is guaranteed to find a shortest path (if one exists). And herein lies the problem: much too much effort is spent in games in finding the shortest paths! There is a near obsession with admissible heuristics, which is completely misguided! Who the heck cares about the shortest path?! In our everyday lives we rarely, if ever, take a shortest path. Instead, we often optimize for search effort, taking a path we’re familiar with (which we’ve chunked or otherwise memorized so as to require no search). Well, the same applies to games and the A* algorithm. We can reduce search effort, sometimes drastically, by forfeiting the guarantee of an optimal shortest-path using nonadmissible heuristics.

He quotes a few other researchers in the column and makes a couple of other points. While I like the idea, I wish that he would have shown some examples of why this sort of fanaticism is unwarranted… or at least overrated. Thought-provoking read, however.

In my opinion, he’s on the right track. In my weekly Developer Discussion column I have even made similar points about our addiction to exactness where it is not necessary and speed where it is not warranted. There are times when we are either simply not solving the right problem or we are approaching it with a level of granularity that significantly overshoots what it is we are trying to emulate. Christer makes that point briefly above when he points out that we humans rarely take the exact shortest path. When weighed against the diminishing returns of calculating it, is it worth it?

Exploring Emergence

Tuesday, May 27th, 2008


I was using StumbleUpon just to kill some time and I… er… stumbled upon this site. It is from a couple of guys, Mitchel Resnick and Brian Silverman, in a group called the “Lifelong Kindergarten Group” at the MIT Media Lab.

Using Java apps of Conway‘s famous “Game of Life” and variants on it, they describe and show, in very simple terms, how emergence… er… emerges from very simple rules. The individual blocks don’t understand the big picture… nor do they care. They just follow their own local rules. However, we perceive behaviors and interactions that aren’t really there.

Old concept, but well-done examples.

GDC 2008: Halo 3 – Building a Better Battle

Wednesday, March 5th, 2008

Damian Isla of Bungie has uploaded his slides from his GDC presentation (which I haven’t written up my commentary on yet). He also discusses the history of the “Objectives” system that they used in Halo 3 on this blog post at Game/AI.

I will be breaking down his presentation in a few days (I’m still trying to get caught up).

Other coverage of GDC sessions

Friday, February 29th, 2008

I have kinda entered a vortex of browsing through other people’s GDC coverage – especially on the sessions that I could not attend. Note that I don’t necessarily agree with everything that people have posted here – I’m just including them so people can have a broader picture. Here’s a partial list of (loosely) AI-related stuff that I have found so far:

GDC: Storytelling in Bioshock (Not really AI, but interesting)
GDC: Rules of Engagement
GDC: Rules of Engagement Part 2
GDC: A Q&A With Sid Meier (Not really AI… but it’s Sid!)
GDC: Creating a Character in Uncharted (animation AI)
GDC: Creating believable crowds in Assassin’s Creed (group behavior and many units)
GDC08 Notes – Streaming Open World Pathfinding (Obviously pathfinding)

A thread at Game/AI where Jeff Orkin (F.E.A.R. AI mastermind) asked what we all saw at GDC it made for an interesting AI discussion.

Add to Google Reader or Homepage

Latest blog posts:

IA News

IA on AI

Post-Play'em




Content 2002-2010 by Intrinsic Algorithm L.L.C.

OGDA