OpenNARS 3.1.3 Development Edition
README for developers | Tangrui Li ([email protected])
[last edited 22/8/23]
The most important feature of OpenNARS 3.1.3 is about the extending of buffers which builds a bridge of information influx from the outside world and NARS. If it is correctly implemented, temporal and spatial relationships will be combined. Note that this “spatial” relationship does not referrer to the 3D real world. Currently, the multi-channel functionality of OpenNARS 3.1.3 is available in a limited scope. Narsese channel is disabled, and all inputs are predefined (pretending connected to the working environment). Functions related to operations are not fully implemented, so spatial relationships cannot be captured. In the following sections, details about the implementation will be explained.
“Atomic” (not necessarily atomic in syntax) events generated by sensorimotor channels have a priori truth-values and budgets. Take human vision as an example, we recognize the object in the center of the field of view easier, which is about the budget. For computer vision, all objects are detected with accuracy scores, which is about the truth-value.
These atomic events are restored in a priority queue, whose priority values are calculated externally (not the “priority” in the budget). This priority queue is also used to store compounds.
After having these atomic events, compounds are made by exhaustion. Say a buffer has
Focusing on the whole leads to less attention on the part, so if the compound and its components co-occur in priority queues, components’ priority will be penalized to 20% of the original and this is why we want to pick
The above steps are basically context-based, say there is a breaking news. But when I am working, I may not pay attention to that since it is “unimportant” subject to me. Therefore, these events will be checked against the memory. If it is in the memory, its priority will be increased by 20% mainly because this term had already built relationships with other terms (e.g., hotdog). It is planned to merge these priorities in some way in the future. After that, these two priority queues will not change in this cycle, and it is time to get the “highest concurrent compound” and the “highest temporal compound” as the highest focus. All these two compounds are recorded, as two choices (whether inherit the history or not, e.g., “red-blue-red” or “red-blue” and “blue-red”) when building temporal compounds. But by all means there is only one “present attention”, which is the higher one in the highest focus named the “highest compound”.
By figuring out the highest compound, since it is the attention, NARS needs to think what makes it worthy attention. Therefore,
In summary, a buffer has several slots, some are for the past and the future, one is for the present time. In addition to that, it also has a prediction table. Each slot has two priority queues, one for concurrent compounds, another for temporal compounds. Among them, we have the highest concurrent compound and the highest temporal compound which are used for recording as two choices. Among them, the higher one is the present focus, which is used for recording and forwarding.