These notes describe a needs-based AI for action selection and performance in game characters. It’s a very flexible and intuitive method for building moderately-complex autonomous agents, which are nevertheless simple and highly efficient.
In short: needs-based AI is based on agents having a set of needs, and performing actions that fulfill them. These needs represent independent, often conflicting motivations, such as hunger, thirst, or boredom. The agent’s action selection is driven by wanting to fulfill these needs – but one always comes at the cost of the others.
My own exposure to needs-based AI came first from the Sims (first at Northwestern University, and later at EA/Maxis). I have since re-implemented variations on this approach in two games: a very popular web game, and an RPG. I found the technique to be extremely useful, even across such a range of genres and platforms. But unfortunately, it’s not widely known.
In terms of its historical context, needs-based AI is a younger relative of behavior-with-activation-level action selection methods, common in autonomous robotics [1]. However, it seems to have been independently rediscovered in the gaming context, with great results. Sims was perhaps the best known game based on this model. A particularly interesting contribution of the Sims was also a new action representation, where the behavior/activation data is distributed “in the world” in the game, and therefore very easily configurable.
Unfortunately, very few resources about the original Sims AI remain available; of those, only a set of course notes by Ken Forbus [2] and a Sims 2 presentation by Jake Simpson [3] are freely downloadable on the web. My goal in this set of notes is to present some of this knowledge to a wider audience, based on both what I learned about the original Sims AI, but also my experience building such systems from scratch for other games.
This will come in three parts:
Enjoy!
[1] for an overview, see Arkin’s Behavior Based Robotics, p. 141 and on.
[2] http://www.cs.northwestern.edu/~forbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/frame.htm
[3] https://www.cmpevents.com/Sessions/GD/ScriptingAndSims2.ppt
robert zubek / blog :: Needs-based AI: part 1, needs and the main AI loop | 23-Sep-09 at 9:21 am | Permalink
[...] (This note is a part of the needs-based AI series) [...]
robert zubek / blog :: Needs-based AI: part 3, action performance | 23-Sep-09 at 9:21 am | Permalink
[...] (This note is a part of the needs-based AI series) [...]
robert zubek / blog :: Needs-based AI: part 2, advertisements and action selection | 23-Sep-09 at 9:22 am | Permalink
[...] (This note is a part of the needs-based AI series) [...]