Skip to content

Non Axiomatic Logic (NAL), the logic behind OpenNARS

PtrMan edited this page Jul 5, 2020 · 12 revisions

OpenNARS is the open-source implementation of NARS (Non-Axiomatic Reasoning System), while NARS is based on NAL (Non-Axiomatic Logic).

Conceptually, NAL is defined hierarchically with multiple layers, each of them extends the logic by introducing new grammar rules and inference rules, so as to make the logic more and more powerful in its expressing and inferencing capability. For educational purpose, it is suggested to learn the system in this order. However, the separation of the layers are ignored in implementation, so in the code, the rules in each layer cannot be clearly distinguished from each other.

The complete NAL grammar is specified in the grammar page, while the inference rules are described in multiple pages, with their truth functions summarized in the truth-value function page.

Most rules of NAL are documented in the NAL specification.

In the current design, NAL consists of 9 layers in 4 groups, in the sense that it is possible to only implement one group plus the layer below it to get a functional system with well-defined capability.

[Group 1] Basic Inference

The simplest non-axiomatic logic, with atomic terms and single copula.

NAL-1 is a logical core of NAL. The statements in it are all inheritance statements with an atomic subject and an atomic predicate. The meaning of a term is defined as its extension and intension. The truth value of a statement consists of a frequency value and a confidence value. The inference rules include local rules (revision and choice), forward syllogism (deduction, induction, abduction), and backward syllogism (question derivation).

[Group 2] First-Order Inference

Extending the logic by introducing compound terms and derived copulas, using ideas in set theory, while still keeping the term vs. statement distinction.

NAL-2 adds similarity, instance, and property copulas that are all defined using inheritance copula. Also introduced are sets with a singular instance or property.

NAL-3 introduces compound terms in its general form, using set-theoretic connectors intersection and difference.

NAL-4 maps arbitrary (non-copula) relations into inheritance, with the help of product and image connector.

[Group 3] Higher-Order Inference

By dropping the term vs. statement distinction, NAL is extended to include statements-about-statements, and can do inference on them, using ideas from propositional logic and predicate logic.

NAL-5 introduce implication and equivalence as isomorphic to inheritance and similarity, respectively. It also contains additional rules that are specific to statement-level inference, such as negation.

NAL-6 introduces variable terms into NAL. Consequently, the extensional statements and intensional statements can be expressed and processed separately. The logic can also carry out hypothetical and abstract inference.

[Group 4] Procedural Inference

Using the ideas from logic programming, event, operation, and goal are introduced into NAL as special types of statement, to give the logic the ability of real-time perception and action.

NAL-7 defines an event as a statement with a time-dependent truth-value, therefore allows time to be expressed and processed as a special type of conceptual relation. Also introduced is an internal clock that provides a subjective time. Consequently, the system can carry out temporal and causal inference.

In NAL-8 procedural interpretation is applied to certain events to express operations, and the desired events can become goals to be achieved by the system itself by executing proper operations. In this way, declarative, episodic, and procedural knowledge are unified, and the system gets sensorimotor capability using plug-in sensors and actuators. Cognitive functions like perception, planning, skill-learning, and problem-solving can be uniformly carried out.

In NAL-9, a set of built-in mental operators are defined to support self-awareness, self-control, and introspective inference page for more details.

visit #nars (more active) and ##nars on FreeNode

Clone this wiki locally