[Music] okay hello everyone I'm going to be talking about the Sims 3 today in particular um the dynamic living world and the unique personalities okay so this is a programming talk it's going to be quite technical but not super technical there are going to be quite a lot of movies interspersed throughout little Oasis of fun in the desert of nerd if you like it so so so we had um two uh big goals which was to in Sim 3 which is to simulate a larger varied Dynamic world and to make these unique Sims uh unique snowflakes but why those two goals in particular well one way of looking at it is that those two goals serve a wider goal of um of having a system which allows emergent narrative so so what what does emergent narrative mean does it mean anything is it just a sort of trendy uh buzzword or catchphrase
well the idea is that um Emer so typical lots of games um you go through one particular story whereas the other an emergent narrative is that the game enables a you know a Hu a huge bunch of different stories it's like the game is like a story box and you can create a wide variety of different stories through your um through player action and through autonomous NPC action so after the game came out an exam an example of the sort of thing that we wanted in terms of emergent narrative appeared on the internet and we were very excited by this it's a really excellent blog by um Robin burkinshaw who's a game designer um about a pair of homeless Sims um and and the surprising thing this is a quote from his website a surprising amount of the interesting things that happened in this story were generated by just letting go and watching The Sims Free Will and personality traits take
over so so Robin created these two sims the father and daughter and the the father was called Kev and he was a really kind of difficult to get on with guy apart from being homeless he had a number of different personality issues but his daughter Alice is is very different she was sweet and kind now the sort of thing that happened in terms of a measure narrative is that I mean so Kevin needed somewhere to stay he didn't have his own home so he would like go from house to house and sometimes people would let him in but then his sort of basically he was a deeply inappropriate kind of guy his all the of mean-spirited and inappropriate things he did in the house would eventually cause his hosts no matter how forgiving to Chuck him out and he was back on the street again and eventually he even he even alienates his own daughter okay so so that if you like the high goal well one of our one of our top level goals was emergent narrative and two of the sub goals are simulating a
larger varied Dynamic world and making unique Sim okay so I'll be talking uh so the first half is about simulating the larger varied World okay so so I'm going to be showing some videos to show you what I mean okay so this is Pauline Juan who is who is a young lady um she is uh engaged to be married to a handsome policeman called Hank and it's a Sunday afternoon and she's going cycling around town and um she arrives at the park so so one of the things that's going on here is that wherever she goes there's already a whole lot of stuff going on which is sort of suitable for the venue she's in it's already halfway through if you like there's already people talking and doing things and these people you
know in a in a game like um Grand Theft also a ton of games that they sort of Spawn people to um to be there when you get there whereas whereas like game doesn't use spawning I mean these are all real simulated Sims and um and we sort of encourage them to come to the venues and we encourage them to sort of behave um suitably when they get there so for some reason I had this weird urge to sort of spin the camera around all the time so so I apologize for all vertigo induced on you guys yeah I don't know what I was thinking of yeah City okay so next she's going to go to the um the gym you can you can see just in the corner there there people sitting uh having a picnic and again there there are people from the family and they've been encouraged to sit together because they're members of the same family so so they want to sit together
so when we arrive there they they put the roof down so yeah so by the time she AR there there are already a ton of people doing suitable situation specific behavior in the different venue news but you can also so that's in the foreground but you can also see in the background that there's all the other stuff going on in the other areas so I'll just show you a little bit more of the video this is the longest video you can see some of the people leaving the park now CU they're no longer so needed at the park because um The Players no longer focusing on the
park so much okay let video just show you one more V Next is going to go to the library no I think it's going to take a little bit long okay we'll stop we'll startop the there okay so how how did we what techniques did we use in order to simulate this larger world so obviously we needed a number of optimization techniques we also needed some Behavior techniques to make them behave suitably when they get there so one of our optimizations we use was hierarchical planning so the basic idea is to uh massively reduce the branching Factor by instead of making some decisions with a massive number of options making a small number of decisions with fewer options so a b so we've got all these
different lots and each lot has got lots of agents and each agent you can perform lots of interactions on him so the sort of the the naive and inefficient thing to do would be to go through all the Lots go through all the agents on each lot go through all the interactions on each agent on each lot but that's wildly inefficient so instead what we do is we is is the Sim will choose which lot to go to and then choose which agent to talk to and then choose which social interaction to perform so if there were L um lots and M on each lot and N interactions on each lot then there you know significantly changes the performance from or to L * n * n to L plus n plus n okay so here's a graphical depiction of this instead of having a wide variety of different actions on the left hand side on different um agents we first choose which lot to go to and then which Sim to interact with and then which interaction okay okay so when the when the Sim is deciding which lot to go to this the first decision how does he do make that
decision to start with we tried each of the individual Sim had all these different individual motives for oh I I quite want to go to the park at the moment and another one was like oh I quite want to go to the library but we found that very very hard to tune because we had these sort of high level tuning goals like we wanted a certain number of guys in the park at certain time we wanted certain number of people in the restaurant at dinner time and stuff like that so So eventually we added uh if you like motives to the venues as well sort of the Lots had motives too but they had a sort of urge to have a certain number of people in them at different times of the day so so here is um so here's some of our tuning data for the restaurant which is the stuff that's circled so and this is basically specifying the number of Agents we want in these venues at different times and as you can see there are two peaks for we want a lot of agents in the restaurants at lunch time and we want a lot of agents in the uh restaurant at dinner time okay so that was our first optimization Technique we use in order to get this living world the second optimization technique was what we call commodity interaction Maps okay so this is an important
optimization technique so so the what Sims 1 and Sims 2 did was when considering what to do on a particular lot was iterate through all the intera all the objects on the lot and then go through all the interactions on on that object and then think is that interaction currently available and then finally do I want to do it but this is very inefficient when most of the desires are satisfied most of the time to take a concrete example let's say that um The Sim has just eaten a massive meal is completely full up and sated and lives in a house with like 20 fridges in it so in this naive thing he will he'll go through all the fridges he'll go through all the interactions on each fridge he'll work out if he can do the interaction each of those interactions and he'll think oh no I'm not hungry and he'll keep continually doing that on all those things it's just sort of a bit of a waste of time so so in Sims 3 we do it a different way we we uh it's a classic memory time trade-off we store a map from the things that we might want which are we call Commodities to all the different interactions satisfy that
commodity so here is an example I don't know how well you can um read it but on on the left hand side is um all the different is a subset of the different Commodities and then on the right hand side are all the different ways of satisfying it so the top line is all the ways of satisfying your bladder motive so using all the different toilets so one thing to notice here is that we have um much much more motives in Sims 3 than in uh previous Sims games sim Sims 1 Sims 2 have eight motives we had um a really large number the technical term is a metric assload of motives for all sorts of different um situations we have the traditional ones but we have a whole lot as well you'll see near the bottom of this some example of sort of venue specific motives which is what we use to encourage people to behave appropriately when they arrive at venues okay so that was the first two of our optimization techniques we used in order to make the larger world and the third one is what we call Autos satisfy curves so we have like um 80 Sims or
thereabouts in our living world and um we can't afford to simulate all of them at the same level of detail so we simulate the ones um in the foreground a much higher level of detail and the guys in the background we can't afford to do so much processing in particular uh motive Decay which they've all got all these motives and they got more than they had in previous games instead of um decaying all the motives on all the different Sims the guys who are in the background we don't we don't Decay or update their motives at all until they come to the for ground and at that point we work out what their motive should be so in the lower corner there is what we call the Autos satisfy curve for hunger and this is what we expect a typical Sims um hunger motive to look like during the day so he gets hungry and hungry and hungry until 6:00 a.m. and then he has his breakfast so he's full up for a bit and then he gets hungry and hungry and hungry until 600 p.m. dinner time and then he has his dinner and then he it decays again so he doesn't bother having lunch in this model so so then what happens is if this if this Sim is in the background and we haven't yet um and now we want to update his motive
because he's coming to the foreground we work out what the time of day is and we sort of randomly displace it by a little bit so that not everyone has the same values and that's his new motive value so that's much more efficient than Computing it all the time but obviously for the guys on screen we we do it in the traditional decaying kind of manner okay so that's the um so the final um technique large important Technique we use for simulating a larger world we called story progression so so the problem was so we we can't simulate all the Sims at a very high level of granularity but all the Sims do need to make progress in the world I mean other even the Sims in Far Away houses they need to get married they need to get promoted they need to get divorced possibly that their lives need to go on as well otherwise it just won't seem convincing so the solution that we came up with was that they low LOD Sims the ones in the background perform the long-term significant life actions at a low frequency
so so this system was designed by Ray Maza and implemented by um Peter ington so the central idea is that the town has various meta level desires demographic desires desires to keep various statistics about the town um at the right levels and it uses these long-term life actions to satisfy these life desires so just as a Sim has a hunger desire which is Satisfied by eating the town has a desire that the um that the gender ratio is at a certain point and that's and it can satisfy that desire by killing Sims or creating new babies of of certain genders okay so I'm going to show you a little um movie of so this was an early prototype to test out this idea so so we've got a very large number of Sims and and they are all simulating but they're
all simulating just the life actions so here that some of them moving from one house to another and as they get too many objects that fit in their houses and the lines between them denote the different types of relationships they can have and what was cool about this is is that it runs really extremely efficiently no matter how fast you run it because they're performing actions at such a low frequency okay okay so here's two examples um of of story progression so one of the demographics and there were a real ton of demographics in the game but one of them was gender balance we wanted a more or less even number of males and females in the town you can imagine the sort of degenerate things would happen if if that went wrong so um on the x- axis is the gender balance and so one means everyone's a guy and not means everyone's female and they're clearly very bad and then the y- axis is how happy the town is about that and then
and then the actions on the left are the sort of long-term life actions that this story progression system can perform in order to modify the demographics so effectively at a low frequency I think at midnight it performs these actions in order to update the town demographics so here's another example employment rate so the designers wanted most of the people to be employed but absolutely not everybody because it's just more interesting I think if that some people unemployed so um so the the uh the absolute optimal value is like 80% of the people are employed and then again it has various life actions for modifying that demographic based on whether it's too high or too low like getting a job or quitting a job and getting fired okay so so that was the um the first of our uh the first of our big goals which was um simulating a larger world and the second half is going to be about how to make unique
Sims okay but before we can really make um unique Sims with individual personalities we really need to make them look after themselves well I'm sure you guys know about maso's hierarchy of needes which is the idea that you've got these uh uh you got this sort of uh pyramid of different types of disease so um of needs so at the bottom you've got those sort of survival desires higher up you've got social desires then you've got IND IND individual desires and at the top you've got some sort of hippie notion of at oness with the universe or something like that um but but Mazo had a sort of controversial well the claim that he made that was slightly controversial was that people don't even try and satisfy higher level desires unless their lower level desires are already satisfied which I mean there do seem to be some counter examples of that like you know like the starving artist in a Garrett who's um doing his life's work even though he hasn't got enough to eat whatever but I think what is more uncontroversial is there's a sort of
perceptual version of maso's Hier of needes which is that the player will not perceive any fancy kind of stuff about um high level about um individual Behavior if if they can't actually survive or look after themselves in a basic way I mean if for example they're weeing them themselves whatever you're not going to think oh he's got his great unique personality you I mean what you're going to see is that that he we himself so so it was really important that they don't we themselves they don't die of hunger that sort of thing okay so there's a couple of techniques we used in order to so so here is um just a sequence of interactions and how much the Sim wants to do them in this particular case so he's quite hungry and he slightly wants to watch TV kind of thing so that's how much he wants to do these actions but then we need to actually decide which action to perform and that might seem obvious but it's not completely obvious cuz on the one hand we've got the um we've got how much they want to do it but then we've got the probability of them doing that particular action how do we transform the utility into probability so the one obvious thing to
do is think hey well let's always choose the highest scoring action and in a lot of games that's the right thing to do but in a Sims type game where you're modeling people that gives really quite robotic results I mean let's say for example that the Sim's got some food to eat and then he wants to go and sit down somewhere if he's always choosing exactly optimally he's going to go to the absolutely nearest chair every time and so you're going to see a very small subset of all available Behavior which is a bit of a shame so another thing you can do is choose randomly from one of the N highest scoring actions which is what Sims 1 and Sims 2 did so for example you choose from one of the three higher scoring actions which seems sensible it certainly seems less robotic however let's say that you absolutely desperately need to go to the toilet and there's two toilets so two of your actions are going to the toilet but then the next higher scoring action is much much much much lower and that is watching TV then there's a one in three chance if you're watching TV so there's a one in three chance of you of bladder failure which doesn't seem completely optimal so the thing we did we used this sort of um a so simple bolman
distribution to convert the uh the utility into the probability so um you know p is probability uh s is the score and T is the temperature which is sort of a cool tunable constant for um effectively how how random to make it temperature intuitively should go up and down depending on how well his SP he's doing to sort of create a sort of simulated analan kind of effect if he's doing really really badly if every action he does is failing then we want to increase the temperature so he becomes more random whereas if he's doing well we want to lower the temperature okay so another important idea was in terms of so we've got all these different motives we've got tons of motives how do we tune the relative intensities of these motives so that if he's for example choosing between eating something and um fulfilling one of his own internal personality things which is more high priority so one of our high level design goals was that survival should take precedence over manifesting
their individual personality traits and so we sort of used maso's hierarchy of needs as a as a sort of a way of tuning the desire so each each level in the pyramid is like 10 times more important desires and that more or less worked I mean that more or less gave us the idea that um if aim is that survival should Trump manifesting their autonomous personality okay so now we get to the heart of the thing which is the unique s okay so we wanted to make a town that was full of distinct individuals uh as Matt Brown says we wanted to make each sim a unique snowflake but we also wanted their personalities to be uh very um immediately obvious to the player we we didn't want it to be the case that in order to notice what this guy was doing you had to sort of graph you had to write down all their interactions over a period of days and a spreadsheet and do statistical analysis and think oh this Sim is spending like 2% more of his time cleaning in this other SIM so oh I think he's a bit of a clean Sim we we didn't want that to we wanted to be really sort of in your face sort of caricature uh personalities so those are our high
level goals in terms of uniqueness so so the high level uh design was based on um that each that each personality was a bag of traits and there was up to five traits that you can choose and we had a large pool of traits we've added to them in subsequent expansions and these personality traits affect the Sims in a variety of ways so one thing they do is affect the available actions the different things that the SIM can do so CLI Maniacs can steal and inappropriate Sim control people on internet forums which is a genius one by Tom Wang and um pyromaniacs can set things on fire and over emotional Sims can cry while watching romantic Telly so that's basically they get new types of actions available to them just because of their personality traits and personality traits can also affect adverbs they provide adverbial modifiers on common actions they affect the way you walk so grumpy Sims will like mutter under their breath as they're going along tra can affect the way you idle
socaholics are always pulling out their cell phones so that even while they're not doing anything they're manifesting their personality traits they even affect the way you look so neotic Sims I changed the parameters so they're sort of always of looking around like this and sort of looking a bit edgy and the flirty Sims are always sort of checking out Sims and and they affect the way you react to things so just try forcing a vegetarian to eat meat or a hydrophobic Sim into the pool so so one of the things that sort of surprised I think we're right when Sims first came out was that people liked so much the sort of the punishing the Sims or torturing The Sims that was something that was um very very appealing for some reason and one of the things that's great about uh personality traits is it gives you um a whole new dimension of ways of humiliating your Sims on a sort of individual specific basis okay so that's all that stuff is cool but it's how the traits affect their decision- making which is what we're going to focus on okay so on the one hand we we have all these personality traits and on the
other hand we have all the different interactions and in order for the personality traits to feel rich we want millions and millions of like connections between these two systems however as good software Engineers we want to minimize the um the code arrows between these code systems we want like nice lean apis this is exactly the sort of thing we don't want this would be very naughty so in the middle of find best action right oh if this Sim has his person specific personality tray and the object he's trying to look at is a book then oh let's increase the score when we start having tons of examples that scattered through our code then it's not maintainable so that's not what we want to do what we want to do instead is create massively data driven systems in which the interconnections between the gameplay elements can be added without touching the code at all okay so a little example of that okay this is just some of our tuning tools which we use for updating which
interactions or which traits advertise to each other so these are the interactions um available for evil people which sorry I can't type okay so for example couch potatoes specifically encouraged to do these interactions other people will do these interactions too but but effectively the C potatoes have got an extra reason for doing it and here are the family oriented SS there's more of those okay and there's tons of examples of yeah NE neat guys have got tons of stuff okay okay so so top level is that um so we've got all these different personality traits and each one is associated with its own motive so the different Sims have different wants and by satisfying their unique wants they are manifesting their individual personality so for example a mean spirited Sim has
an extra motive effectively to undermine other people's selfworth and that and various interactions like uh mock people for example advertise to that motive so he autonomously does it and a couch potato has an extra motive to S slob around and things like watching TV and sitting down ad advertise for that motive okay so um so then what we did is we logged out all the different interactions that all the Sims uh did so we could then look at these logs and see if it was sort of transparent just from looking at the data what the personalities were so for example this is what A lady called Tamara did one Sunday afternoon she she gussed up in front of the mirror and she chatted to her friend and mooch some food um ate some cereal and then complemented this guy's appearance and made a flirty joke and you can get you can sort of read off quite clearly what sort of what sort of a lady she is you can infer the person from what they
do so so this is the same lady as before this is Pauline Juan and she is flirty and has commitment issues and she's engaged to Hank who I think also has commitment issues so this so they're young and they love each other but they yeah and now these are all the interactions that um she's currently considering uh which are advertising to her specific personality traits this is the way that probability is gained from score which I was talking about earlier so here she is going over to autonomously um to hug her her boyfriend and I see the trait is sort of glowing to indicate that she's sort of autonomously manifesting it
so a lot of things she wants to do are sort of flirty things because she is a flirty sent okay it's is not a f a video okay I don't know if you noticed but they're coming closer together so one of the things we wanted to do was manifest their relationship state by how close they were together okay so in Sims one and Sims 2 every Sim have the same eight motives but but in our game each Sim has a different set of motives based on their traits but the set of these motives doesn't just vary between individuals it also varies within the same individual over time so we're adding and removing
motives through time on an individual in order to model The Sims understanding of various social situations which is the thing I'll show you next so this is the same lady again Pauline Juan she's going to visit um her neighbors who I don't think she she's really met before who the Frio Brothers and there's a whole social situation modeled around visiting encouraging people to behave appropriately so for example the hosts are encouraged to look after their guests not just to ignore them and and guests encouraged to do things that are sensible so first of all she's just going up to ask hey I don't really know you but is it right if I come into your house
okay so here she is coming into the house so so she's discouraged from doing the sort of things you shouldn't really do if you're a guest in a stranger's house so for example and and she knows this inside her autonomy so for example she shouldn't really um just bring up the she shouldn't really just go up to the computer and start browsing the web you see it's got a negative score there she knows that it's it's inappropriate and that subtracts from the utility of the action so a ton of interactions here are inappropriate and she knows that if you leave her to her own devices she's going to behave of appropriately as a guest in the situation however what we're going to do in a minute is is the player's going to override her autonomy and make her behave in a naughty way so for example um so he's going to make her sleep in the bed even though you know she he doesn't know she doesn't know them so so so this uh guy one of the the frios it's a little bit slow to notice
this I think he's too avidly watching his playing his video game ah but now now he's got up he's like o Pauline you're being very naughty what do the hell you doing lying in our bed kind of thing okay so so next she's going to do another in she's going to insult their home so so the the is overriding her autonomy to to make her behave really rudely and he's like again that's made her even more inappropriate basically and there's a sort of social situation which is keeping track of the sort of he and now finally it's like the sort of um the straw which breaks the Campbell's back of inappropriateness she's going to try and make herself some food in their house and now at this point they've really they just had enough like yeah you P it's time to go man you've been very naughty
okay so the the way these situations work is they are hierarchical finite State machines which which sometimes encourage or Force Sims to do agents and also sometimes add motives to um or remove motives in order to encourage them to behave appropriately so there these various different states with various different substates so for example the yellow states were the warning States so when poine started doing the odd wrong thing like um insulting the home she went into the warning state where the host was encouraged to warn the guest and then then eventually she um she was so rude that we went into the red state where the host was uh forced to make the Sim leave and the Sim was forced to leave yes the way this works under the hood is we're actually adding um motives a different motive for the host and a different motive for the guest to encourage them to behave appropriately but s with different in uh personalities have different interpretations of these
motives so inappropriate and insane Sims they have the um motive for behaving appropriately in the house but they don't care about it basically so so you will get in fact I got a bug near the end of the game which which was that someone had come to my house and had gone straight upstairs and fallen asleep in my bed in my bed but it turned out that she was an insane Sim and that's what she should have done if you like so so they have different interpretations of these motives so another example of the way in which different Sims inter the motives differently the um uh is at the picnic so Sims Sims in situations are encouraged to sit with people that they know to give a sense of social cohesion so people having a picnic you know them people from the same family will be sitting together um but Sims with different traits have a different understanding of these motives I mean the inappropriate guy actually actively goes out of his way to sit with people he doesn't know to freak them out so think so example of that so so here is a a mother and son having
a nice picnic but here is coming Xander who is a notorious inappropriate him and he's thinking oh I don't know these guys I'm going to come and stand near them and freak them out but fortunately here comes the uh the father and husband so they will okay good okay so the um sort of high level design idea is that so we've got these individual traits and we've got these social situations and that somehow modeling both of them is a complimentary activities the more accurately we we model social situations the more sort of specific the social interactions are the more we'll be able to manifest their individual personality traits so individuality and sociability are mutually supporting like two parts of an arch and here is my first pretentious quote from schopenhauer that the revelation of the idea of man is
accomplished by two means by accurate drawing of significant characters and by the invention of poignant situations in which they reveal themselves yeah if we're going to um if we're going to have these much finer grain personalities we're going to need much finer grain social interactions to support them so Sims 1 and Sims 2 had very broad speech acts like talking and joking but in Sims we added a ton of specific contextual socials like complimenting home or worry about relationship which were partly designed in order to manifest these much more specific personality traits so these personality traits affect the the different social interactions which they choose autonomously so the snobs like to boast about their cars and The neotic Sims will accuse their partners are cheating on them even if they haven't cheated on them and if a mean-spirited Sim is
talking to some nice other SIM who turns out to be a vegetarian they might mock her vegetarianism but as well as affecting the social interactions that they choose to perform they also affect the the way they respond to these social interactions and how they respond depends on a series of production rules so here is a simplified version of some of our production rules for what happens when a Sim is trying to be funny so the default rule is say hey if you're trying to be funny then it's sort of neutral the second rule says hey if you're trying to be funny but I've heard this joke before then it's boring the third one says if I'm trying to be funny but you and I aren't getting on very well then it's insulting and the final one is if I'm trying to be funny and the person I'm talking to has a good sense of humor then they find it funny um interactive fiction was one of our Inspirations uh for the socializing system in two specific ways one was its use of production rules um I don't know if you guys have seen inform 7 the
latest version of inform uses production rules as the fundamental unit the other main sort of guiding inspiration was um the idea in some interactive fiction that the conversation can be an end in itself so for example in Emily schz Gala you have a um you're talking to this statue and there is no ulterior motive to talking to the Statue you're just um being in the conversation so in a lot of games uh the reason why you um talk to people is for an ulterior motive you're effectively treating people as means rather than ends you're manipulating them um you're for example in a large number of um like um MMOs you're treating these NPCs as experience points dispensers and this is of course violating can dictum that we should always treat people as ends and never
me okay so this this is showing all the different production rules for different um for the different social interactions and how they choose which one's going to fire so for example invite over I think the tab at the bottom is all the different production rules which are apply to the selected social interaction at the top and we're we're sorting the different production Rules by specificity to see what which one's actually going to fire what what is showing here very quickly is that the flirt is going to succeed because of the top most specific production rule which says if I'm flirting with somebody and that other guy is also flirty then it's going to succeed so so now she's actually going to try fling with him
and yes sure enough it succeeds but what noticed at the very same time Pauline learned that he was flirty so this is sort of um learning of of traits at the very moment in which they're manifesting Behavior okay so these production rules are ranked by specificity and the most specific rules fires often the traits of personality traits of either the actor or the target determine which rule fires and when a rule fires the other SIM will learn the trait and the trait learning is thus contextual okay so Chris heer um sort of posed this um sort of complaint about AI in games um so I've tried to undermine his professionalism here as you can see by drawing like a little beard around him but um what his uh his view is is actually quite interesting is that the field of
computer computer Graphics is significantly more advanced than AI in games and he gave an interesting explanation of this which is that Graphics have a clean decomposition of Form and Function in terms of texture and polygon and then artists are free to add any texture they like without any fear of anything going wrong graphics Engineers deal with the polygons and they're two in sort of two happy separate worlds and there's no analog in AI of the texture polygon decomposition so that's his um argument it's an interesting one so the underlying explanation for for why computer Graphics are successful is that artists can manipulate these textures freely without worrying about side effects without being able to break the game in any way I you can cut a part of a texture out and it's still a valid texture you can merge two textures together and it's still a valid texture this is because the texture isomerous a part of a texture is itself a texture so here is potential word for the day homerus from the Greek homos
meaning the part is the same so for example butter is homeris so if you take a little bit of butter it is it is also butter but a human is not not homeris because if you take like person's finger that's not the finger is not himself a person okay so what we ideally want in order to answer Chris's challenge is aerous unit for game Ai and it certainly isn't the script or the function in C++ CU if you take a couple lines of a script or you just cut out a little bit of a function it's not even going to compile let alone um do anything good because of you know all the implicit dependencies with the variables and what have you but but a but a plausible candidate for a hom omous unit for game AI is the production rule which is which is why I find it exciting because I mean you can cut conditions out of a production Rule and it's still a valid production Rule and you can blend two production rules together and it's still a production rule so the production rule is does have this property of being home
so so does the social system answer the Photoshop challenge well we were able producers did add um lots and lots of social interactions without needing to touch the code in any way so the whole thing was completely data driven and they also added thousands of production rules so that they could make really really fine grained little bits of behavior without worrying about crushing the game so you know so like uh or if I'm trying to mock someone's vegetarianism and but they really really really like me then they're still going to find it really really annoying sort of things so very very specific rules they could just add without worrying about anything so they were in this nice safe data driven environment but yet they could still uh Define conditional Behavior okay so so so some of the emergent narrative um comes from the individuals manifesting their personality traits but another aspect of emergent narrative is is is what happens
when you get uh two sims with some sort of trait conflict between them so for example if you put a a computer wiz in a technophobe in the same house the technophobe has various um like extra actions available to him like um sabotaging the computer and stuff and then when he's done that he's he's got new social interactions available to him like I think he can gloat about the broken computer or something like that so you get these sort of like little mic stories emerging and similarly if you put a n Sim and a slob in the same house then sure the the slob is not going to do any of cleaning the N Sim is and the Nim has got other like specific interactions available like complaining about the mess and what have you and these personality traits also create the ability to um have to do the same series of interactions but have very very different results depending on the personality of the guys you're interacting with which which adds to replayability so so you go up to someone
in the park and ask him what their about their career in one case you learn he's a policeman and now your mean-spirited Sim has the option of complaining about the police but now let's do it again we ask someone about their career and you learn he's unemployed and and then the conversation turns awkward because the very Act of um revealing unemployment is awkward and in the third case you learn he's unemployed but he's hotheaded he doesn't like to be reminded he doesn't have a job and gets angry so this is all the different ways the um that the same actions can pan out depending on the personality shapes and situations of the people involved okay so to summarize Sunset Valley is a town that's full of these individuals and the more you play the more you get to know their quirks and as you get to know them they will learn about your Sims personality traits as well and some take-home actionable items is to Data Drive as much as a human can and take the time to make some good in-game visualization tools and also to prove out some all
your simulation ideas as much as possible using early pypes so my last movie is so this is our nice 2D pte which I love which is done by the S3 designers and so we tested out a lot of the behavior in this early prot so here for example is here is is the same sort of visiting situation with the same sort of contextual interactions like complimenting home uh working in this sort of simple 2D world and this this helped us to test things out much quicker and was I was really really great so here again it's the same sort of
thing but um in our little 2D world so a big thanks to the Sims 3 team for making this game and allowing me to uh talk about it with you guys today thanks a [Applause] lot than um hi very impressive um you're talking about data driving everything uh data driving everything um could you tell us a little bit about the process the development process how you make sure that people will create motives actions um uh rules uh work
together um uh for example adding a motive uh unfortunately it wasn't completely data driven there were sort of enumerations in the code that had to be added as well um the social system was more data driven like you could add completely new social interactions and and these production rules completely but uh I mean we can't dat absolutely everything and we could have data driven more and so we uh I mean it would be great to D drive absolutely everything about motives we didn't get as far as that that would have been very cool um my my my question was more about um coherence between many people uh working together on the same problem how do you achieve a coherence um uh that's a good question um do you mean like tuning coherence for example what's well there are many ways to represent the same kind of motive or or need or
whatever uh how do you make sure that there are no behavior that stick out Oh you mean like duplicates and stuff or or incoherence we we had some really nice tools um for uh for browsing all all the data as well so we could see all the different interactions which satisfy this motive or all the uh different things that this interaction does and so using these inspection tools we could quickly find if there was anomalous data so if you build nice visualization data tools you let people do what they like and then but then you can go back through and we did find a lot of little data bugs near the end I'm sure there are still some more but but yes but face we use big browser tools to try and find anomalous data okay thanks thank you hey hi how did you handle Fringe cases and how did you deal with um possibilities of feedback loops that you since every everything so data driven um and you're kind of hands off on certain
levels of interaction how did you prevent your Sims from spiraling out of control like two flirty Sims talking to each other and not really caring about doing anything but flirting because both of those interactions are going to be really high on the list so that's a good question um so in in that EXA example um basically once their MO motives are satisfied but they no longer want to do it for a certain period of time so if you have so basically motive satisfaction is the general answer so so if if one sim is floody then he wants to manifest his Flirtin by flooding but once he's done that flooding he's satisfied his floody motive for a period of time the other SIM so then there's a period of time after which he will do other things to to stop um exactly that sort of repetitive Behavior should be unfortunate outside uh yeah if you like in the general system of mode of satisfaction so you you showed a couple of production rules in said you had the ability for designers to add new production rules how did you handle um
even in the example you showed I think there like there was one production rule for if you're fluidy then just get a neutral reaction and of course that production rule could always match whenever somebody's flury so how did you select if multiple production rules matched uh which one to actually run so we started off I started off naively thinking that I could do it programmatic sorry programmatically by looking at the sort of the number of um uh antant on the left hand side and that that the more antecedent they were the more specific it was I could of compute the specificity of this Rule and I a Meg Mania programmer could decide which role was more important than another role but it turned out that system really wasn't working very well and then a very cool designer lady came along and just added she she hand tuned all these production rules to give them ni numbers and then the system worked significantly better hey Richard great talk thank you um when you said that in the when the the system says sometimes that like when the interaction happens so and so learns that so and so is flirty yeah so does
that affect the do they have like a notion of other Sims internal like other Sims personalities or how is that yeah yeah they do they know I mean it's quite simple but they basically they either know or do not know about the different personality traits of the Sim which is just five bits of data if you like and also about their career and uh whether they're married and whether they're rich I think so so there was a small amount of bits of data so that Sims would learn stuff about other Sims yeah which which it felt like a nice way of sort of collecting information about the game also the other thing about it was it was interesting from a designer perspective that it meant that even when something failed you were gaining something because let's say for example you tell a choke to this guy right and they s like ah like that and so and you feel frustrated that your interaction failed but then bling you learn that he has no sense of humor so it sort of it turns failure into an achievement so so so I think it was Ed and that affected the autonomy of the characters too like when they if I if I know that you're like to use lots of pretentious words for example like is that does does does that affect my autonomy like when I just when
I choose an interaction with you it would be great if it did but no it did doesn't yeah that would be cool i s really enjoyed the talk um so uh I was really interested in the interplay between what you talked about at the beginning the sort of the course graining where you step back and just simulate the whole town in terms of low frequency events and and then the latter halfway you simulating in in detail um because it seems like some traits you you could do that with fairly ibly like hunger people are going to go up and down but then the more fine grained individualized trait you maybe couldn't do that like for example uh you know a flirty Sim might be more likely to be in a relationship than a non- flirty Sim so so where did you decide uh you know which one which things you could simulate the whole for the whole town and and which things you just have to instantiate individually ah well that shows I wasn't explaining for well so I mean it wasn't it wasn't on a per trait basis that they were doing low LED or high LED it was that if if the guys in the background we're hardly doing any competition on them at all apart from them deciding where to go to next it's
not like they they do a subset of their low-level actions I mean they hardly do anything apart from go from place to place if if they're in the background area and it you're suggesting an alternative architecture where like sort of different parts of their mentality are a loing in and out is that I was just wondering so how do you decide for example if a given Sim is in a relationship when you instantiate them um like uh you know so you track all the relationships of all the Sims at all times yes we do and that it does create an nend squared potential problem and then then we Decay them if if they if these two guys like they know each other but they don't really have any strong things then after a while we forget about the information but yeah there is a there was a significant memory overhead of of doing the N squared tracking of relationships thank you love the game I want to make that clear before I say something critical here because my pet peeve with the SIM is that they don't seem to have a uh concept of temporal reasoning or the
consequences of their actions what for instance uh the most common thing I see is that like they'll be extremely tired and very hungry and instead of getting a quick snack before going to bed they'll go to bed sleep for a couple hours wake up in the middle of the night and go through all that do you think that kind of uh temporal reasoning is something that can be expressed in terms of production rules or is that uh a separate system that you would want to tack on uh it's certainly true you're absolutely right it would be great to add that sort of thing um you could do it using some sort of htn type planning or some sort of long-term planning or potentially production rules it certainly would be great it would make them much more plausible um yeah and production rules is one way of doing it so yeah absolutely so you think it is expressable in terms of what you have oh sorry no it's not expressible in terms of that so that was production rule system right for a subset of the game just for doing social interactions and the responses of social interactions it's not like we had a general production RO system for all of behavior um it wouldn't we needed to do something better we did have more long-term planning in an early
prototype but it didn't make it into the final game but you're absolutely right that would be a great an important feature to add thank um so really excellent and thought-provoking talk that was really that's really neat um so I had a question I I think you touched on but I'd love to find out more about production rules for traits and I'm thinking specifically of uh for example uh well you know in the game Tropico for example if you had to assassinate somebody because they were they were threatening your rule their children would be much more Troublesome than uh than they would ordinarily be because you had killed their parent and and then when you were talking about traits and production rules I was thinking about how say an abusive parent might produce a child that starts out neurotic and then grows into an abusive adults or if a flirty Sim just per chance ended up flirting with a bunch of mean-spirited Sims who mocked her then eventually maybe she becomes less flirty because you know and so I guess the question was
did did you have specific production rules that created traits or would you rely on the simulation over time to to change people's traits very good question so no so just to repeat the production rules are only used in this very specific uh subp part of the game to do with how they responded to social it wasn't a general mechanism for doing the whole of the gameplay although that is also an interesting idea um in terms of question about specifically about traits and how they change we didn't really change them very much in code at all because I think the high level design idea was that these players has carefully crafted his character to have this personality maybe he's trying to uh model his irritating ex-girlfriend or that really annoying math teacher or someone and you know he he's done the work of creating that it would be it might be frustrating to him if through some clever simulation which he doesn't fully understand it changed his personality underneath him so we basically were a little bit scared of doing that sort of thing at all though we do completely acknowledge that it's of the sort of Turning Point the most dramatic point in some great piece of literature or something is that moment
at which the guy gets self-realization and changes his personality but we just Shi away from from from doing it at all and certainly if we had done it we would have done it in code and not not in production thanks L hello thanks again um I have a very specific question about just small detail the production rules um um you know essentially uh you have this interaction between two two people based on the production rules and then based on their Behavior The Sims understand something about the other person's traits this discovery process going on I was wondering is Discovery process explicitly encoded in the production rules or is it somehow inferred by the engine it's it's inferred from from the antecedants if one of the antecedence of the production rule is that the target has that particular trait then it it automatically earns it so we didn't need to add extra data because the data is sort of implicitly there in the production role itself so we can pull it out okay thank you thank you can I ask
Japanese so I don't know how good is sorry sorry I did it wrong H I'm sorry yes thank you that's that's a very good question um so the question the
question the question is how do we debug with such a large number of Agents such a large number of interactions so I mean the only thing to do is to have really to have good in-game visualization tools so um so we built a number of you know like um net little things that can run inside the game where you can see all the different um individual Sims the complete State at any time and all the interactions that they're thinking of doing and how and how much they want to do them and what the probabilities of them doing it but the other thing we added was like a counterfactual engine where because it it takes a long time to get it into the state you want it to get into in order to test your particular situation so we added the ability to change the um state of the guy just with a few sliders within the same tool so we could say oh what would happen if this guy really um was really really hungry and he was in a really bad mood about this and he was really annoyed about this guy what would happen then so so basically we created a a way of doing counterfactuals very quickly in our tool so as to test the
autonomy thank youor thank [Laughter] you wonderful talk um if I'm understanding you properly you had designers authoring the production rules sorry this is another production rule question yes um and I was just curious you know I on a good day the great thing about production rules is you can kind of add more and they don't have bad interactions with one another and so on yeah and on a bad day it's like any other kind of um you know code and you can get interactions between rules yes to what extent did you have issues with sort of different designers adding rules into the system and having them sort of having their rules step on one another that's a good question um well there were two main gu as one producer and one designer who were adding rules apart from me so it wasn't like a huge bunch
of people doing it and we I did we did try and like look at each other's stuff the main problem we had was uh just adding to too many rules too quickly and and so um she went a bit crazy there were I think 1500 rules or something and so therefore a bit it was a bit inefficient because I wasn't anticipating adding this many fine which is very cool but these many fine grin rules but there was more rules than we expected but also we we we had a sort of simple it was a simple model of production it didn't have you know like in typical horn Clauses you can have extra exponentially Quantified variables on the left hand side it didn't have that sort of functionality so it was a less expressive system like a classic horn clause which which made it less easy to have some of the more hard problems was it was it actually a Quantified system or was it purely propositional well it had three variables in it but it didn't have any extra you couldn't introduce a new variable that wasn't already part of the variables if you I mean okay okay cool thanks thanks hey man he Richard um back in October when I mentioned that I created a Sim to model myself you put me on the spot and said what five traits did you
choose for yourself so I think a lot of people would hear I I know that you had to create a Sim in your own image it's just got to be natural so what five traits did you choose for yourself I don't no no I hav I honestly never tried to do that who hasn't if you were to do it now thank you okay thanks very much guys thank you
Auto-generated captions from YouTube — names and numbers may be misheard.
Game Developers Conference · 2026
Thomas Brush · 2025
Comments