-
Notifications
You must be signed in to change notification settings - Fork 83
Basic Inference in OpenNARS
Basic Inference is a foundation of OpenNARS. It introduces the way OpenNARS process input statements, makes inferences and apply various functions and rules. In the literature this this page is refereed as NAL-1 and NAL-2, a foundation of OpenNARS reasoning principles.
Logical foundation of OpenNARS reasoning operates on well known syllogistic inference rules. It introduces key features of OpenNARS: inheritance and similarity relations, use of evidence through truth value, inference rules, truth functions, property and insistence features and simple Narsese grammar.
-
Inheritance relation, “→”, is a relation from one term to another term, defined by being reflexive and transitive but neither symmetric nor anti-symmetric. An inheritance statement consists of two terms related by the inheritance relation. In the inheritance statement “S → P”, S is the subject term and P is the predicate term. Inheritance relation is closely related to many well-known relations, such as “IS-A” or “belongs to” or “subset”.
Example <snow --> white>. means snow "is" white -
Truth value is a pair of real numbers in the range [0,1] that are called frequency and confidence.
Frequency is a measurement of uncertainty defined as positive evidence / total evidence, while confidence measures degree of believe, given k as a temporal constant, might be seen as number of steps taken by the system in the future, confidence c is defined in terms of evidence w as c = w / (w + k), default value for k is 1
Example: <snow --> white>. %9/10, 10/11% here truth value of frequency=9/10 and confidence=10/11 means that snow has been observed white 9 times and 1 time it was not white, thus the total number of observations, that is total evidence, is 10, positive evidence is 9/10, since white snow appeared 9 times out of 10, and given that by default k=1 confidence, the measure of believe in positive evidence is 10/11 that is total evidence=10 divided by total evidence plus 1. -
Fundamental Inference rules and Truth Functions used in OpenNARS are described in detail on separate pages, please click on corresponding links
-
Similarity, “↔”, is symmetric inheritance relation. The similarity statement “S ↔ P ” is defined by the conjunction of two inheritance statements (S → P) ∧ (P → S). Therefore, the similarity relation is reflexive, symmetric, and transitive.
Instance,“◦→”, is another way to represent the same information. The instance statement “S ◦→ P ” is defined by the inheritance statement “{S} → P ”. The intuitive meaning of “◦→” is similar to the membership relation in set theory. Example: “Tweety is a bird” can also be represented as <{Tweety} --> bird>. Meaning that Tweety can be considered as an instance of a bird.
Property,“→◦”, is another way to represent the same information. The property statement “S →◦ P ” is defined by the inheritance statement “S → [P]”. Example: "Snow is white" can be represented <snow --> [white]>. meaning snow "is a kind" of white, that is white color is a property of snow. -
Because of similarity is symmetric, truth functions are modified:
F comparison
Suppose two premises are <P --> M>. %f1; c1% and <S --> M>.%f2; c2% or <M --> P>. %f1; c1% and <M --> S>.%f2; c2% then using comparison rule OpenNARS will derive conclusion <S <--> P> %f; c%, by comparing the inheritance relations of two terms to a third term. It is easy to see that F comparison is similar to abduction and induction only conclusion is now symmetric.
total evidence w = (f1 + f2 - f1 * f2) * c1 * c2, and positive evidence = f1 * c1 * f2 * c2 Thus,
F comparison truth value: f = f1f2/(f1+f2-f1f2) and c = [c1 * c2 * (f1 + f2 − f1 * f2)]/[c1 * c2 * (f1 + f2 − f1 * f2) + k]
F analogy
Suppose two premises are <S <--> M>. %f1; c1% and <M --> P>.%f2; c2% or <P --> M>. %f1; c1% and <S <--> M>.%f2; c2% then using analogy rule OpenNARS will derive conclusion <S --> P> %f; c% or <P --> S> %f; c%. The situation is is similar to deduction.Thus,
F analogy truth value: f = f1*f2 and c = c1 * f2 * f2 * c2 * c2
F deduction2
Suppose two premises are <S <--> M>. %f1; c1% and <M <--> P>.%f2; c2% that is both premises are similarity relations, then using deduction2 rule OpenNARS will derive conclusion <S <--> P> %f; c%, it can be treated as deduction going in both directions. Thus,
F deduction2 truth value: f = f1*f2 and c = c1 * c2 * (f1 + f2 − f1 * f2)