Sign in to follow this  

The Sims AI

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Has anyone got any good links on the technical details of the AI in 'The Sims'? I know some of the details such as that objects broadcast desires that they satisfy and that the sims themselves have differing levels of desires. But I don't know what kind of desires they are etc..

Share this post


Link to post
Share on other sites
Quote:
Original post by Raghar
Have you played it?
If you have talent for AI you could find these answers extremely easily.


Yeah, I mean just look at HL2:EP1, they clearly used concurrent artificial networks for the AI, cooperating with baysian networks. He asked for technical details, not a discouraging commnent. In case you actually know, then why don't you tell us? Of course you might know of hundreds of technques giving you results close the The Sims', but do you actually know what they use? And can you prove that your methods is as good or better than theirs?

Share this post


Link to post
Share on other sites
Totally agree with you... I have the Sims and I have playing guides just for the express purpose of working out the mechanisms but they only take you so far (and tbh I am not a fan of the sims - I just like the AI from the technical standpoint)

Share this post


Link to post
Share on other sites
Quote:
Original post by CTar
Quote:
Original post by Raghar
Have you played it?
If you have talent for AI you could find these answers extremely easily.


Yeah, I mean just look at HL2:EP1, they clearly used concurrent artificial networks for the AI, cooperating with baysian networks. He asked for technical details, not a discouraging commnent. In case you actually know, then why don't you tell us? Of course you might know of hundreds of technques giving you results close the The Sims', but do you actually know what they use? And can you prove that your methods is as good or better than theirs?


To Raghar's defense, he asked what kind of desires, which you can know by playing the game, not what technology is used to compute them.

Share this post


Link to post
Share on other sites
Quote:
Original post by XiotexStudios
Totally agree with you... I have the Sims and I have playing guides just for the express purpose of working out the mechanisms but they only take you so far (and tbh I am not a fan of the sims - I just like the AI from the technical standpoint)


Fine then you can answer your own question.
Quote:
But I don't know what kind of desires they are


If you wanted to ask about AI, you should say what you already know, and show your guesses. Or you might ask where you'd find some resources for learning. The most enjoyable way, how to learn what you asked about, is game play analysis.
Not only by trying to guess how they did it, but also by trying to estimate how would be best way to DO it. If you'd create small programs for testing your theories even better.

Or you might look here http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Oblivion#Radiant_A.I.

This talks about problem someone that don't have experience with AI, and don't know what to expect from a little working AI, could get when he is using AI middleware.

You might also learn some psychology, to be able to model them properly. The characters from the game you asked about behaved as people with high level of pathological type of neurosis. While neurosis in AI characters might be nice they overdid it a "little".

You might also google for "behavioral AI". It would show some interesting resources.

Share this post


Link to post
Share on other sites
So, the Sims AI worked fundamentally like so.

Each avatar has a set of needs/desires. These are of course directly visible to the player, along with an intensity. Objects in the game world -- like refrigerators -- radiate that they can reduce the intensity of certain needs, like food. The avatar can do some pathfinding, obviously. So basically the character wanders around until it decides to satisfy some desire, probably based on the intensity of the desire and the intensity of the radiated desire-providers around it. (Just a guess, my knowledge gets hazy here.)

The cool thing about this system was that you could drop completely new objects into the game world without having to make any particular revisions to the game. If you added a robot with a bucket that radiated that it could reduce the need to go to the bathroom and added it to the world, the avatar was smart enough to go to it without needing any AI changes at all.

Share this post


Link to post
Share on other sites
Quote:
Original post by firewall1
..sims,your serious?


well if a stat got low it would bring the stat up...thats about it



You're completely missing the point. How do you define 'low'? How does it bring it up? How do you prioritise between different activities? etc.


I did read an article on The Sims AI quite some time ago (it must be a few years now). The basic idea was that (as already pointed out), the avatar doesn't actually interpret his environment and determine a course of actions based on preset goals, but rather the behaviour is determined by the 'desires' emitted from the various objects to him or her.

From what I remember, objects emit desires for certain attributes (hunger, hygeine, etc) the strength of which depends on the object in question - some are naturally stronger than others. The strength of the desire may fade with distance, and may also carry with it an associated personality 'type' (e.g, swimming pool would I think be 'fun' desire and and 'active' type.

The avater recieves all these signals, and further adjusts the weighting of the desires by the amount of 'need' they have for that thing (hunger, etc) and how closely it matches their personality type (e.g, cleaning the floor improves 'room', but is of type 'tidyness', so therefore becomes very low importance for sims with no personality points in tidyness even when 'room' is practically zero, or much higher for those with).

This gives the avatar a list of prioritised actions which are updated every few seconds if the avatar is idle. It will proceed by taking the highest weighted 'action' and attempting to fulfill it. Only when it fails (pathfinding error, object too busy) or completes the action will it recalculate it's priorities again according to it's desires.

Further, different activities are affected differently by overall 'mood'. When mood gets very low, anything which generally requires a minimum mood level (like painting, or going to work) will get ignored completely. You also get actions such as 'stamp on bugs' and 'sulk' becoming higher priority with lower overall 'mood'.


I think there's more, but that's all I can really remember.

Share this post


Link to post
Share on other sites
Quote:
Original post by Steadtler
Imagine living in a house where every single object is yelling "pick me! pick me" at you...


I expect that that's not a bad description of what happens. When you pass by your fridge, you think "hmm, I'd like a snack". When you pass by your XBox, you think "ok, just one quick game."

A good model of the brain should include the idea that seeing, hearing or thinking about something should cause the concept to light up, in turn activating many of the related concepts. Seeing the fridge should cause a quick succession of activations, from "fridge" to "snack" to "snacks are tasty" to "I'm hungry". Of course, if your goal is oriented elsewhere, the "fridge" activation will barely register at all, and will thus probably never make it to "snack".

... though I admit, if my fridge shouted at me I'd throw it out pretty soon...

Share this post


Link to post
Share on other sites
Quote:
Original post by Asbestos
I expect that that's not a bad description of what happens. When you pass by your fridge, you think "hmm, I'd like a snack". When you pass by your XBox, you think "ok, just one quick game."

A good model of the brain should include the idea that seeing, hearing or thinking about something should cause the concept to light up, in turn activating many of the related concepts. Seeing the fridge should cause a quick succession of activations, from "fridge" to "snack" to "snacks are tasty" to "I'm hungry". Of course, if your goal is oriented elsewhere, the "fridge" activation will barely register at all, and will thus probably never make it to "snack".


That reminds me of a philosophical debate old like the world; which prime in the existence of an object, shape or purpose? Could a fork exist without the need to eat? Do we use a fork to eat because of its shape, or is a fork shaped like this because its purpose is to help eating? egg or chiken :)

Anyway, I think the concept or "focus" or "center of attention" is a very interesting concept to AI. I dont think I ever read any academic work on the subject. While camera focus is an critical concept in cinematography, it is vastly underused by our graphic counterparts. Rare games made very interesting use of it, but mostly in cutseens (See Radiata Stories for example). It would be something very interesting to explore for Game AI, especially for making "believable" NPCs. or Marketing.

Quote:
Original post by Asbestos
... though I admit, if my fridge shouted at me I'd throw it out pretty soon...


Like the doors from "The Guide": "Im delighted to open for you today sir, I hope your passage is pleasant!"

or something along that line.

Share this post


Link to post
Share on other sites
hm try this out: http://www.cs.northwestern.edu/~forbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/v3_slide0088.htm

and this is a nice reference, too. not only for your problem:
http://www-cs-students.stanford.edu/~amitp/gameprog.html

Share this post


Link to post
Share on other sites
Quote:
I expect that that's not a bad description of what happens. When you pass by your fridge, you think "hmm, I'd like a snack". When you pass by your XBox, you think "ok, just one quick game."

Except in The Sims it's the opposite: your fridge yells out "you want a snack", and you decide whether or not to listen to it.

Share this post


Link to post
Share on other sites
Quote:
Original post by JBourrie
Quote:
I expect that that's not a bad description of what happens. When you pass by your fridge, you think "hmm, I'd like a snack". When you pass by your XBox, you think "ok, just one quick game."

Except in The Sims it's the opposite: your fridge yells out "you want a snack", and you decide whether or not to listen to it.


That's pretty much it. When interacting with the environment, the smarts are put into the world instead of into the Sim. When the Sim passes by an object, the object sends out a message to that sim with all the needs/desires it can forfil. If it matches up with what the Sim is looking for, he'll go over to the object and use it.

By using this method, you can create an infinate number of objects that all do different things without ever having to update the code of the Sim, so long as the object talks in the same language.

Share this post


Link to post
Share on other sites

This topic is 4110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this