/* * NARS-Examples-MultiSteps.txt * Pei Wang [All Rights Reserved] * last modified: August 2007 * * Examples showing conclusions of representative multiple-step inference using * the Java applet. * * Each example consists of * (1) input tasks and inference steps, * (2) the input/output lines (with their timing) displayed in the Main Window, * (3) a brief explanation, * separated by "====================". * * To hind intermediate conclusions, select menu item "Parameter/Report Silence Level", * to set the value to default (100), then click the "Hind" button. * * To run an example, do the following: * (1) reset the memory by selecting menu item "Memory/Initialize", * (2) copy the input tasks and inference steps and paste them into the Input Window, * e.g., for the first example, it is the following 6 lines: * bird>. * bird>. * bird>. %0.8% * 50 * bird>? * 60 * (3) click the "OK" botton. * * The user can edit an example, or make up new ones, according to the grammer * specified in the User's Guide of the NARS Applet. */ /* ----- Choice ----- */ bird>. bird>. bird>. %0.8% 50 bird>? 60 ==================== 0 IN: bird>. %1.00;0.90% 0 IN: bird>. %1.00;0.90% 0 IN: bird>. %0.80;0.90% 50 IN: bird>? 46 OUT: bird>. %0.80;0.90% 10 OUT: bird>. %1.00;0.90% ==================== When a question has more than one candidate answers, their order of evaluation is highly context-sensative. The system reports the best it has found so far, and therefore may report more than one answer to a given question. In this example, the system will settle down at the last answer even if it is given longer time. /* ----- Contradiction ----- */ beverage>. coffee>. (--, coffee>). 10 coffee>? beverage>? 10 ==================== 0 IN: coffee>. %1.00;0.90% 0 IN: (--, coffee>). %1.00;0.90% 10 IN: coffee>? 0 IN: beverage>? 1 OUT: coffee>. %0.00;0.90% 0 OUT: coffee>. %0.50;0.94% 0 OUT: beverage>. %1.00;0.90% ==================== A contradiction makes the system unsure on directly related questions, but will not make the system to derive an arbitrary conclusion on other sentences, as in propositional logic. /* ----- Confidence and Revision ----- */ . swimmer>. ? 20 . . ? 40 . %0% . %0% 10 ==================== 0 IN: <{Willy} --> swimmer>. %1.00;0.90% 0 IN: swimmer>. %1.00;0.90% 0 IN: <{Willy} --> fish>? 2 OUT: <{Willy} --> fish>. %1.00;0.44% 18 IN: <{Willy} --> whale>. %1.00;0.90% 0 IN: [black]>. %1.00;0.90% 0 IN: <{Willy} --> [black]>? 9 OUT: <{Willy} --> [black]>. %1.00;0.81% 31 IN: <{Willy} --> [black]>. %0.00;0.90% 0 IN: <{Willy} --> fish>. %0.00;0.90% 1 OUT: <{Willy} --> [black]>. %0.00;0.90% 0 OUT: <{Willy} --> fish>. %0.00;0.90% 1 OUT: <{Willy} --> [black]>. %0.32;0.92% 0 OUT: <{Willy} --> fish>. %0.08;0.90% ==================== Even when all the input judgments using the default confidence value, different rules produce conclusions with difference confidence, which have different sensitivity when facing the same amount of new evidence. /* ----- Deduction Chain ----- */ . bird>. animal>. 20 ? 20 ? 30 ==================== 0 IN: <{Tweety} --> robin>. %1.00;0.90% 0 IN: bird>. %1.00;0.90% 0 IN: animal>. %1.00;0.90% 20 IN: <{Tweety} --> bird>? 1 OUT: <{Tweety} --> bird>. %1.00;0.81% 19 IN: <{Tweety} --> animal>? 21 OUT: <{Tweety} --> animal>. %1.00;0.72% ==================== The conclusion of a previous step may be used as a premise in a following step. In the example, though both answers are positive (with frequency 1), their confidence is getting lower as the deduction chain gets longer. /* ----- Resemblance Chain ----- */ cat>. %0.9% tiger>. %0.9% lion>. %0.9% lion>? 30 ==================== 0 IN: dog>. %0.90;0.90% 0 IN: tiger>. %0.90;0.90% 0 IN: tiger>. %0.90;0.90% 0 IN: lion>? 29 OUT: lion>. %0.72;0.70% ==================== Given incomplete similarity, both frequency and the confidence decrease alone an inference chain. /* ----- Induction and Revision ----- */ swimmer>? bird>? 1 bird>. swimmer>. 20 bird>. swimmer>. 30 bird>. (--, swimmer>). 30 ==================== 0 IN: swimmer>? 0 IN: bird>? 1 IN: bird>. %1.00;0.90% 0 IN: swimmer>. %1.00;0.90% 6 OUT: bird>. %1.00;0.44% 0 OUT: swimmer>. %1.00;0.44% 14 IN: bird>. %1.00;0.90% 0 IN: swimmer>. %1.00;0.90% 8 OUT: bird>. %1.00;0.61% 0 OUT: swimmer>. %1.00;0.61% 22 IN: bird>. %1.00;0.90% 0 IN: (--, swimmer>). %1.00;0.90% 25 OUT: swimmer>. %0.66;0.70% ==================== (1) Question may still be remembered before available knowledge arrives, or after answers are reported; (2) The system can change its mind when new evidence is taken into consideration; (3) Positive evidence has the same effect on symmetric inductive conclusions, but negative evidence does not. /* ----- Mixed Inference ----- */ bird>. swimmer>. 10 swimmer>. %0.5;0.61% 20 . . 50 swimmer>? 300 ==================== 0 IN: bird>. %1.00;0.90% 0 IN: swimmer>. %1.00;0.90% 10 IN: swimmer>. %0.50;0.61% 20 IN: [feathered]>. %1.00;0.90% 0 IN: [feathered]>. %1.00;0.90% 50 IN: swimmer>? 212 OUT: swimmer>. %1.00;0.19% 57 OUT: swimmer>. %0.67;0.23% ==================== The final conclusion is produced using induction, abduction, deduction, and revision. The selection of inference rule is data driven, not specified explicitly in the input. There is no guarantee that all relevant evidence will be taken into consideration. /* ----- Compositionality ----- */ traffic_signal>. %0.1% <[red] --> traffic_signal>. %0.1% 10 <(&, [red], light) --> traffic_signal>? 10 . . 10 . . 20 ========= 0 IN: traffic_signal>. %0.10;0.90% 0 IN: <[red] --> traffic_signal>. %0.10;0.90% 10 IN: <(&,[red],light) --> traffic_signal>? 1 OUT: <(&,[red],light) --> traffic_signal>. %0.19;0.82% 9 IN: <{light_1} --> (&,[red],light)>. %1.00;0.90% 0 IN: <{light_1} --> traffic_signal>. %1.00;0.90% 10 IN: <{light_2} --> (&,[red],light)>. %1.00;0.90% 0 IN: <{light_2} --> traffic_signal>. %1.00;0.90% 2 OUT: <(&,[red],light) --> traffic_signal>. %0.30;0.84% 3 OUT: <(&,[red],light) --> traffic_signal>. %0.39;0.86% ==================== Initially, the meaning of compound term "(&,[red],light)" is determined by the meaning of its components "red" and "light", but it will no longer be the case when the system gets experience about the compound that cannot be reduced to its components. /* ----- Fuzzy Concept ----- */ . . 20 ? 30 . . %0% 40 . . 120 ==================== 0 IN: <{John} --> boy>. %1.00;0.90% 0 IN: <{John} --> (/,taller_than,{Tom},_)>. %1.00;0.90% 20 IN: <{Tom} --> (/,taller_than,_,boy)>? 30 OUT: <{Tom} --> (/,taller_than,_,boy)>. %1.00;0.44% 0 IN: <{David} --> boy>. %1.00;0.90% 0 IN: <{David} --> (/,taller_than,{Tom},_)>. %0.00;0.90% 40 IN: <{Karl} --> boy>. %1.00;0.90% 0 IN: <{Karl} --> (/,taller_than,{Tom},_)>. %1.00;0.90% 107 OUT: <{Tom} --> (/,taller_than,_,boy)>. %0.66;0.70% ==================== John's degree of membership to fuzzy concept "tall boy" depends on the extent to which he is taller than the other boys, determined according to available evidence.