This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.
We support queries (give me your knowledge), responses (answers to queries), and commands (add this behavior to your plan list of behaviors). All of those message types have a single piece of information which may have a misunderstanding built in to the information, such as the wrong location of the rebel base (an ambush) or begging for food (when the creature is already full).Technique: Probability of Confusion
It seems that many classic CRPGs follow a similar route in the dialog trees when players are communicating to NPCs.
Pros: Straightforward to understand what will happen and easy to control outcomes.
Cons: Doesn't really give any variety, just a separation between the truth (such as where the base is really located or how hungry are you) and a lie.
Building on the previous method, each dialog message has three possible outcomes depending on whether the listener is friendly (positive), unknown (neutral), or enemy (negative). Each creature has a limited memory of creatures (a top ten list) and a -1..+1 value to describe like/dislike.Survivor: who proved best & why
Before any query, response, or command is issued a random number is generated and scaled by the like/dislike value (if the listener is known) and classified as positive/neutral/negative.
This approach seems to follow classic pen & paper RPGs (like Dungeons & Dragons) alignment match ups or recent CRPGs like BioWare's Mass Effect or Knights of the Old Republic. This needs to be augmented with a system that allows the like/dislike values to readily change based on interactions, which should be left to the reader-
Pros: Manageable complexity and a nice set of diversity compared to a fixed outcome.
Cons: Requires any piece of information, such as a location or hunger level to have 3 possible values to return depending on the like/dislike value for any queries. Some of this 'false-data' can be auto generated to be the opposite of the truth or 'close to the truth', but many discrete items like 'what is the name of the traitor' or 'where are you going' need coding-rules or fixed designer-choices to make sense in the world.
Instead of using the scalar like/dislike and a random value to select between 3 possible outcomes of any given message, here we store an 'emotion-vector', such as x = angry, y = scared, z = tender, w = excited, s = happy, t = sad, which is attached to each dialog-msg that is sent.
For any dialog-msg, we dot product the listener's and speaker's emotion vector for each other to accumulate a "certainty" or trust value for msg. This trust value can be used in any creature decisions such as "go to the rebel base" vs "its a trap" or "give the beggar food" vs "do not share".
Note that the emotion vectors can be retained for each pairing of creatures so it forms a more complex version of like/dislike for each creature-combo. This is not ideal but approximates the ability for speaker and listener to relate to each other or to deceivingly attempt to relate.
Pros: Gives us quite a range of diverse behaviors. When the emotions attached messages are allowed to influence the 'current-thinking' state of the listener's emotion_vector relative to itself, it follows expected models of anger begetting anger or fear, happiness cheering up sad or not-excited being dismissed by a listener.
Cons: Not only requires coding-rules or fixed designer-choices to provide believable misinformation as before, but now also requires initializing an emotion vector for various creatures or groups/archtypes of creatures so that cats start off being scared of dogs and dogs are angered by cats, etc.
Future: Refine this approach into a means to visualize all the creature-creature interactions as a sea of dialog and be able to watch trends (if any).
Msg_Query_k, //seeks a 'statement' response
Msg_Statement_k, //has info
Msg_Command_k, //the info is a behavior script or value to change
typdef float Norm_t; //value from -1..+1
//how easy was the message to understand
//(adds a random +/- deviation to the emotion vector prior to dot product)
//stores the results of the dot product of the emotion vectors to associate
//the information with a trust aka certainty level
//adds a means to filter/misunderstand
//if higher than 50% or so,
//it is an 'exclamation' in the traditional sense
//such as "Rebel_base location" or "i am hungry"
//such as "location" or "hunger-level"
//such as "lat 42, long 12" or "very-hungry" but not used when a query