NARS
User's Guide of the NARS Applet
Pei Wang
Last changed: August 16, 2006
Input/Output Language
In this demonstration, NARS implements the following formal language, Narsese.
The input and output of the system are sequences of Narsese sentences, plus number
of inference steps to be carried out.
<sentence> ::= <judgment>
| <question>
| <goal>
<judgment> ::= <statement> <truth-value>
<question> ::= <statement>
<goal> ::= <statement> <desire-value>
<statement> ::= <<term> <relation> <term>>
| <compound-statement>
| <term>
<term> ::= <word>
| <variable>
| <compound-term>
| <statement>
<relation> ::= --> // inheritance
| <-> // similarity
| {-- // instance
| --] // property
| {-] // instance-property
| ==> // implication
| <=> // equivalence
| =/> // predictive implication
| =\> // retrospective implication
| </> // predictive equivalence
<compound-statement> ::= (-- <statement>) // negation
| (&& <statement> <statement>+) // conjunction
| (|| <statement> <statement>+) // disjunction
| (&/ <statement> <statement>+) // sequential conjunction
| (/> <statement>) // future tense
| (\> <statement>) // past tense
<compound-term> ::= {<term>+} // extensional set
| [<term>+] // intensional set
| (& <term> <term>+) // extensional intersection
| (| <term> <term>+) // intensional intersection
| (- <term> <term>) // extensional difference
| (~ <term> <term>) // intensional difference
| (* <term> <term>+) // product
| (/ <term> <term>) // extensional image
| (\ <term> <term>) // intensional image
<variable> ::= <dependent-var>
| <independent-var>
| <query-var>
<dependent-var> ::= #<word>(<independent-var>*)
<independent-var> ::= #<word>
<query-var> ::= ?<word>
<truth-value> ::= %<frequency> <confidence>%
<desire-value> ::= !<frequency> <confidence>!
<frequency> : real number in [0, 1]
<confidence> : real number in (0, 1), with 0.9 as default
<word> : string in an alphabet
Graphical User Interface
The GUI of NARS consists of several windows. In the following, they are described one by one.
-
Main Window: it contains a menu bar, a text area,
a clock field, and four command buttons.
-
The following menu items are available in the applet version of NARS:
-
Memory/[Initialize]: vacate the memory.
-
View/[Concepts]: open a Bag Window to display all concepts.
-
View/[Task Buffer]: open a Bag Window to display the new
tasks to be processed.
-
View/[Inference Log]: show the Inference Window.
-
View/[Input Window]: show the Input Window.
-
Parameter/[Task Forgetting Rate]: display the task forgetting rate,
which controls how fast the priority values of tasks decay, in a Parameter
Window.
-
Parameter/[Belief Forgetting Rate]: display the belief forgetting rate,
which controls how fast the priority values of beliefs decay,
in a Parameter Window.
-
Parameter/[Concept Forgetting Rate]: display the concept forgetting rate,
which controls how fast the priority values of concepts decay, in a Parameter
Window.
-
Parameter/[Report Silence Level]: display the report silence level, which
indicates the resource-budget threshold for derived tasks to be reported
to the user, in a Parameter Window.
-
Help/[Related Information]: display pointers to NARS related information
in a Message Window.
-
Help/[About NARS]: display version and copyright information of NARS in
a Message Window.
-
The text area displays the conversation between the user and the system.
- Lines preceded by ">>>" are input provided by the user.
- Lines preceded by "<<<" are output provided by the system.
- Lines consist of single integers record the number of inference steps between
input/output events.
-
The Clock field is a counter of inference steps after the last input/output
event.
-
The command buttons correspond to basic operations:
- "Run": to start the inference engine.
- "Walk": to let the inference engine work for one cycle.
- "Stop": to stop the inference engine.
- "Exit": to exit NARS.
-
Input Window: it contains a text area and four
command buttons.
-
The text area allows the user to type or paste input lines, each of which
may be
-
a judgment, which is a statement with a frequency value and (optional) a
confidence value.
-
a question, a statement without truth value, and may contain query variable to
be matched.
-
a number, indicating the inference steps between input events.
-
a blank line, indicating a pause in the input.
-
The command buttons correspond to basic operations:
-
"OK": to feed the current lines into the system.
-
"Hold": to stop feeding the lines.
-
"Clear": to clear the text field.
-
"Hide": to hide the window.
-
Inference Window: it contains a text area
and three command buttons.
-
The text area displays information in each inference step, including
-
a step number.
- the concept selected in the step.
- the task selected in the step, if any.
- the belief selected in the step, if any.
-
the new task(s) derived in the step, if any.
-
The command buttons correspond to basic operations:
- "Play": to display the information..
- "Stop": to stop displaying.
- "Hide": to close the window.
-
Bag Window: it contains a text area, a slider
(optional), and three command buttons.
- The text area displays the items in the bag, according to their priority levels.
- The slider, if included, indicates and adjusts the priority threshold for
items to be displayed.
- The command buttons correspond to basic operations:
- "Play": to display the information.
- "Stop": to stop displaying.
- "Close": to close the window.
-
Parameter Window: it contains a slider and
three command buttons.
- The slider indicates and adjusts the current parameter value.
- The command buttons correspond to basic operations:
- "Undo": to reset the parameter to its previously saved value.
- "Default": to reset the parameter to its default value.
- "Hide": to save the current value and hide the window.
-
Message Window: it contains a text area and
a bottom.
- The text area displays a message to the user.
- The "OK" button closes the window.
The following color code is used in the GUI:
- Window color:
- blue means the main window.
- purple means a window that has only one instance in the system.
- green means a window that may have more than one instance in the system.
- Text background color:
- white means can be edited.
- light-cyan means display only.