Skip to content

Mechanisms

PtrMan edited this page May 27, 2021 · 15 revisions

A list of some mechanisms found in 20NAR1 or planned or in other implementations.
All organized by responsibility (where is it used)

mechanism name responsibility description
FIFO sequencer perception combines perceived events to compounds by storing events in a FIFO datastructure and sampling from the FIFO by some policy [ONA]
Anticipation procedural Anticipation is a mechanism to collect negativeevidence for procedural knowledge
Motor babbling procedural the agent has to be able to gather information on what happens when it is invoking operators when a given precondition is observed. This is done with motor babbling, which is a mechanism which picks a random operator after a precondition was observed. The effects are recorded and may be used for realizing particular matching goals
Decision making procedural decision making is realized with the decision rule. The decision is made by calling the op of the seq if the expectation is above the decision threshold
Predictive decision making procedural Predictive decision making is decision making which is invoked when doing a prediction which ”hits” a(derived) goal. Checking for a hit of a derived goal may be implemented with a hashtable lookup. It is currently implemented with a scan of a table of all goals to keep the complexity of the implementation down.
arg max item_usefulness attention select item from set of items by max usefulness (is a form of maximal utility selection), remove the selected item from the set
arg mass item_usefulness attention (legacy) select item from set of items by distribution of usefulness. Is called a "bag" in the "OpenNARS for research" project

Memory control

This section is discussion how the mechanisms to store knowledge, access knowledge and to keep the memory under AIKR are working.

Concepts

Concepts themself are stores as a Map of Concept adressed by key, where the key is a term.
AIKR: a policy has to throw out the concepts over the number of stored concepts which have the lowest usefulness

store

TODO

retrieve

TODO

Mechanisms

This chapter discusses various mechanisms which aren't directly related to "memory control" or "attention control".

FIFO sequencer

A FIFO stores events ordered by time.
A simple implementation is to assign each timestep a item, where a item is a container for events in the form as sentences with the same occurence time.
A event is stored in the item by occurence time when it is perceived from the environment or derived.

resource management:
The length of the FIFO is limited to stay under AIKR. This implies that item s will be recycled.

sampling:
Events have to be sampled by some policy to provide the premises for a derivation.
A simple implementation may sample events A, B, C in this order by occurence time and all with different occurrence time from the FIFO and build/derive (A, B) =/> C from it. One possible constraint is to check that B is an op. This ensures that the derived predictive implication =/> is only "actionable".

Motor babbling

The agent has to be able to gather information on what happens when it is invoking operators when a given precondition is observed. This is done with motor babbling, which is a mechanism which picks a random operator after a precondition was observed. The effects are recorded (into the FIFO sequencer) and may be used for realizing particular matching goals.

Pseudocode for selecting operator(is triggered when a cycle happens):

if random_float_between_0_and_1() < motorbabble_chance:
   # we are here when we have to select a operation to babble
   selidx = random_int(0, operators.len()) # select random operator
   selop = operators[selidx] # select operator
   execute_op_and_Record(selop) # execute the operation and record the event to the FIFO

Adaptive compute resource scheduler | attention

A big problem in any design according to AIKR is how to distribute resources (which can be CPU cycles or memory) among the different processes. One requirement is that the time of a reasoning cycle is not longer than a given (soft) limit. This corresponds to a system working in real-time with a given interactivity (a system which finishes a cycle is more responsive and thus more interactive). A adaptive scheme is used in the latest published version of 20NAR1. A scheduler has a time quota (which is similar to the quota as described for EURISKO) which can be "filled up" till the end of the cycle. This is implemented with a arg max utility based decision procedure where the utility measures how urgent a given compute procedure is. Ending the cycle is always given a utility of 1.0. The utility functions of the procedures to select take the reaming time of the cycle into account.
A advantage of this mechanism is that the selection of the internal action is not predetermined by the program.