The AI Director of Darkspore

I gave a keynote at Game AI in Paris last week.  Thanks again to Alex and Petri and staff for inviting me.  Excellent conference.  And a big statement to have a design-focused talk as one of their keynotes.  Appreciated.

The keynote was secretly 3 talks in 1:

  1. “What is Game AI?”,
  2. “The AI Director in Darkspore”, and
  3. “Improved AI Design”.

In the first section, I walk through some of the history of AI and why that has failed us, and why we need a better definition for Game AI.  I derive my definition of Game AI, “algorithms that replace randomness“.  I claim there are 3 pillars of game AI: character AI, strategic AI, and AI direction, and correspondingly define AI Direction as “algorithms that replace randomness that manage experiences”.

In the second section, I discussed how we used AI Direction in Darkspore.  I focus on 2 out of the 10 in particular: how we created the random enemy selection buckets and how we layered “spike” and “wanderer” spawn points to add drama and flow to the game.  Unlike Left 4 Dead, Darkspore’s AI Director called for a fixed challenge per level instead of a player-adjusted one.  I discuss how we tackled challenge while still bringing surprise, replayability, and interest to the table.  I showed how we tested the Director, and briefly covered how to tackle the tricky problem of debugging experience management.  Then I go into some of the technical numbers on how the Darkspore AI Director works, and why the numbers are more important then the code.  I call that AI Design.

In the last section, I talk about the importance of AI Design.  I look at how AI Design was actually most of the work, and argue that AI Engineers are the best positioned developers in the industry to make new and interesting kinds of games.  I urge them to look for places where we use traditionally randomness, and see them as opportunities to create better gameplay.  I debate Michael Mateas that AI Engineers need to understand Design in order to make the games of the future.  We talk a little bit about Chris Hecker’s call down for AI Design at AIIDE 2010.  And I share how I’ve found ways to do design in my projects and trained to be a better designer.  Finally, I look at some of the things we left random inside Darkspore instead of AI Directing, and discuss whether or not that might have been a mistake.

AIGameDev.net will be posting the full presentation soon, along with audio and video.  In the meantime, I’ve uploaded the powerpoint slides with notes, as well as a smaller pdf without the notes:

AI Director in Darkspore GameAI 2011 (pptx with notes)
AI Director in Darkspore GameAI 2011 (pdf)

If you haven’t seen it my AIIDE 2009 talk on narrative in AI Director is highly relevant to this talk, expanding on it greatly.

Enjoy!  Please share your thoughts.  I’d love to hear your feedback.

AI Director in Darkspore GameAI 2011 (pptx)

About these ads

3 thoughts on “The AI Director of Darkspore

  1. Hi Dan,

    I’m doing some analysis of AI directors in commercial games for my thesis work, and I’m hoping that you’ll be willing to answer a few questions about the AI Director in Darkspore. I sadly couldn’t attend either of your talks on this in person, but I’ve gone through your slides several times and feel like I have a decent handle on the overall picture.

    Here are my questions:

    #1: You mentioned that you use the player’s past performance (over the previous 2 spikes) to determine the size of the next spike.

    a) Do you compute the player’s performance purely by checking her gameplay stats (e.g., damage dealt so far, current health), or do you use changes in the game state to update a more abstract model (like how getting damaged in Left 4 Dead increases the director’s “intensity” estimate)?

    b) If you check gameplay stats, which ones do you check?

    c) If you update a more abstract model, what do the values in the model represent?

    #2: There’s a table that shows pacing/difficulty values for different combinations of minions & lieutenants.

    a) Does the difference in colour (clear vs. pink) distinguish between Medium and Hard spikes?

    b) When the director decides that a Hard spike should be next, how does it pick a particular Hard mob to spawn? (e.g., Why spawn 12 with 4 as Lts instead of 16 with 6 as Lts?)

    Thanks for your time!

    • #1: You mentioned that you use the player’s past performance (over the previous 2 spikes) to determine the size of the next spike.

      a) Do you compute the player’s performance purely by checking her gameplay stats (e.g., damage dealt so far, current health), or do you use changes in the game state to update a more abstract model (like how getting damaged in Left 4 Dead increases the director’s “intensity” estimate)?
      It was purely current health and number of creatures alive. It's identical to L4D's intensity using health, except we also had 3 lives to take into account, (afaik, I asked Michael about it years ago). Gameplay stats are game state. I've looked into using more complicated metrics but they haven't been as effective. I did use slightly more sophisticated state for analyzing player intensity in playtests (the heat maps in the talk), but that didn't feed into the Director. The best measurement we found there was number of monsters on screen combined with current health in the most extreme cases.

      b) If you check gameplay stats, which ones do you check?

      c) If you update a more abstract model, what do the values in the model represent?
      It really was brutally simple for Darkspore. If you look at the matrix it's always a binary choice, so it's always "doing good" or "not doing good". More complex models haven't proven effective yet (what else does the player care about?)

      #2: There’s a table that shows pacing/difficulty values for different combinations of minions & lieutenants.

      a) Does the difference in colour (clear vs. pink) distinguish between Medium and Hard spikes?
      The pink means "too large". We never spawned groups of pink sizes (we had to cap # of creatures on screen and max challenge at some level). Medium spikes got a significantly smaller challenge value then hard spikes, like 50%, whereas easy spikes were even easier. (Challenge started around 50 and increased over the course of the level. As you got closer to the end, the max challenge in a hard spike ramped up to 320. So early hard spikes were way easier then late medium spikes, for example.)

      b) When the director decides that a Hard spike should be next, how does it pick a particular Hard mob to spawn? (e.g., Why spawn 12 with 4 as Lts instead of 16 with 6 as Lts?)
      That was a whole separately tuned algorithm, based really on how difficult we felt Lts were. Basically each # of lts had a customly tuned % chance to spawn. Simple but effective. We used that technique everywhere we could get away with it, which is often. Part of why the overall algorithm is so simple.

      And we tuned those Lt numbers up until ship. It was very significant to the overall difficulty of the game (4 Lts were waaaay harder then 0 Lts). In fact, that chart isn't the chart we shipped with - we re-tuned it several times late to reflect that Lts were more challenging then expected. For example, iirc we never spawn 6 or 7 Lts. This is all stuff we basically had to learn by playtesting until it felt good. I'd run through the game 20+ times for every change we made at lightning speed and a few times at normal speed to understand the impacts of every change. Even <.5% changes were noticable in certain parts of the algorithm.

      • Hey Dan,

        Thanks for your comments! I’d like to rephrase a couple of my questions:

        1) Concerning measuring the player’s performance:

        a) Given that the output is binary (“doing good”, vs. “not doing good”), is that calculated based on checking if some combination of the player’s health (across 3 heroes) and number of enemies remaining was above or below a threshold? Say, something like the following, where A, B, and C are constants?:

        performance = A * (health1 + health2 + health3) – B * (num_enemies_alive);
        doingGood = (performance > C);

        b) Did you compute the player’s performance on the fly whenever you needed it? Or was it stored (and kept up-to-date) in RAM somewhere, to be queried when needed?

        Also, in case you haven’t seen it, Michael Booth put out an extremely detailed set of slides on L4D’s AI Director, stemming from a talk that he gave in 2009 at AIIDE:

        http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf

        Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s