Decision System (version 3)

Posted by Michael on November 15th, 2006, in Development

This is a summary of everything that was discussed previously, plus some improvements.
Some terms have changed: Relationships are expressed as Affection, while Intimacy is only used as a property of Opportunities anymore. The Filter of Comfort has been renamed Filter of Initimacy. And the Filter of Fondness is now called Filter of Affection. Fascination is now called Interest and Attention Span is now simply Attention.

Oh no, it's a diagram

The Drama Princess system chooses a Goal from a list of Opportunities compiled for each Actor. The choice is made by filtering this list with different parameters until a single goal remains.

The list of Opportunities consists mostly of Opportunities offered by Objects in the game world. Objects include the environment, inanimate items and other actors. Opportunities offer behaviours that allow for interaction with an Object. Next to the Opportunities offered by Objects, the Actor himself can add Opportunities to the list in the form of Tasks. These are behaviours that we want the Actor to perform, disregarding the availability of Objects. And lastly, a Shock can add Opportunities to the list. A Shock is usually caused by an unexpected event in the game world. Opportunities added by a Shock are accompanied by an Urgency value.
Every Opportunity has an Initimacy value. This expresses the level of Affection between Actor and Object that is suitable for performing the behaviour. A high Intimacy value of an Opportunity requires a lot of Affection between the Actor and the Object that offers the Opportunity. And vice versa: a stone would offer a “Throw me” Opportunity with very low Intimacy value, e.g. (unless it is a masochist stone 😉 ). As a result an Actor would only throw that stone if he didn’t feel much Affection for it.

These Opportunities are then filtered down to a single one: the Goal. This filtering happens in a precise order, partially for reasons of performance (reduce the size of the list most early). At every level, a degree of randomness is injected to allow for surprise.

Continue…

Filter of Distance
Removes Opportunities of Objects that are too far away and adds an Urgency value to Opportunities from Objects that are very closeby.

Filter of Condition
Removes Opportunities that the Actor cannot perform depending on conditions that accompany the Opportunity. For instance, if the Actor is a toddler, he cannot drive a car.

Filter of Intimacy
Removes Opportunities with Intimacy values that are far removed from the Affection between Actor and Object (except the ones with an Urgency value). These Opportunities’ Initimacy values are modified by Desire and Interest.
Desire is a combination of an Actor’s Enthusiasm (or the eagerness of an Actor to change a relationship) and Attitude (the direction in which the Actor wants the relationship to change). Enthusiasm is defined by the author and does not change throughout the game (unless this is pertinent to the story). Attitude is defined by chance modified by Affection: when the Affection is neutral, it can go either way but as the Affection rises or declines, the chance of a reversal decreases. Like Affection, Attitude is shared by both members of the relationship.
Interest in an Opportunity is reduced to zero after an Actor has achied the Goal associated with it. After that it slowy rises again. This is to prevent the Actor from repeating himself.

Filter of Affection
Removes the Opportunities form Objects that the Actor likes the least (except the ones with an Urgency value). The Affection between the Actor and the Object is modified by Attention.
Attention declines every time the Actor interacts with the same Object he interacted with before and is reset to maximum when he picks a new Object to interact with. In essence this expresses boredom and ensures that the Actor switches his attention to a different object once in a while.

The Filter of Affection includes two “subfilters” that only apply to Opportunities for romantic behaviour.
The Filter of Sexual Orientation removes Opportunities that don’t match the sexual orientation of the Actor (defined by two gliding scales of attractedness to either gender). And the Filter of Faithfulness removes romantic Opportunities offered by another Actor than the Actor’s love interest, if there is one. The latter is influenced by the Faithfulness value of the Actor (some actors are more faithful than others).

Filter of Choice
If the Actor is an autonomous character, one of the Opportunities from the remaining list will be chosen at random as a Goal. Opportunities with high Urgency values have more chance of being chosen.
If the Actor is an avatar for the player, a menu will be presented from which the player can make a choice.

When a Goal has been reached, the Affection between the Actor and the Object is modified. If the Intimacy of the Opportunity is higher than the Affection for the Object and if the Attitude of the Actor towards that Object is positive, then the Affection will be increased. Unless the Opportunity had an Intimacy value that is much too high for the enthusiasm of the Object. Then the Affection is reduced. If Intimacy is less than the Affection and the Attitude is positive, then the Affection will be reduced as well. When the Attitude is negative, the opposite applies.

Seperation modifies Affection so that it moves towards neutral. When they are seperated, lovers become just friends and enemies stop hating each other.

When the Object is another Actor and the Opportunity requires that Actor to respond, Opportunities for response are added to that Actor’s list of Opportunities with a certain Urgency value. This may be done through the Shock interface.

Romantic Opportunities are only likely to be chosen by Actors who are in love, i.e. Actors with a high Affection for each other. One of the romantic Opportunities that an Actor can offer to another is Quarelling. Quarelling is a game of chance for the relationship: it ends with serious impact on the Affection between the two. After a quarrel,their relationship either becomes stronger (they kiss and make up) or it declines dramatically (possibly leading the way to a break-up because the closer Affection gets to neutral, the more likely Attitude is to reverse). Actors with high Enthusiasm will be more likely to quarrel.
Perhaps certain Shocks caused by external factors can have the same “game of chance” effect on a relationship as a Quarrel.

If the Actor has more than average Affection for one of the Objects that is offering Opportunities, an extra Opportunity will be added to the list: “Hang out with me”. This Opportunity has no specific Intimacy value, other than “better than average” so it can always be chosen. “Hang out” is a behaviour that makes the Actors perform their idle behaviours in each other’s vicinity (rather than running off to go and interact with something trivial). Hanging Out is a special Opportunity that is not affected by Interest: actors never get bored with hanging out.

Task Opportunities do not have Intimacy values, allowing them to be chosen at any time. But they are connected to “pseudo-Objects” that the Actor has a certain Affection for. In other words, the choice of Task Opportunities is unaffected by the Filter of Intimacy but is affected by the Filter of Affection, allowing the Actor to perform a Task that he really likes even if there’s a friend around.

When an Actor is busy, he does not offer any Opportunities to other Actors. That way, other Actors cannot choose to interact with him when he’s not ready for it. While he is performing a behaviour, however, he does continue to update and choose from his own list of Opportunities. This allows Actors to interrupt themselves. This interruption will not occur excessively because as long as the conditions are the same, the likelyhood that the Actor would choose the same Opportunity as the one he is already performing, is very great. And if the conditions change, it is only appropriate that the Actor interrupts himself.

Keep in mind that this system only uses relationships as a metaphor for what is basically a way of structuring believable autonomous behaviour of virtual characters. Terms like “affection” and “desire” et cetera should not be taken too literally.

Pingback by Drama Princess » Blog Archive » Behaviour System

Posted on November 16, 2006 at 3:46 pm

[…] When a Goal has been selected, the Drama Princess system calls the Behaviour System. This makes the Actor play animations, move through space and trigger events. If the Decision Sytem is the brain, then the Behaviour System is the body. […]

Pingback by Drama Princess » Blog Archive » Sufficiently simple?

Posted on November 18, 2006 at 9:52 pm

[…] Is our Decision System simple enough? Or better: is the logic to choose a goal worth the CPU time compared to a purely random choice? Will that logic make a great enough difference? […]

Leave a comment

You must be logged in to post a comment.