-
Notifications
You must be signed in to change notification settings - Fork 10
Cycle: The operating cycle
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.
- Event
a.
comes into the system:
-
Concept
a
is created and activated bya
, as no concept SDR matchesa
. -
a
enters event FIFO of concepta
. -
Event
a
is sent to the (other)n
highest priority concepts for temporal inference, there are none. -
Event
b.
comes into the system:
-
Concept
b
is created and activated byb
, as no concept SDR matchesb
. -
b
enters event FIFO beliefs of conceptb
. -
Event
b
is sent to the (other) highest priority concepts for temporal inference, there isa
. -
Temporal induction between
a
(all events in the FIFO) andb
happens, >creating<<a =/> b>
withTruth:Induction
, andSDRSet(Imp,SDRTuple(a,b))
. (see https://github.com/patham9/ANSNA/wiki/Input) -
<a =/> b>
enters pre-conditions implications of conceptb
(and would revise up in there if there would be others of same content). -
<a =/> b>
enters post-conditions implications of concepta
(it's sent back, and also here revision would apply). -
Temporal intersection between
a
(all events in the FIFO) andb
happens, >deriving<(&/,a,b)
withTruth:Intersection
in ALANN fashion withprio=prio(concept a)*truthExp(event b), SDRSet(Imp,SDRTuple(a,b))
-
Event
(&/,a,b).
is processed from the derivations:
-
Concept
(&/,a,b)
is created and activated by(&/,a,b)
, as no concept SDR matches(&/,a,b)
. -
(&/,a,b)
enters event FIFO of concept(&/,a,b)
. -
Event a comes into the system:
- Concept a activated by
a
, as the concept SDR matchesa
. -
a
enters event FIFO beliefs of concepta
. - Event
a
is sent to the (other)n
highest priority concepts for temporal inference,a
,b
, and(&/,a,b)
qualify. - Temporal induction and temporal intersection as we already saw.
- Event
a
does inference with all the post-conditions implications: (if it would be a goal with all pre-conditions)a.
and<a =/> b>
derivesb.
(in ALANN fashion, withprio=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