The Sims AI

Started by
16 comments, last by MENTAL 17 years, 7 months ago
..sims,your serious?


well if a stat got low it would bring the stat up...thats about it
Advertisement
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.
Imagine living in a house where every single object is yelling "pick me! pick me" at you...
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...
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.
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
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.

Check out my new game Smash and Dash at:

http://www.smashanddashgame.com/

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.

This topic is closed to new replies.

Advertisement