Meta-Beliefs

Question: What if we want more complex action conditions instead of only testing KB beliefs? Let’s say we want an action that is only performed after an specific event has happened, or what if we want a condition where we need an average value, or where we want the strongest emotion the agent is feeling?

Answer: Meta-Beliefs: knowledge that is produced by affective or reasoning processes.

The difference between normal beliefs and meta-beliefs is that the latter are registered in the Knowledge Base as procedures with their name becoming a reserved keyword. As such, the unification algorithm is able to identify them when parsing  the composed names within a logical condition. Whenever it encounters a meta-belief it will dynamically execute its associated code to retrieve its value. The code can be either very simple of quite complex, depending on the nature of the meta-belief itself.

For example, one of the meta-beliefs that the Role-Play Character adds is Mood([a]) (which we just used), which simply retrieves the mood value of agent [a].

There are several different Meta-Belief functions already implemented. Previously we referred to them as Dynamic Properties. In the released version of the Toolkit you can check what meta-beliefs are available by clicking “Help->Show Available Dynamic Properties” button, which will open a new window:

Let’s take a look at an example, in the Tutorials folder you can find some examples of scenarios where each asset is used. In one of them there is an Emotional Decision Making example where you can find the following action definition:

  • "Action": "Speak([cs], [ns], [m], [s])"
  • "Target": "[x]"
  • "Layer": "-",
  • "Priority": 1
  • "Conditions":
    • "Has(Floor) = SELF"
    • "IsAgent([x]) = True",
    • "[x] != SELF",
    • "DialogueState([x]) = [cs]",
    • "ValidDialogue([cs], [ns], [m], [s]) = True",
    • "EventId(Action-End, *, Speak([cs], [ns], [m], *)

Let’s take a look at each condition and deconstruct what they mean:

  • “Has(Floor) = SELF” : In this example we use this belief value to indicate who is speaking in a particular time, if the agent believes he himself has the floor he may talk.
  • “IsAgent([x]) = True”: The target of the Speak action must be an agent….
  • “[x] != SELF”: …different from himself.
  • “DialogueState([x]) = [cs]”: The dialogue state belief describes in what state is the conversation in, we will discuss this further ahead when describing a speaking action .
  • “ValidDialogue([cs], [ns], [m], [s]) = True”: This is a meta belief, it is a function that determines if there is a valid dialogue with the variables given to the function, if the variables have no value the function will provide a possible value to them.
  • “EventId(Action-End, *, Speak([cs], [ns], [m], , [x]) = -1”: This is another meta-belief, the EventID function will return the ID of a past event, if there is no past event with the values provided it will return -1. Therefore in this case the condition is verifying that there hasn’t been an event of the type “Action-End, *, Speak([cs], [ns], [m], , [x])” in the past events of this agent.

    The demonstration in the “Demo” page is a great example of the usage of Meta-Beliefs and an excellent learning case for authors. Take a look at the the FAtiMA Toolkit’s scenario specific files used in the example.

    Feel free to download them and use the Toolkit to “mess around” with the Scenario any way you like.

    No announcement available or all announcement expired.