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.
Extreme situations:
- When there is sufficient resources, exhaustive search is optimal. Example: IL-1.
- When there is perfect control knowledge, the inference process directly goes to the desired conclusion, so the strategy is optimal, too.
- When there is no control knowledge, any strategy is equally good.
The normal situation is none of the above: there is insufficient resources and some control knowledge, but it is imperfect.
The common practise is to do heuristic research, but a general-purpose system cannot depend on a given heuristic function.
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 tasks can be unanticipated in content, arrival time, and response-time requirement, so the solving process 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 becomes 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:
- Select a concept from the memory,
- Select a task from the concept,
- Select a belief from the concept,
- Use the task and the belief as premises for the applicable rules to derive new tasks,
- Return the used items with adjusted priority,
- 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:
- its creation circumstance,
- its intrinsic quality,
- its performance record,
- its contextual relevance.
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. Related ideas
The control mechanism of NARS is related to many AI and computer science ideas, including heuristic algorithm, time sharing, anytime algorithm, genetic algorithm, spreading activation, and parallel terraced scan.
Related psychological phenomena include attention, recall, forgetting, priming, association, intuition, as well as inspiration and creativity.
Also related are operation research and resource allocation.
8. 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
- Non-Axiomatic Logic: A Model of Intelligent Reasoning, Ch. 5
- Rigid Flexibility: The Logic of Intelligence, Ch. 6, Ch. 12