Skip to content

Arrays and Percepts

Christian H edited this page Jun 8, 2021 · 4 revisions

Objects within NARS can be multi-dimensional, in which case we refer to them as Arrays.

Types of arrays include:

  • Array terms (e.g. @P)
  • Statements (e.g. ({@P} --> [t]))
  • Sentences (e.g. ({@P} --> [t]). %1.0;0.9%)

An array can be any size, and contains multiple elements which may be accessed using their (relative or absolute) indices. Array indices are normalized into relative indices in the range [-1.0,1.0].

A Percept is a special type of Judgment array:

  • The subject term is a singleton extensional set containing an array term.
  • The predicate term is a singleton intensional set (a property).
  • The percept has a truth-value, and also contains judgments for each array element

An example of a Percept is ({@eye} --> [bright]). %f;c% where the truth-value indicates the accuracy and stability of the sensory device.

Each Percept's element is a regular judgment, where the subject is the indexed array term (i.e. the array term element) inheriting the singleton intensional set (i.e. the property).

An example of a Percept element is: ({@eye[-0.5,0.5]} --> [bright]). %f;c%, where f describes the intensity of the sensation and c describes the confidence of the sensation.

Sentence Array / Percept Example

A 2D sentence array can represent a visual image, such as a 5x5 array representing a cross:

vision:
[
[0.0, 0.0, 255, 0.0, 0.0],
[0.0, 0.0, 255, 0.0, 0.0],
[255, 255, 255, 255, 255],
[0.0, 0.0, 255, 0.0, 0.0],
[0.0, 0.0, 255, 0.0, 0.0]
]

GUI Visualization:

Percepts

Clone this wiki locally