Sims-style AI

Started by
8 comments, last by vrkaya 21 years, 7 months ago
Hi, I''ve read how the AI in Sims is related to what Will Wright calls "smart-terrain". I have found some articles that speak of generalities about this but am looking for some in-depth material to how a similar AI could be implemented. Basically, I''ve read that the "object" sends out signals of the need it can handle, and how to use it. Does anyone have any links to any material where an attempt has been made to provide examples or explain Sims AI in further detail? Has anyone written their own examples? Aside from links, how do some of you suppose this "smart-terrain" works with the AI? Sincerely, Ron
Advertisement
I have never played the Sims, but from what I can gather, the objects in the game, such as a teapot or food or a TV can send signals saying, "Hey I am here for ENTERTAINMENT purposes. To use me, turn me ON." or "I am here for EATING purposes. To use me, CONSUME me."
Then a SIM will pick up those messages, and make a decision. Is the Sim''s BOREDOM level too high? USE TV.
-------------------------GBGames' Blog: An Indie Game Developer's Somewhat Interesting ThoughtsStaff Reviewer for Game Tunnel
Okay. How would you think to implement that? I''m thinking you would have to be within a certain range of an object to receive messages from it - or else I could imagine an array or structure that holds all the messages being rather large - since there could be many objects in the virtual world.

So you''re saying that then, the decision would be weighted by the Sim''s needs? I had considered that but would you implement something like that as a Finite or Fuzzy State Machine - or something else entirely?

Thanks, Ron
There is an article on this on Gamasutra ( www.gamasutra.com ), which I think is called ''Implementing Wittgenstein'' or something (do a search).

Also there have been a number of discussions on ''Annotated Objects'' in the Game Design forum on this site, which deal with similar stuff.
You should also look up reference on Influence Maps. That''s essentially what the Sims implements. I can''t say too much (that is, I''m not sure what I can say, so I best not say too much!), but the object broadcasting does attenuate with distance, and the Sim''s current needs magnify or minimize the messages.

There are about a gazillion really interesting additions you could make to this algorithm.
Mike SellersOnline Alchemy: Fire + Structure = Transformation
Thanks for the replies, everyone. I''m looking into the items you suggested. If you have any other suggestions, feel free to post them.

Regards,
Ron
For the lazy ones, the older threads in the Game Design forum are:

Annotated objects which drive behaviour
The annotated cellar: an experiment
If you read the (Prima...?... I think) book on the Sims it gives you a comprehensive breakdown on how the broadcast AI works. The book the next best thing to a generalised game design.
I don''t mean to be close-minded, but all this talk of ''broadcasting'' seems a bit wonky to me. I mean, how is the Sims different from the bots in Quake? A bot in quake just runs around and searches for objects near it in a 3D world, and then runs through a checklist of things it needs or wants, based on a set of conditions. I don''t see why the sims need be any different. A quake bot would see a health pack and think "do I need life?" and also "Is there an immediate threat nearby" and weight the two options to determine which is more pertinent.

A sim could do the same. Each object would have a set of attributes which describe which needs it satisfies, and have data on how it is used (which sim animation action to trigger). The sim searchs his world for objects within a certain radius. There''s no need for objects to ''broadcast'' anything. All that seems to do is make a simple concept more complex.
The good part of using object broadcasting instead of bot scanning is that you can add new objects that the bot has no previous knowledge of extremely easily. It also is a little more of an object oriented way of thinking, with different objects sending out messages etc when the sims are in range, instead of a lonely sim scanning everything all the time. Less work for the sim, more work for the objects. Butin the sims, the ability to add many different objects was important to the game design, so this was a much better way of doing things. In a first person shooter, the bot centralized system makes more sense, because there is only a limited amount of objects, and the bot should know how to handle each situation more precisely.


In the end, you probably end up with relatively similar ai''s, neither one is smarter, they are just different paradigms.

This topic is closed to new replies.

Advertisement