Basic Knowledge: Beliefs and Facts

Any → literal can be a belief or fact:

  • Any information can be stored as a belief or fact (the distinction depends on the used context).
  • Both are denoted as literals.
  • A belief can be generated by
    • sensors the agent uses to perceive its environment.
    • agents themselves, so the agent can conclude new beliefs by combining existing ones
  • Initial beliefs are defined at the beginning of the .asl and terminated via ., e.g. light(red)..

It is possible to create hierarchically structured belief bases by using the slash / as a separator, for example to distinguish between internal and external knowledge (internal/preferredspeed(120) vs. external/intendedspeed(100)). This feature requires to model the beliefbase by means of → Storage containers, which have to reflect the hierarchical structure of beliefs. If these containers do not exist, the default behaviour is to ignore the belief-addition to the beliefbase. See the → Tutorial: Efficient Beliefbase for details on Storage containers.

Note: Perceptions, modelled with beliefs, can also be wrong! For instance, a sensor can be broken, or other agents may simply “lie” (depending on the scenario). So a belief can be perceived or considered as true, but needs not to be factually true.

PLUSMINUSliteral

Note: A more developer-specific explanation of beliefs and facts can be found in the article → Logic Programming.

Examples

-light(red)                               // removes belief
+light(green)                             // adds belief
+phase( duration(60), program(morning) )  // adds belief
KB: Basic - Goals previous page