NARS as an AGI

Memory and Control

1. Resource problem

In a reasoning system, the logic part defines possibility, and the control part realize certain possibility by selecting premises and rules for each inference step, so as to organize the steps into inference processes to solve given problems.

For an adaptive system, control information comes from experience. Under AIKR, the design objective is to use experience to the extent allowed by available resources.

AIKR means a task can be unanticipated in content, arrival time, and response-time requirement, so its processing cannot follow an existing algorithm specified in advance for a problem type.

Case-by-case problem solving: directly reasoning on problem instance, using available knowledge and resources at the moment. This approach provides flexibility and creativity, but lacks predictability and repeatability. It cannot be analyzed in terms of computability and computational complexity.

2. Task processing

NAL-1 can handle two types of tasks, corresponding to the types of sentence in Narsese: judgment and question.

For a given task, its processing is mostly determined by the beliefs (knowledge of the system) interacting with it.

Intuitively speaking, tasks are active, while beliefs are passive. Both are Narsese sentences.

Controlled concurrency: to process many tasks by time-sharing, though each with a different speed, and to a different depth.

NARS inference processes consists of forward steps, backward steps, and "local steps".

3. Data structure

A bag is a probabilistic priority-queue. Its basic operations are (1) put in, (2) take out, and (3) access by key.

The take-out operation is probabilistic, according to the priority distribution of the items in the bag.

Each operation takes a small constant time to finish.

Bag supports the usage of insufficient time and space using relative and absolute forgetting.

4. Memory organization

Since NAL is a term logic, and its inference rules typically require shared term in premises, tasks and beliefs can be indexed and clustered by their subject and predicate.

In NARS, each concept is named by a term, and refers to the tasks and beliefs with the term in it. A concept is an independent unit of storage and processing.

The system's memory contains a bag of concepts; a concept contains a bag of tasks and a bag of beliefs.

5. Working cycle

NARS repeats the following working cycle:
  1. Select a concept from the memory,
  2. Select a task from the concept,
  3. Select a belief from the concept,
  4. Use the task and the belief as premises for the applicable rules to derive new tasks,
  5. Return the used items with adjusted priority,
  6. Add the derived tasks and input tasks obtained in this cycle into the corresponding concepts. Report an answer to an input question if it is the best that the system has found.

6. Control strategy

The priority of an item (task, belief, or concept) is determined at its creation time, then adjusted each time the item is accessed.

The priority value of an item mainly depends on the following factors:

The priority-related variables and functions are also defined as extended Boolean variables/functions, though the details need further testing and tuning.

The control part of NARS is less mature than the logic part, because it depends on the latter.

7. Implementation and demonstration

There are demonstrations and examples of NARS online.

NARS is implemented in Java, with an open source version.

NAL is also coded in Prolog.


Reading