Dr.PeiWang@gmail.com | My favorites | Profile | Sign out
Project Hosting will be READ-ONLY Wednesday at 8:00am CDT due to brief maintenance.
Project Home Downloads Wiki Issues Source
Search
for
SingleStepTestingCases  
Expected results of inference rules
Phase-QA
Updated Jan 11, 2010 by NARS.W...@gmail.com

There are example files in http://code.google.com/p/open-nars/source/browse/trunk/nars-dist/Examples/, showing conclusions of single-step inference.

Each file contains a sequence of examples. An example looks like the following:

********** revision
  IN: <bird --> swimmer>.
  IN: <bird --> swimmer>. %0.1;0.6%
1
 OUT: <bird --> swimmer>. %0.87;0.91% {2: 2;1} 

A line starting with '*' indicates the beginning of a new example, and will initialize the system when feed into the demo as input. A line starting with '/' is a comment. A line starting with an optional "IN:" is an input task to the system, and a line starting with "OUT:" is output from the system. A line containing a single number indicates the number of inference cycles between in/out lines. Spaces, tabs, and blank lines are ignored.

String like "<bird --> swimmer>. %0.87;0.91%" is a Narsese sentence, and the grammar is specified in InputOutputFormat. The following "{2: 2;1}" is a 'stamp' automatically attached by the system, to indicate the source of that line.

The demonstration of NARS, under nars-dist, can run the examples in two ways: when the system runs as either application or applet, the user can use copy/paste an example into the input window, then click "OK" to run the example as instructions. In this process, the output lines and the stamps will be ignored. When the system runs as an application, the user can also load a complete example file, by choosing it from the Main Window, using "File/Load experience". Since the input/output line produced in this way will be quickly overwritten in the display area, it is necessary to save it into a file, using "File/Save experience". The first time this item is selected, the user can open a (new or existing) file to catch the user/system communication. To close the file, select "File/Save experience" again.

With this file load/save function, each example file comes with two versions. The "abridged" version is manually edited to only contain the relevant information for each example, so is easier to understand; the "complete" version contains all actual user/system communication as displayed then the "abridged" version is feeded into the system. It means, if a "complete" version is loaded into the system as input, the output (saved into another file) should be an identical copy. This will be useful in testing, when the changes made in the system should not cause any difference in the system's input/output mapping.

The examples are grouped according to the order they are introduced in the book Rigid Flexibility: The Logic of Intelligence. They are not self-explained, and the readers should consult the book to fully understand them.

  • Example-NAL1 shows the basic rules on atomic terms and the inheritance relation, including revision, deduction, abduction, induction, and question answering
  • Example-NAL2 shows the inference on variants of inheritance (similarity, instance, property, etc.) and sets, and include rules like comparison and analogy.
  • Example-NAL3 shows compound term composition and decomposition rules, where the conpound terms are intersections or differences of simpler terms.
  • Example-NAL4 shows inference on ordinary (non-inheritance) relations, where the conpound terms are products and images.
  • Example-NAL5 shows basic higher-order inference, where a statement is treated as a term. Some of the inference here is isomorphic to the inference introduced in NAL1 and NAL3, and some others, like detachment and conditional inference, are new.
  • Example-NAL6 shows the use of variable terms in higher-order inference, including the rules for the unification, elimination, and introduction of variable terms.
  • Example-NAL7 shows temporal inference on events, which is roughly the rules of NAL5 and NAL6, plus temporal information.
  • Example-NAL8 shows procedural inference. It consists of 4 files, and is explained further in ProceduralExamples.
Hint: You can use Wiki Syntax.
Enter a comment:


Powered by Google Project Hosting