Any → literal can be a belief or fact:
.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.
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