IA Logo


IA Information Communication

 

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


Previous Posts

Archives

IA on AI

AIIDE 2009 - AI Challenges in Sims 3 - Richard Evans

This is the rough dump of my notes from Richard Evans' AIIDE 2009 invited talk on the AI challenges they faced in developing The Sims 3. Some of it was familiar to me as being exactly what he presented as part of our joint lecture at the GDC AI Summit in 2009. Other portions of it were new.
Specifically, I enjoyed seeing more about how they handled some of the LOD options. For example, rather than parsing all the available actions, a sim would decide what lot to go to, then what sim to interact with, and then how to interact. Therefore, the branching factor was significantly more manageable.

Another way they dealt with LOD was in the non-played Sims. Rather than modeling exactly what they were doing when (while off-screen), they made some general assumptions about their need for food, rest, taking a leak, etc. These were modeled as "auto-satisfy" functions. For example, if you met a sim close to dinner time, he would likely be hungry. If you met him a little later, he would present as being full.

Additionally, as you will see below, the entire town had underlying simulation mechanics that balanced how many people were dying and being born, what gender they were (on average), and even where they were moving to and from. They modeled much of this with a very simple geometric interface early on so that they could test their mathematical models. Same with the simple behaviors. He showed video demos of these models in action. This also allowed them to speed up time to ridiculous levels and let the sim run overnight to test for situations that would tip the sim out of balance. Lots of fun!

He also mentioned about how the behavior selection was done. This was important to me in that he showed how they used some of the same techniques that I talk about in my book. Specifically, he uses a utility-based method and selects from the behaviors using weighted randoms of the top n selections. Excellent work, sir!

The following are my raw notes.

AI Challenges in Sims 3
Richard Evans

He mentioned the website dedicated to Alice and Kev. The author simply sat back and watched the Sims do their autonomous behavior and wrote about it.

1. Hierarchical Planning
2. Commodity-Interaction Maps
3. Auto-satisfy curves
4. Story progression


Instead of nesting decisions about which act to perform on which person in which lot, you chose a lot first, then chose a person, then chose an action.

O(P + Q + N) instead of O(P * Q * N)

Data-driven approach so that the venues populate appropriately (e.g. restaurants)

Optimization

If you are full, don’t even consider eating as a possible selection of what to do.

Auto-satisfy curves for LOD. That way you don’t have to simulate the off-screen Sims. Assume that they have eaten at the right times, etc.

Other Sims need to progress through life the same way that your Sim does. Age, marriage, children, career, move, etc. Long-term life-actions are simulated at LOD.

The town has various meta-level desires. (Gender balance so that we don’t have all male or all female.) (Employment rate for the entire town. Some people will be unemployed… peaks at ~80-90%

High-level prototype showing the major life actions (not smaller actions). Simulating the town without simulating the people.

Making Sims looking after themselves

Utility modeling
Highest-scoring
Randomly from the n highest-scoring actions
Randomly using the score distribution as the probably distribution (weighted randoms)

Personality and Traits and Motives

Same that he talked about at AI Summit

Traits -> Actions = massively data-driven system to minimize hard-coded systems.

Kant’s categorical imperatives?!?

Emily Short: "The conversation is an end in itself."

Take Home Actionable items

Data-drive everything!
Take the teime to make good in-game viz. tools
Prove out all simulation ideas using prototypes as soon as possible.

Richard shows excellent 2-D prototype that runs sims without the realistic world!


Labels: , , , , ,



Feedback and ratings:
Stumble this!


Will Wright's "Soul of the Sims"

I found an interesting tidbit this evening. It gives a look into how Will Wright wrote his first pass at the Sims' AI back in 1997. It's a scanned printout which makes it kind of annoying to read. According to Don Hopkins' description:

This is the prototype for the soul of The Sims, which Will Wright wrote on January 23, 1997.

I had just started working at the Maxis Core Technology Group on "Project X" aka Dollhouse", and Will Wright brought this code in one morning, to demonstrate his design for the motives, feedback loop and failure conditions of the simulated people. While going through old papers, I ran across this print-out that I had saved, so I scanned it and cleaned the images up, and got permission from Will to publish it.

This code is a interesting example of game design, programming and prototyping techniques. The Sims code has certainly changed a lot since Will wrote this original prototype code. For example, there is no longer any "stress" motive. And the game doesn't store motives in global variables, of course.

My hope is that this code will give you a glimpse of how Will Wright designs games, and what was going on in his head at the time!

Despite what Don asserts above, I wasn't terribly impressed since this is really something that can be written in an hour or so. I figure that is simply because it was an early pass. Of course, the Sims behavior AI is not terribly complex so it really wouldn't need to be anything much more complex than what you see here. Oh well... worth a look anyway.

Labels: , ,



Feedback and ratings:
Stumble this!


The Sims AI


Alex Champandard over at AIGameDev.com has posted a technical review of the AI for "The Sims". This is a fantastic article listing 21 tricks that can be used, at least in theory, in game AI development.
Please notice that Alex has put references at the end that point you to the source material - which is always good reading.

Labels: , ,



Feedback and ratings:
Stumble this!




Looking for the GDC AI Roundtable notes and audio?

Content ©2002-2008 by Intrinsic Algorithm L.L.C.

OGDA