Skip to content

Cycle: The operating cycle

patham9 edited this page Nov 9, 2018 · 2 revisions

The general picture: Input events and derived events get processed: a concept will be created for them, and they match the best asymmetrically matched concept available (Event with SDR [1,0,1,0,1] fully asymmetrically matches concept SDR [1,0,1,0,0], but not vice versa). The event then interacts with the events within the concepts, and also gets added to them. The goal of that interaction is to create new temporal sequences that are themselves events to be processed. Additionally, a sequence (&/,a,b) leads to the formation of hypothesis a =/> b which enters the postcondition implication table of a and precondition implication table of b. The processed event also interacts with this pre- and post-condition implications of the matched concepts to derive predictions and explanation events.

Example, in detail:

Sequence a b a (each "atomic" SDR's) To get a better idea of what goes on in the background, we will treat the event's SDR's as NARS-like term ID's to make the example easier to follow. That is, because in ANSNA matching of events to concepts is not true/false, "match" or "no match", instead multiple concepts can potentially match the event with reasonable overlap, as explained in more detail after the example.

  1. Event a. comes into the system:

  1. Concept a is created and activated by a, as no concept SDR matches a.

  2. a enters event FIFO of concept a.

  3. Event a is sent to the (other) n highest priority concepts for temporal inference, there are none.

  4. Event b. comes into the system:


  1. Concept b is created and activated by b, as no concept SDR matches b.

  2. b enters event FIFO beliefs of concept b.

  3. Event b is sent to the (other) highest priority concepts for temporal inference, there is a.

  4. Temporal induction between a (all events in the FIFO) and b happens, >creating< <a =/> b> with Truth:Induction, and SDRSet(Imp,SDRTuple(a,b)). (see https://github.com/patham9/ANSNA/wiki/Input)

  5. <a =/> b> enters pre-conditions implications of concept b (and would revise up in there if there would be others of same content).

  6. <a =/> b> enters post-conditions implications of concept a (it's sent back, and also here revision would apply).

  7. Temporal intersection between a (all events in the FIFO) and b happens, >deriving< (&/,a,b) with Truth:Intersection in ALANN fashion with prio=prio(concept a)*truthExp(event b), SDRSet(Imp,SDRTuple(a,b))

  8. Event (&/,a,b). is processed from the derivations:


  1. Concept (&/,a,b) is created and activated by (&/,a,b), as no concept SDR matches (&/,a,b).

  2. (&/,a,b) enters event FIFO of concept (&/,a,b).

  3. Event a comes into the system:


  1. Concept a activated by a, as the concept SDR matches a.
  2. a enters event FIFO beliefs of concept a.
  3. Event a is sent to the (other) n highest priority concepts for temporal inference, a, b, and (&/,a,b) qualify.
  4. Temporal induction and temporal intersection as we already saw.
  5. Event a does inference with all the post-conditions implications: (if it would be a goal with all pre-conditions) a. and <a =/> b> derives b. (in ALANN fashion, with prio=prio(concept a)*truthExp(implication <a =/> b>))

IMPORTANT NOTE: So far this looked like a minimalistic NARS, without Inheritance, and with custom control strategy, where each event knows what concept to activate, . But it's actually one-to-many: All concepts an event's SDR, but to different degree! The system always goes for the best matches.

Some definitions of above first:

def SDRSet(a,b):
    return [a[i]|b[i] for i in range(term_size)]
Perm = Permutations(term_size).random_element()

We assumed terms are encoded by random encoders, encoding an input term to a specific random SDR, or if the input is a number, encoding close values to close SDR's (see HTM encoders: https://numenta.com/assets/pdf/biological-and-machine-intelligence/BaMI-Encoders.pdf)

Now when we use what we have, we already get a lot for free: An event SDRUnion(red,cat) will automatically be seen as a special case of cat, because the corresponding concept will match the SDR and thus predict similar consequences! Note that derivations, that came from matching events to concepts has to come with a truth "penalty" for the event's truth value, corresponding to how well SDRSet(flying,animal,approaching) can stand for SDRSet(animal,approaching), as the former was used as the latter. See https://github.com/patham9/ANSNA/wiki/SDRInheritance-for-matching,-and-its-truth-value

Important: When an event gets matched to the best matching existing concept, we still want a new concept with the event's SDR to be created too (as a low priority concept), not if a concept with exactly the event's SDR does already exist in memory though. This new concept will die off naturally if not used more often. (see usefulness in https://github.com/patham9/ANSNA/wiki/Attention:-what-to-priorize,-what-to-forget) Or it will be matched and used, and gradually becomes more than what the individual events suggested it to be: https://github.com/patham9/ANSNA/wiki/Concept:-Conceptual-Interpolation