Open-NARS is the open-source version of NARS, a general-purpose AI system, designed in the framework of a reasoning system. This project is an evolution of the v1.5 system. The mailing list discusses both its theory and implementation.
Non-Axiomatic Reasoning System (NARS) processes tasks imposed by its environment, which may include human users or other computer systems. Tasks can arrive at any time, and there is no restriction on their contents as far as they can be expressed in Narsese, the I/O language of NARS.
There are several types of tasks:
- Judgment - To process it means to accept it as the system's belief, as well as to derive new beliefs and to revise old beliefs accordingly.
- Question - To process it means to find the best answer to it according to current beliefs.
- Goal - To process it means to carry out some system operations to realize it.
As a reasoning system, the architecture of NARS consists of a memory, an inference engine, and a control mechanism.
The memory contains a collection of concepts, a list of operators, and a buffer for new tasks. Each concept is identified by a term, and contains tasks and beliefs directly on the term, as well as links to related tasks and terms.
The inference engine carries out various type of inference, according to a set of built-in rules. Each inference rule derives certain new tasks from a given task and a belief that are related to the same concept.
The control mechanism repeatedly carries out the working cycle of the system, generally consisting of the following steps:
- Select tasks in the buffer to insert into the corresponding concepts, which may include the creation of new concepts and beliefs, as well as direct processing on the tasks.
- Select a concept from the memory, then select a task and a belief from the concept.
- Feed the task and the belief to the inference engine to produce derived tasks.
- Add the derived tasks into the task buffer, and send report to the environment if a task provides a best-so-far answer to an input question, or indicates the realization of an input goal.
- Return the processed belief, task, and concept back to memory with feedback.
All the selections in steps 1 and 2 are probabilistic, in the sense that all the items (tasks, beliefs, or concepts) within the scope of the selection have priority values attached, and the probability for each of them to be selected at the current moment is proportional to its priority value. When an new item is produced, its priority value is determined according to its parent items, as well as the type of mechanism that produces it. At step 5, the priority values of all the involved items are adjusted, according to the immediate feedback of the current cycle.
At the current time, the most comprehensive description of NARS are the books Rigid Flexibility: The Logic of Intelligence and Non-Axiomatic Logic: A Model of Intelligent Reasoning . Various aspects of the system are introduced and discussed in many papers, most of which are available here.
Beginners can start at the following online materials:
- The basic ideas behind the project: The Logic of Intelligence
- The high-level engineering plan: From NARS to a Thinking Machine
- The core logic: From Inheritance Relation to Non-Axiomatic Logic
- The semantics: Experience-Grounded Semantics: A theory for intelligent systems
- The memory and control: Computation and Intelligence in Problem Solving
The core is derived from the code of Pei Wang.
For an overview of reasoning features, see working examples explained in SingleStepTestingCases and MultiStepExamples.
- Java 8+ (OpenJDK 10 recommended)
Example experience files are in directory nal/Examples
- "Example-NALn-*.txt" contains single step examples for most of the inference rules defined in NAL level n. The "edited" version contains English translations, and with the unrelated information removed; the "unedited" version contains the actual input/output data recorded by the "Save Experience" function of the GUI. The files can be loaded using the "Load Experience" function of the GUI.
- "Example-MultiStep-edited" contains multi-step inference examples described in https://code.google.com/p/open-nars/wiki/MultiStepExamples
- "Example-NLP-edited" contains an example of natural language processing described in the AGI-13 paper "Natural Language Processing by Reasoning and Learning".
Unit tests are in nal/test.
- Maven
- Website
- All downloads
- An (outdated) HTML user manual
- The Project homepage
- google groups - Discussion Group
- IRC
- Try online
We also thank the involved other projects, for example https://www.marioai.org/LevelGeneration/source-code https://processing.org/ Hyperassociative Map code adapted from dANN: https://wiki.syncleus.com/index.php/dANN