Code Monkey home page Code Monkey logo

open-nars's Introduction

Source Code
-----------
Under the nars/ directory is the code Pei Wang originally moved into the project, which is still the base of his own programming. This is no active anymore, replaces by nars_core_java/ and nars_gui/ .

Later Joe Geldart started the open-nars version of NARS, which contains many good ideas (many of which are accepted into 1.5), but it isn't fully consistent with Pei's plan, especially about the new layers (7,8,9), so Pei didn't continue on that code base.

In nars_core_java/ and nars_gui/ are the NARS core and the Swing GUI in Java. This came out of the code of Pei Wang in nars/ directory. This is the currently active code.

nars-dist/ contains a NARS distribution (executable, examples, web page with applet), that could be zipped for releases.

In nars_core/ there is an embryo of NARS in Scala (not currently active, just to see how NARS could look in Scala).

The test suite is nars_core/src/test/java/nars/main_nogui/TestReasoning0.java .


Build
-----
There are scripts for Linux and Windows to compile and create the executable jar:
build.sh and build.bat .

Test
----
The unit test suite is here. It ensures non-regression of the reasoner:
nars_core/src/test/java/nars/main_nogui/TestReasoning.java
It works classically: for each  XX-in.txt in directory nars-dist/Examples, it runs NARBatch, and compares actual result with reference result  XX-out.txt.
To create a new test input, add the NARS input as XX-in.txt in nars-dist/Examples , run the test suite, and move result file from temporary directory
/tmp/nars_test/XX-out.txt
into nars-dist/Example .
NOTE:
Due to the sensitivity of results regarding the implementation of the reasonner, it is difficult to write robust tests. But for pure non-regression tests, the test is usable.


Source Code status
------------------
See also http://code.google.com/p/open-nars/wiki/ProjectStatus
Current version has been fully tested for single capability at a time; there may still be bugs when combining capabilities.

Jean-Marc Vanel is working on this roadmap, mainly in GUI and software engineering tasks :
- reestablish a non-regression test suite
- make an independant syntax verifyer based on a grammar parser : it will give the column & line of error (there is a Scala combinator grammar)
- separe NARS in 2 modules with a Maven build : nars_gui and nars_core_java

open-nars's People

Contributors

jmvanel avatar patham9 avatar pei2nars avatar

open-nars's Issues

set decomposition

The following example works fine:

*****
  IN: <(|,a,b) --> c>. %1.00;0.90% {0 : 1} 
  IN: <a --> c>?  {0 : 2} 
  IN: <b --> c>?  {0 : 3} 
29
 OUT: <a --> c>. %1.00;0.81% {28 : 1} 
162
 OUT: <b --> c>. %1.00;0.81% {190 : 1} 

However, the set version does not work:

*****
  IN: <{a,b} --> c>. %1.00;0.90% {0 : 1} 
  IN: <{a} --> c>?  {0 : 2} 
  IN: <{b} --> c>?  {0 : 3} 

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 6:27

Added display of the derivation in ConceptWindow

Change Judgment to take (possibly null) premises in order to display the
derivation.

In ConceptWindow, added "Derivation" Checkbox, which is checked by default.
 Can be unchecked if the derivation becomes too long.

Code changes already committed. Please review.



Original issue reported on code.google.com by [email protected] on 13 Sep 2009 at 7:59

in this case it seams to fails to draw a conclusion from 2 derived conclusion

What steps will reproduce the problem?

//giving evidence for the meaning of a simple controlled english
<<(*,$a,is,$b) --> sentence> <=> <$a --> $b>>.  %1.00;0.99%
<<(*,$a,is,$b,if,$c,is,$d) --> sentence> <=> (||,(--,<$c --> $d>),<$a --> 
$b>)>.  %1.00;0.99%

//example
<(*,bmw,is,car) --> sentence>. %1.00;0.99%
<(*,mercedes,is,car,if,bmw,is,car) --> sentence>. %1.00;0.99%
//the system is able to derive:
//OUT: <bmw --> car>. %1.00;0.98% {27 : 3;1}
//OUT: (||,<mercedes --> car>,(--,<bmw --> car>)). %1.00;0.98% {59 : 2;4}
//from which should directly follow:
<mercedes --> car>?
//but nars is unable to answer it even after 100000 steps

What is the expected output? What do you see instead?
<mercedes --> car> is expected
 OUT: <bmw --> (/,sentence,_,is,car)>. %1.00;0.99% {576649 : 3} is given as answer after 500000 steps, even if forgetting rate is zero.


What version of the product are you using? On what operating system?
1.5.5

Please provide any additional information below.
Interestingly, when I give the 2 conclusion I expect to derive the wanted 
conclusion from in a fresh memory, the wanted conclusion follows after 18 steps 
already:

*****RESET*****
  IN: <bmw --> car>. %1.00;0.98% {0 : 1} 
  IN: (||,<mercedes --> car>,(--,<bmw --> car>)). %1.00;0.98% {0 : 2} 
6
 OUT: (--,<bmw --> car>). %0.00;0.98% {6 : 1} 
12
 OUT: <mercedes --> car>. %1.00;0.96% {18 : 1;2} 


Original issue reported on code.google.com by patham9 on 8 Apr 2014 at 9:10

regression in Pattern Recognition In NARS - Matthew Zaikowski

What steps will reproduce the problem?

1. Load in NARS :
use_cases/pattern_matching1/pattern_matching_1.5_case1.nars
https://open-nars.googlecode.com/svn/trunk/use_cases/pattern_matching1/pattern_m
atching_1.5_case1.nars

2. add any number of steps > 57 ( works with NARS 1.3.3 and 57 steps ).
3. set silence level = 100

What is the expected output?
answer to the query

What do you see instead?
nothing

Original issue reported on code.google.com by jeanmarc.vanel on 28 Mar 2013 at 3:14

Variable in negation

A bug found by Jamison Peake.

The second question in the following is not answered.

*****
  IN: (--,<Player1 --> Bad>). %1.00;0.90% {0 : 1} 
  IN: <(--,<$1 --> Bad>) ==> <$1 --> Good>>. %1.00;0.90% {0 : 2} 
  IN: <Player1 --> Bad>?  {0 : 3} 
  IN: <Player1 --> Good>?  {0 : 4} 
7
 OUT: <Player1 --> Bad>. %0.00;0.90% {6 : 1 : (--,<Player1 --> Bad>)} 

Though the following example work fine.
*****
  IN: (--,<Player1 --> Bad>). %1.00;0.90% {0 : 1} 
  IN: <(--,<Player1 --> Bad>) ==> <Player1 --> Good>>. %1.00;0.90% {0 : 2} 
  IN: <Player1 --> Bad>?  {0 : 3} 
  IN: <Player1 --> Good>?  {0 : 4} 
11
 OUT: <Player1 --> Good>. %1.00;0.81% {10 : 1;2 : (--,<Player1 --> Bad>);(--,<Player1 --> Bad>);<(--,<Player1 --> Bad>) ==> <Player1 --> Good>>} 
5
 OUT: <Player1 --> Bad>. %0.00;0.42% {15 : 1;2;2 : (--,<Player1 --> Bad>);(--,<Player1 --> Bad>);<(--,<Player1 --> Bad>) ==> <Player1 --> Good>>;<(--,<Player1 --> Bad>) ==> <Player1 --> Good>>;<Player1 --> Good>} 

The issue is probably also caused by the second-level variable unification 
problem.

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 6:37

Inference from <{p1} --> penguin> to <(|,{p1},canary) --> (|,canary,penguin)>

What steps will reproduce the problem?
1. Launch NARS and enter the following:
2. Click menu View > Inference Log.
3. In the Inference Log text box, enter the following and select Watch String: 
<(|,{p1},canary) --> (|,canary,penguin)>
4. Click Run and wait for the Inference Log to stop at clock 5289.

What is the expected output? What do you see instead?
The inference log shows:
 --- 5289 ---
 * Selected Concept: penguin
 * Selected TaskLink: $0.8060;0.8000;0.9487$  _@(T4-2) <{p1} --> penguin>.
%1.0000;0.9000% {0: 7} 
 * Selected TermLink: $0.8859;0.1909;0.3887$  _@(T2-2) (|,canary,penguin)
!!! Derived: $0.2912;0.1662;0.3354$ <(|,{p1},canary) -->
(|,canary,penguin)>. %1.0000;0.9000% {0: 7} 

Is this right? NARS infers from <{p1} --> penguin> "p1 is a penguin" to
<(|,{p1},canary) --> (|,canary,penguin)> "something that is p1 and a canary
is a canary or a penguin", with the same truth value.  It seems that maybe
the conclusion should be
<(&,{p1},canary) --> (|,canary,penguin)>

Original issue reported on code.google.com by [email protected] on 13 Sep 2009 at 9:00

Depth of TermLink

The first question is correctly, but the second is not, though they are similar.

*****RESET*****
  IN: <(--,<robin --> bird>) ==> <robin --> flyer>>. %0.10;0.90% {0 : 1} 
  IN: <(--,<robin --> flyer>) ==> <robin --> bird>>?  {0 : 2} 
20
 OUT: <(--,<robin --> flyer>) ==> <robin --> bird>>. %0.00;0.45% {20 : 1} 

*****RESET*****
  IN: <(--,<$1 --> bird>) ==> <$1 --> flyer>>. %0.10;0.90% {0 : 1} 
  IN: <(--,<$1 --> flyer>) ==> <$1 --> bird>>?  {0 : 2} 

This issue is caused by the fact that <(--,<$1 --> bird>) ==> <$1 --> flyer>> 
is not linked in concept "bird", since it is on the 3rd level, and TermLinks 
only link to terms in the first two levels of a compound. A possible solution 
is to consider "bird" as in the second level, since <$1 --> bird> is a variable 
so cannot be linked.

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 4:52

depth of variable unification

The following inputs produce no derivation:
***** 
  IN: (&&,<#1 --> lock>,<<$2 --> key> ==> <#1 --> (/,open,$2,_)>>). %1.00;0.90% {0 : 1} 
  IN: <{key1} --> key>. %1.00;0.90% {0 : 2} 
*****
  IN: <<$1 --> lock> ==> (&&,<#2 --> key>,<$1 --> (/,open,#2,_)>)>. %1.00;0.90% {0 : 1} 
  IN: <{key1} --> key>. %1.00;0.90% {0 : 2} 

On the other hand, the following examples work fine:
***** 
  IN: (&&,<#1 --> lock>,<<$2 --> key> ==> <#1 --> (/,open,$2,_)>>). %1.00;0.90% {0 : 1} 
  IN: <{lock1} --> lock>. %1.00;0.90% {0 : 2} 
3
 OUT: <<$1 --> key> ==> <{lock1} --> (/,open,$1,_)>>. %1.00;0.43% {3 : 2;1 : <{lock1} --> lock>;(&&,<#1 --> lock>,<<$2 --> key> ==> <#1 --> (/,open,$2,_)>>)} 
*****
  IN: <<$1 --> lock> ==> (&&,<#2 --> key>,<$1 --> (/,open,#2,_)>)>. %1.00;0.90% {0 : 1} 
  IN: <{lock1} --> lock>. %1.00;0.90% {0 : 2} 
5
 OUT: <<$1 --> key> ==> <(*,$1,{lock1}) --> open>>. %1.00;0.43% {9 : 2;1 : <{lock1} --> lock>;(&&,<#1 --> lock>,<<$2 --> key> ==> <#1 --> (/,open,$2,_)>>)} 

The problem is caused by that variable unification only happens in the 
first-level components of compound terms. Though it is impossible to carry out 
unification at an arbitrary level, it seems necessary to do so at the second 
level.  

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 6:07

compound decomposition

What steps will reproduce the problem?
********** compound decomposition, two premises
  IN: <robin --> (|,bird,swimmer)>. %1.00;0.90% {0 : 1} 
  IN: <robin --> swimmer>. %0.00;0.90% {0 : 2} 

What is the expected output? 
OUT: <robin --> bird>. %1.00;0.81% {3 : 1;2} 

What do you see instead?
Nothing


Original issue reported on code.google.com by patham9 on 12 Jul 2014 at 1:29

NARS infers from <{b1} --> fly> to <(|,{b1},bird) --> fly>

What steps will reproduce the problem?
1. Launch NARS and click menu View > Inference Log
2. Enter the following input and click Run:
<{b1} --> bird> .
<{b1} --> fly> .
<{b2} --> bird> .
<{b2} --> fly> .
<bird --> fly> ?

3. After the inference log displays clock cycle 2436, click Stop.

What is the expected output? What do you see instead?
The inference log displays:
 --- 2436 ---
 * Selected Concept: b1
 * Selected TaskLink: $0.5950;0.8000;0.9487$  _@(T4-1-1) <{b1} --> fly>.
%1.0000;0.9000% {0: 2} 
 * Selected TermLink: $0.3333;0.1943;0.3354$  _@(T2-1-1) (|,{b1},bird)
!!! Derived: $0.1304;0.1397;0.2810$ <(|,{b1},bird) --> fly>.
%1.0000;0.4737% {0: 2} 

This is derived in nars.inference.StructuralRules.structuralCompose1 at the
line
   structuralStatement(compound, pred, TruthFunctions.implied(truth));
where
compound: IntersectionInt "(|,{b1},bird)"
pred: Term "fly"
truth: "%1.0000;0.9000%"
TruthFunctions.implied(truth)): "%1.0000;0.4737%"

Is this derivation correct?  In your email, you said it may not be
http://groups.google.com/group/open-nars/msg/66680643db403b61



Original issue reported on code.google.com by [email protected] on 11 Sep 2009 at 7:13

Dependent variable elimination

The following bug was found by Jamison Peake when working on his project 
(http://www.cis.temple.edu/~pwang/Implementation/Cases/JamisonPeake.docx).

  IN: <(&&,<#1 --> [FF]>,<{$2} --> #1>,<{$3} --> #1>) ==> (&&,<$2 --> [bad]>,<$3 --> [bad]>)>. %1.00;0.90% {0 : 1} 
  IN: <Q1 --> [FF]>. %1.00;0.90% {0 : 2} 
3
 OUT: <(&&,<{$1} --> #2>,<{$3} --> #2>) ==> (&&,<$1 --> [bad]>,<$3 --> [bad]>)>. %1.00;0.81% {3 : 2;1 : <Q1 --> [FF]>;<(&&,<#1 --> [FF]>,<{$2} --> #1>,<{$3} --> #1>) ==> (&&,<$2 --> [bad]>,<$3 --> [bad]>)>} 

Here the dependent variable #1 in the first promise is not correctly 
substituted by Q1 in the conclusion.

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 4:32

java.lang.IndexOutOfBoundsException occurs when loading Example-MultiStep-edited

What steps will reproduce the problem?
1. click File/Load experience
2. select Example-MultiStep-edited.txt
3.

What is the expected output? What do you see instead?
The system should run to a stop after the whole file is processed. However, an 
exception is thrown at the last example.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by NARS.Wang on 20 Jun 2014 at 8:31

Matt's pattern matching cases again

What steps will reproduce the problem?
See issue 23

What is the expected output? What do you see instead?
This bug report concerns the first three cases in ther report ( related to each 
other ).
Case 1 does work either with 1.3.3 or with 1.5.2 .

Case 2 does not work neither with 1.3.3 nor with 1.5.2 .
Even when simplified thus :

<r1 --> red>.
<b1 --> blue>.
// The third statement is the derived result from Case #1
<(*,r1,b1) --> pattern1>.
// NARS is then asked if the remaining initial statement from Case 1 is true
<(&&, <$r --> red>,<$b --> blue>) ==> <(*,$r,$b) --> pattern1>>?
1000

Case 3 does work with 1.3.3.

  IN: <(&&,<#1 --> [blue]>,<#2 --> [red]>)==><(*,#2,#1) --> pattern1>>. %1.00;0.90% {0 : 1} 
  IN: <(*,{r1},{b1}) --> pattern1>. %1.00;0.90% {0 : 2} 
  IN: <{r1} --> ?1>?  {0 : 3} 
91
 OUT: <{r1} --> [red]>. %1.00;0.40% {87 : 2;1} 

but with 1.5.2 the result is not the one expected, even with 2000 steps:

  IN: <(&&,<$1 --> [blue]>,<$2 --> [red]>) ==> <(*,$2,$1) --> pattern1>>. %1.00;0.90% {0 : 1} 
  IN: <(*,{r1},{b1}) --> pattern1>. %1.00;0.90% {0 : 2} 
  IN: <{r1} --> ?1>?  {0 : 3} 
50
 OUT: <{r1} --> (/,pattern1,_,{b1})>. %1.00;0.90% {23 : 2} 

Original issue reported on code.google.com by jeanmarc.vanel on 29 Mar 2013 at 3:27

structure mapping

The current result:
  IN: <(*,p1,p2) <-> (*,s1,s2)>. %1.00;0.90% {0 : 1} 
  IN: <(*,p1,p3) <-> (*,s1,s3)>. %1.00;0.90% {0 : 2} 
  IN: <(*,p1,p2,p3) <-> (*,s1,s2,s3)>?  {0 : 3} 
2053
 OUT: <(*,p1,p2,p3) <-> (*,s1,s2,s3)>. %1.00;0.31% {2052 : 1;1;1;2;1;1;2;2 : <(*,s1,s2,p3) <-> (*,s1,s2,s3)>;<(*,s1,p2,p3) <-> (*,s1,s2,p3)>;<(*,p1,s2,s3) <-> (*,s1,s2,s3)>;<p1 <-> s1>;<(*,p1,s2,s3) <-> (*,s1,s2,p3)>;<p1 <-> s1>;<(*,p1,p2,p3) <-> (*,s1,s2,p3)>;<(*,p1,p2,p3) <-> (*,p1,s2,s3)>;<(*,p1,s2,s3) <-> (*,s1,s2,s3)>} 

Since the conclusion can be derived as a conjunction of the premises, its 
confidence should be 0.81.

The function of this example is explained in "Analogy in a General-Purpose 
Reasoning System" (http://www.cis.temple.edu/~pwang/Publication/analogy.pdf).

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 3:56

unification of multiple variables

The current code produces the following:

  IN: <<(*,$1,a) --> b> ==> <(*,$1,a) --> c>>. %1.00;0.90% {0 : 1} 
  IN: <<(*,a,$1) --> c> ==> <(*,a,$1) --> d>>. %1.00;0.90% {0 : 2} 
1
 OUT: <<(*,a,a) --> b> ==> <(*,a,$1) --> d>>. %1.00;0.81% {1 : 2;1 : <<(*,a,$1) --> c> ==> <(*,a,$1) --> d>>;<<(*,$1,a) --> b> ==> <(*,$1,a) --> c>>} 
 OUT: <<(*,a,$1) --> d> ==> <(*,a,a) --> b>>. %1.00;0.45% {1 : 2;1 : <<(*,a,$1) --> c> ==> <(*,a,$1) --> d>>;<<(*,$1,a) --> b> ==> <(*,$1,a) --> c>>;<<(*,a,$1) --> c> ==> <(*,a,$1) --> d>>;<<(*,$1,a) --> b> ==> <(*,$1,a) --> c>>} 

though the variable $1 in the conclusion should be replaced by the constant a.


Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 5:43

reflexive relations

To prevent meaningless compound terms, 1.5.5 does not allow the two terms in a 
statement to have each other as components. However, it makes reflexive 
relations, like the one in
  <(*,tim,tim) --> likes>.
to trigger exceptions. This issue is resolved by allowing Images to be an 
exception of the policy, as well as the corresponding changes in a few other 
places.

Original issue reported on code.google.com by NARS.Wang on 28 Jun 2014 at 8:10

Again: null truth in CompositionRules.decomposeCompound

This is basically to re-open Issue 2, but this includes the change in
Parameters, and the variables in the Results have different values.

To reproduce: 
[If you want the result faster, in the code for NARS.run, change
Thread.sleep(10) to
Thread.sleep(0).]
In the code for nars.main.Parameters, change MAXMUM_STAMP_LENGTH to 8.
In the code for nars.main.Parameters, change MAXMUM_BELIEF_LENGTH to 5.
Launch NARS.
In Parameter > Report Silence Level, set to 100 (to minimize output).
Enter the following input and click Run.
<{b1} --> bird> .
<{b1} --> fly> .
<{b2} --> bird> .
<{b2} --> fly> .
<{b3} --> bird> .
<{b3} --> fly> .
<{b4} --> bird> .
<{b4} --> fly> .
<{b5} --> bird> .
<{b5} --> fly> .
<{b6} --> bird> .
<{b6} --> fly> .
<{b7} --> bird> .
<{b7} --> fly> .
<{b8} --> bird> .
<{b8} --> fly> .
<{b9} --> bird> .
<{b9} --> fly> .
<{bA} --> bird> .
<{bA} --> fly> .
<bird --> fly> ?

Results:
After at least 77000 clock cycles, CompositionalRules.decomposeCompound calls
BudgetFunctions.compoundForward when truth is null (if the code to check
for this is
removed).  Similar to the initial bug report, 
index: 1
oldContent: Inheritance "<{b5} --> bird>"
compound: DifferenceExt "(-,{b5},fly)"


Original issue reported on code.google.com by [email protected] on 5 Sep 2009 at 7:14

Answers with independent variables.

What steps will reproduce the problem?
  IN: <<$1 --> good> ==> <$1 --> bad>>. %1.00;0.90% {0 : 1} 
  IN: <<$1 --> good> ==> <$1 --> bad>>?  {0 : 2} 

What is the expected output? 
<<$1 --> good> ==> <$1 --> bad>>. %1.00;0.90%

What do you see instead?
nothing

What is going on here? :D

Original issue reported on code.google.com by patham9 on 14 Jul 2014 at 10:47

conjunction decomposition in question

The following question is not answered:

*****
  IN: (--,a). %1.00;0.90% {0 : 1} 
  IN: (&&,a,b)?  {0 : 2}


Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 6:46

Missing variable introduction rule

The current NAL-6 misses another way to introduce a second variable by 
induction:
  IN: <<lock1 --> (/,open,$1,_)> ==> <$1 --> key>>.
  IN: <lock1 --> lock>.
OUT: <(&&,<#1 --> lock>,<#1 --> (/,open,$2,_)>) ==> <$2 --> key>>.

An inverse inference has been implemented as a form of deduction (Issue 29):
  IN: <lock1 --> lock>. %1.00;0.90% {0 : 1} 
  IN: <(&&,<#1 --> lock>,<#1 --> (/,open,$2,_)>) ==> <$2 --> key>>. %1.00;0.90% {0 : 2} 
1
 OUT: <<lock1 --> (/,open,$1,_)> ==> <$1 --> key>>. %1.00;0.81% 

The other inversion (abduction) should also be studied:
 IN: <<lock1 --> (/,open,$1,_)> ==> <$1 --> key>>.
 IN: <(&&,<#1 --> lock>,<#1 --> (/,open,$2,_)>) ==> <$2 --> key>>.
OUT: <lock1 --> lock>.

Original issue reported on code.google.com by NARS.Wang on 6 Jul 2014 at 9:37

set difference

A bug found by Jamison Peake.

No answer is reported for the following questions:

***** case 1
  IN: <Players <-> {Player1,Player2,Player3,Player4,Player5}>. %1.00;0.90% {0 : 1} 
  IN: <Bad <-> {Player1,Player2}>. %1.00;0.90% {0 : 2} 
  IN: <(-,Players,Bad) --> Good>. %1.00;0.90% {0 : 3} 
  IN: <{Player3,Player4,Player5} --> Good>?  {0 : 4} 

***** case 2
  IN: <(-,{Player1,Player2,Player3,Player4,Player5},{Player1,Player2}) --> Good>. %1.00;0.90% {0 : 1} 
  IN: <{Player3,Player4,Player5} --> Good>?  {0 : 2} 

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 6:52

Can't cast DifferenceExt to Statement

A DifferenceExt shouldn't be the content of a task --- (A-B) cannot be
a sentence by itself. I need to see the initial inputs to find where
the problem is.

Pei
- Hide quoted text -

On Sun, Aug 30, 2009 at 6:05 PM, Jeff Thompson<[email protected]> wrote:
>
> StructuralRules.structuralStatement throws the exception "Can't cast
> DifferenceExt to Statement" at the line:
>        Term content = Statement.make((Statement) task.getContent(),
> subject, predicate);
> This happens when the current task is a DifferenceExt, but DifferenceExt
> and Statement are siblings extending CompoundTerm.  Any ideas? (This
> would take me a while to sort out.)
>
> - Jeff

Original issue reported on code.google.com by NARS.Wang on 31 Aug 2009 at 2:49

Show "perfect" belief in addition to "present" belief

In addition to the highest confidence "present" belief which can have mixed
positive and negative evidence, it is also useful to know the "perfect"
belief, which is the highest confidence belief that has only positive or
negative evidence.

nars.entity.Concept.tryUpdate has been changed to also keep perfectBelief,
which is the present belief that has frequency 1.0 or 0.0.  And
displayContent has been changed to show this in the ConceptWindow.

Please review.

Original issue reported on code.google.com by [email protected] on 11 Oct 2009 at 6:14

Variable unification

  IN: <<$1 --> bird> ==> <$1 --> animal>>. %1.00;0.90% {0 : 1} 
  IN: <<robin --> bird> ==> ?1>?  {0 : 2} 
7
 OUT: <<$1 --> bird> ==> <$1 --> animal>>. %1.00;0.90% {0 : 1} 

It seems more natural to answer <<robin --> bird> ==> <robin --> animal>>.

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 5:10

Missing variable introduction rule?

What steps will reproduce the problem?
  IN: <0 --> number>. %1.00;0.90%
  IN: <(/,successor,0,_) --> number>. %1.00;0.90%
  IN: <(/,successor,(/,successor,0,_),_) --> number>. %1.00;0.90%
  IN: <<$1 --> number> ==> <(/,successor,$1,_) --> number>>? 

What is the expected output? 
<<$1 --> number> ==> <(/,successor,$1,_) --> number>>

What do you see instead?
My computer, and a lot of paper.

I am not sure what is missing here, but such structural inference
should be possible I think, maybe Pei knows what's missing/going on.
Maybe also this issue leads to new insights.

Original issue reported on code.google.com by patham9 on 12 Jul 2014 at 10:04

Multi-Variable Introduction Rules are not correctly coded

What steps will reproduce the problem?
The following two examples in NAL-6 testing cases are wrong:
********** multiple variables introduction
  IN: <<#x --> key> ==> <lock1 --> (/,open,#x,_)>>. %0.8% 
  IN: <lock1 --> lock>.
1
 OUT: <<#1 --> key> ==> (&&,<#2(#1) --> (/,open,#1,_)>,<#2(#1) --> lock>)>. %0.80;0.83% 
********** multiple variables introduction
  IN: (&&,<lock1 --> (/,open,#x(),_)>,<#x() --> key>). %0.8%
  IN: <lock1 --> lock>.
1
 OUT: (&&,<#1() --> key>,<<#2 --> lock> ==> <#2 --> (/,open,#1(),_)>>). %1.00;0.39% 

What is the expected output?
********** multiple variables introduction
  IN: <<#x --> key> ==> <lock1 --> (/,open,#x,_)>>. %0.8% 
  IN: <lock1 --> lock>.
1
 OUT: (&&,<#1() --> lock>,<<#2 --> key> ==> <#1() --> (/,open,#2,_)>>). %0.80;0.83% 
********** multiple variables introduction
  IN: (&&,<lock1 --> (/,open,#x(),_)>,<#x() --> key>). %0.8%
  IN: <lock1 --> lock>.
1
 OUT: <<#1 --> lock> ==> (&&,<#1 --> (/,open,#2(#1),_)>,<#2(#1) --> key>)>. %1.00;0.39% 

What version of the product are you using? On what operating system?

Open-NARS Version 1.3.3, on Windows 7

Please provide any additional information below.

See NAL Specification, Table 8.6: Sample Multi-Variable Introduction Rules

Original issue reported on code.google.com by Dr.PeiWang on 14 Dec 2011 at 2:04

null truth in CompositionRules.decomposeCompound

Currently this rule is only used in forward inference, so truth cannot
be null when BudgetFunctions is used. I fixed the code as you
suggested, but still need the initial input to see when this happens.

Pei

On Sun, Aug 30, 2009 at 6:32 PM, Jeff Thompson<[email protected]> wrote:
>
> CompositionRules.decomposeCompound can call
> BudgetFunctions.compoundForward(truth, content) when truth is null,
> which eventually causes BudgetFunctions.truthToQuality to throw a null
> pointer exception.  This happened in decomposeCompound when:
> index: 0
> oldContent: Inheritance "<{b3} --> (~,bird,{b1})>"
> compound: DifferenceInt "(~,bird,{b1})"
>
> There is no case to handle this, so truth is never assigned a value.
> Should decomposeCompound handle every case?  If not, should it check for
> null truth before calling
> BudgetFunctions.compoundForward?
>
> - Jeff

Original issue reported on code.google.com by Dr.PeiWang on 31 Aug 2009 at 2:51

Wrong ShortFloat value when NEAR_FUTURE = 2.

What steps will reproduce the problem?
1. In nars.main.Parameters, set NEAR_FUTURE = 2.
2. Launch NARS and enter the following input.  (This issue happens with
just about any input):
<x --> y>.
<x --> z>.

3. Click Run.
4. Watch the console output.

What is the expected output? What do you see instead?
Console should be silent, but produces many warnings like:
!!! Wrong value: -0.024941444

These are from nars.entity.ShortFloat.setValue at line
        if ((v < 0) || (v > 1)) {
            System.out.println("!!! Wrong value: " + v);
Usually it seems that nars.inference.BudgetFunctions.revise passes a
negative "priority" to new BudgetValue.

Original issue reported on code.google.com by [email protected] on 24 Sep 2009 at 6:39

Bag.putIn can fail to put in the item, but does not inform the caller.

When nars.main.Memory.getConcept creates a new Concept, it calls
concepts.putIn which can fail to put in the new concept due to overflow. 
So, the returned Concept is not in the concepts Bag, yet the caller
continues to process as if it is.

Related, nars.storage.Bag.putBack (which calls putIn) can fail to put the
item back in the bag, but does not inform the caller.  So, for example,
nars.main.Memory.activateConcept picks out a Concept, but may fail to put
it back, and so Concept.insertTaskLink may put the TaskLink into taskLinks,
but when Memory.activateConcept is called, the Concept is actually removed
from Memory.concepts, creating an inconsistency.

One solution is for Bag.putIn, to return a status indicating whether it
failed to put in newItem and instead removed any entry for the key.

Original issue reported on code.google.com by [email protected] on 2 Sep 2009 at 9:02

Query variable

The following question cannot be answered:
*** mixed extension/intension
<a --> b>.
<b --> c>.
(&&, <a --> ?x>, <?x --> c>)?

Though the following two questions can be answered correctly:
*** common extension
<a --> b>.
<a --> c>.
(&&, <?x --> b>, <?x --> c>)?
*** common intension
<a --> c>.
<b --> c>.
(&&, <a --> ?x>, <b --> ?x>)?

Though independent and dependent variables should be used only as common 
extension, this restriction should not be extended to query variables.

Original issue reported on code.google.com by NARS.Wang on 22 Jun 2014 at 3:31

Contraposition Broken

With question:

  IN: <(--,<robin --> bird>) ==> <robin --> [flying]>>. %0.10;0.90% {0 : 1} 
  IN: <(--,<robin --> [flying]>) ==> <robin --> bird>>?  {0 : 2} 
8
 OUT: <(--,<robin --> [flying]>) ==> <robin --> bird>>?  {8 : 1} 
16
 OUT: <(--,<robin --> bird>) ==> <robin --> [flying]>>?  {24 : 1} 
 OUT: <(--,<robin --> bird>) ==> <robin --> [flying]>>?  {24 : 1} 
 OUT: <(--,<robin --> bird>) ==> <robin --> [flying]>>?  {24 : 1} 


Without question it's handled well:

  IN: <(--,<robin --> bird>) ==> <robin --> [flying]>>. %0.10;0.90% {0 : 1} 
9
 OUT: <(--,<robin --> [flying]>) ==> <robin --> bird>>. %0.00;0.45% {9 : 1} 

Hmm..

Original issue reported on code.google.com by patham9 on 27 Jul 2014 at 11:11

The close button on the window doesn't work

What steps will reproduce the problem?
1. Launch NARS
2. In the main window or Input Window, click the close button on the title bar.

What is the expected output? What do you see instead?
On each window, the close button on the title bar should behave the same as
the "Close", "Hide" or "Exit" button.

A patch has already been committed to source as follows:
Change nars.gui.NarsFrame to implement WindowListener.
In classes that extend NarsFrame, override windowClosing to perform the
same action as the "Close", "Hide" or "Exit" button.
Since nars.gui.MessageDialog doesn't extend NarsFrame, also make this
implement WindowListener and handle windowClosing the same as the "OK" button.

Original issue reported on code.google.com by [email protected] on 1 Sep 2009 at 5:06

ClassCastException in introVarDep

What steps will reproduce the problem?
1. Launch NARS and enter the following input:
<<bird --> fly> --> claimedByBob> .
<<{Tweety} --> bird> --> claimedByBob> .
<<(&, <#S --> #M>, <#M --> #P>) --> claimedByBob> ==> <<#S --> #P> -->
claimedByBob>>.
<?1 --> claimedByBob>?

2. Click Run.

What is the expected output? What do you see instead?
Expect NARS to run, but nars.inference.CompositionalRules.introVarDep at
statement "return (Conjunction) Conjunction.make(state1, state2, null);"
throws the exception "ClassCastException: nars.language.Inheritance cannot
be cast to nars.language.Conjunction".

The input to the call to make is:
state1: Inheritance "<#0() --> claimedByBob>"
state2: Inheritance "<#0() --> claimedByBob>"
The output from make is:
Inheritance "<#0() --> claimedByBob>"
But Inheritance cannot be base to Conjunction.


Original issue reported on code.google.com by [email protected] on 4 Sep 2009 at 7:31

Display the clock value of when a Judgment was created

What steps will reproduce the problem?
1. Launch NARS and enter the following input
<x --> y>.
<y --> x>?

2. Click menu View --> Inference Log

3. Click Walk a few times.

What is the expected output? What do you see instead?
The concept window shows:
  Present Belief:
<y --> x>. %1.0000;0.4737% {0: 1}
  <x --> y>. %1.0000;0.9000% {0: 1}

The Inference log shows that <y --> x>. %1.0000;0.4737% was derived at
clock 2, but this is not shown in the concept window since the creation of
the original Stamp is kept for single-premise inference like conversions,
structural composition, etc.  It is useful to know the clock value when the
Judgment was created so it is possible to find it in the Inference Log to
see the task links that were used, to re-trace in the debugger, etc.

We can't let Sentence just update the creationTime of the Stamp that it
stores, since this is used for temporal reasoning.  An idea is for Sentence
to display its own creation time in addition to the one in the Stamp, for
example:
<y --> x>. %1.0000;0.4737% {0: 1}  @2
  <x --> y>. %1.0000;0.9000% {0: 1}  @0

Any thoughts?

Original issue reported on code.google.com by [email protected] on 14 Sep 2009 at 2:51

Useless but correct statements

In respect to the discussion on "Comment on revision r313 in open-nars",
Pei presented the following example:

  IN: <<lock1 --> (/,open,$1,_)> ==> <$1 --> key>>. %1.00;0.90% {0 : 1}
6
 OUT: <<(*,$1,lock1) --> open> ==> <$1 --> key>>. %1.00;0.90% {6 : 1}
2
 OUT: <(&&,<lock1 --> (/,open,$1,_)>,<(*,$1,lock1) --> open>) ==> <$1 --> key>>. %1.00;0.81%
 OUT: <(||,<lock1 --> (/,open,$1,_)>,<(*,$1,lock1) --> open>) ==> <$1 --> key>>. %1.00;0.81%
 OUT: <<lock1 --> (/,open,$1,_)> ==> <(*,$1,lock1) --> open>>. %1.00;0.45%
 OUT: <<(*,$1,lock1) --> open> ==> <lock1 --> (/,open,$1,_)>>. %1.00;0.45%
 OUT: <<lock1 --> (/,open,$1,_)> <=> <(*,$1,lock1) --> open>>. %1.00;0.45%
***

It is not an real issue, because altough the resulting statements are useless, 
they are still correct. However, for documentation issues, I commited this as 
issue, so that when it is fixed, the commit and this issue can be interlinked 
like we usually do.

Original issue reported on code.google.com by patham9 on 26 Jul 2014 at 12:53

Variable pattern to be recognized

Given input:
<(&,<{Tweety} --> bird>,<bird --> fly>) --> claimedByBob>.
<<(&,<#1 --> #2>,<#3 --> #1>) --> claimedByBob> ==> <<#3 --> #2> --> 
claimedByBob>>. 

The expected output
<<{Tweety} --> bird> --> claimedByBob>.
does not appear.

The rules in nars.inference.RuleTables.detachmentWithVar fails to unify 
the first premise with the condition of the second premise. Instead of 
adding a specific patch for this example, it is necessary to cover all the 
variable patterns to be processed, maybe in a future version.

Original issue reported on code.google.com by NARS.Wang on 4 Sep 2009 at 11:12

Subterm Mapping

What steps will reproduce the problem?

  IN: <{t1,{t2,{t3}}} --> [p1,[p2,[p3]]]>. %1.00;0.90% {0 : 1}
  IN: <c <-> t3>. %1.00;0.90% {0 : 2}
  IN: <{t1,{t2,{c}}} --> [p1,[p2,[p3]]]>?  {0 : 3}
638
 OUT: <{t1,{t2,{c}}} --> [p1,[p2,[p3]]]>. %1.00;0.66% {637 : 1;2 : <c <-> t3>;<{c} <-> {t3}>;<{t1} --> [p1,[p2,[p3]]]>;<{t2,{c}} <-> {t2,{t3}}>;<{t1,{t2,{t3}}} --> [p1,[p2,[p3]]]>;<{t1,{t2,{c}}} <-> {t1,{t2,{t3}}}>} 

This is the example Pei gave,
the truth value should be %1.00;0.81% since the result
could follow by conjunction in one single step,
but depth of term link does not allow it like Pei pointed out.

Original issue reported on code.google.com by patham9 on 22 Jul 2014 at 9:08

Variable in second term leads NARS to the never ending process

What steps will reproduce the problem?
1. Paste following lines in Input window:
** BUG
(&/,<(*,Genotype,customer,1) --> #1>,<(*,Genotype,customerServlet,2) --> #1>).
<(&/, <(*, Genotype,#m0,1) --> #action>, <(*, Genotype,customerServlet,2) --> 
#action>) ==> <System --> ok>>.
55
2. Press OK.
 OUT: <System --> ok>. %1.00;0.81% {45 : 2;1} 
3. Note the #m0 variable in first product statement.

4. Paste following lines in Input window:
** BUG
(&/,<(*,Genotype,customer,1) --> #1>,<(*,Genotype,customerServlet,2) --> #1>).
<(&/, <(*, Genotype,customer,1) --> #action>, <(*, Genotype,#m,2) --> #action>) 
==> <System --> ok>>.
1024
5. Press OK.
 No output <System --> ok>
6. Note #m variable in second product statement.

7. Paste following lines in Input window:
** BUG
(&/,<(*,Genotype,customer,1) --> #1>,<(*,Genotype,customerServlet,2) --> #1>).
<(&/, <(*, Genotype,#m0,1) --> #action>, <(*, Genotype,#m1,2) --> #action>) ==> 
<System --> ok>>.
1024
8. Press OK.
 No output <System --> ok>.
9. Note #m2 variable in second product statement

What is the expected output? What do you see instead?
Expected: OUT: <System --> ok>. %1.00;0.81% {45 : 2;1} 
Seen:
1
 OUT: <<2 --> (/,#2,Genotype,#1,_)>==><System --> ok>>. %1.00;0.81% {27 : 2;1} 
13
 OUT: <<Genotype --> (/,#1,_,#2,2)>==><System --> ok>>. %1.00;0.81% {40 : 2;1} 
...
6
 OUT: <<2 --> (/,#2,Genotype,#1,_)>==><System --> ok>>. %1.00;0.81% {1018 : 2;1} 
6
 OUT: <<Genotype --> (/,#1,_,#2,2)>==><System --> ok>>. %1.00;0.81% {1024 : 2;1} 

My guess would be that for some reason the variable in second product statement 
leads NARS not to infer the <System --> ok> statement.
Please see complete log for the case number 5(above).

What version of the product are you using? On what operating system?
Open-NARS     Version 1.3.3     June 2010  
On Windows XP.

Original issue reported on code.google.com by [email protected] on 30 Jun 2010 at 11:28

Attachments:

Sentences - Meaning Reduction Test Bug

What steps will reproduce the problem?
IN: <<(*,$1,$2,$3) --> sentence> ==> <(*,$1,$3) --> $2>>. %1.00;0.90% {0 : 1} 
  IN: <<(*,the,$1,$2,the,#3,$4) --> sentence> ==> <(*,$1,$2,$4) --> sentence>>. %1.00;0.90% {0 : 2} 
  IN: <(*,the,cat,likes,the,good,fish) --> sentence>. %1.00;0.90% {0 : 3} 
  IN: <(*,cat,fish) --> likes>?  {0 : 4} 

What is the expected output?
  OUT: <(*,cat,fish) --> likes>. is expected.

What do you see instead?
Nothing (max silence level)

Original issue reported on code.google.com by patham9 on 29 Jun 2014 at 5:09

Variable is only bound to one term

What steps will reproduce the problem?
1. Launch NARS and enter the following input:
<<#1 --> a> ==> <#1 --> b>> .
<x --> a> .
<x --> b> ?
<y --> a> .
<y --> b> ?

2. Click Run.

What is the expected output? What do you see instead?
Expect NARS to separately bind the variable #1 to x and y to derive both
answers, but NARS appears to only bind to x:
<x --> b>. %1.0000;0.8100%
  <<x --> a> ==> <x --> b>>. %1.0000;0.9000%
  <x --> a>. %1.0000;0.9000%
NARS does not do the equivalent for y.

From looking at the code, it appears that NARS permanently mutates the
Concept <<#1 --> a> ==> <#1 --> b>> to <<x --> a> ==> <x --> b>>.  I don't
see any code to "unbind" a variable after a sentence is used in a
derivation, so that it could bind to another term like y.  (Maybe this is
why a lot of my experiments don't give the results I expect....)

Original issue reported on code.google.com by [email protected] on 15 Sep 2009 at 6:29

Exception: Negation cannot be cast to Statement

What steps will reproduce the problem?
1. Enter the following input and click Run:
<canary --> bird> .
<penguin --> bird> .
<<#1 --> canary> ==> (--, <#1 --> penguin>)> .
<canary --> fly> ?
<penguin --> fly> ?

What is the expected output? What do you see instead?
NARS should keep running, but instead throws the exception
ClassCastException: nars.language.Negation cannot be cast to
nars.language.Statement

in nars.inference.RuleTables.detachmentWithVar at the line
   Statement s2 = (Statement) statement.getPredicate();
with the following values
statement: Implication "<<#1 --> canary> ==> (--,<#1 --> penguin>)>"
statement.getPredicate(): Negation "(--,<#1 --> penguin>)"

Original issue reported on code.google.com by [email protected] on 11 Sep 2009 at 6:09

Judgment with Query variable bein derived.

What steps will reproduce the problem?
  IN: <raven --> bird>. %1.00;0.90% {0 : 1} 
  IN: <?1 --> raven>?  {0 : 2} 
1
 OUT: <?1 --> raven>. %1.00;0.47% {1 : 1} 

What is the expected output? What do you see instead?
Nonsensical Judgment  <?1 --> raven>. being generated. 

What version of the product are you using? On what operating system?
Revision 123. Windows XP Professional SP3. J2SE 1.6.0_18

Please provide any additional information below.
By current design, query variables shouldn't appear in a Judgment. 

Original issue reported on code.google.com by [email protected] on 27 Mar 2010 at 3:30

Atomic Compound Question Answering

What steps will reproduce the problem?
  IN: <h --> g>. %1.00;0.90% {0 : 1} 
  IN: <d --> g>. %1.00;0.90% {0 : 2} 
  IN: (&&,<d --> g>,<h --> g>)?  {0 : 3} 

What is the expected output? 
(&&,<d --> g>,<h --> g>).

What do you see instead?
Unanswered questions :)

The inference rules deal with (&&,<d --> g>,<h --> g>) fine, like the following 
example also shows:

  IN: <h --> g>. %1.00;0.90% {0 : 1} 
  IN: <d --> g>. %1.00;0.90% {0 : 2} 
  IN: <(&&,<d --> g>,<h --> g>) ==> <tim --> good>>. %1.00;0.90% {0 : 3} 
  IN: <tim --> good>?  {0 : 4} 
15
 OUT: <tim --> good>. %1.00;0.73% {14 : 2;1;3} 

So deriving (&&,<d --> g>,<h --> g>) maybe should be allowed in a 
question-driven way in order to make answering the question possible?

Original issue reported on code.google.com by patham9 on 16 Jul 2014 at 1:10

ConceptWindow Play and Stop buttons do nothing

What steps will reproduce the problem?
1. Launch NARS. In the InputWindow, enter A?
2. Click Run.
3. In the ConceptWindow for A, click Play in New Window.

What is the expected output? What do you see instead?
The original ConceptWindow for A does not get updates any more from the
Concept, so its Play and Stop buttons don't do anything, yet the user may
click them, expecting some behavior.  Expect inactive buttons to be disabled.

Fix already commmitted to source as follows:
In nars.gui.ConceptWindow, add method detachFromConcept which disables the
"Play" and "Stop" buttons. (Don't disable "Play in New Window" because it
can still be used to open a new ConceptWindow.)
In nars.entity.Concept.startPlay, check if a visible window already exists,
and call its detachFromConcept before creating the new ConceptWindow.


Original issue reported on code.google.com by [email protected] on 1 Sep 2009 at 5:15

Intruduction of terms in a compound statment may be arbitrary and possibly leads to any conclusion

What steps will reproduce the problem?
1. In nars.main.Parameters, set
MAXMUM_STAMP_LENGTH = 16;
MAXMUM_BELIEF_LENGTH = 8;

2. Launch NARS and enter the following input:
<{c1} --> canary> .
<{c1} --> fly> .
<{c2} --> canary> .
<{c2} --> fly> .
<{p1} --> penguin> .
<{p1} --> nofly> .
<{p2} --> penguin> .
<{p2} --> nofly> .
<<#1 --> nofly> ==> (--, <#1 --> fly>)> . %1; .9999%
<<#1 --> fly> ==> (--, <#1 --> nofly>)> . %1; .9999%
<<#1 --> nofly> ==> <#1 --> fly>> . %0; .9999%
<<#1 --> fly> ==> <#1 --> nofly>> . %0; .9999%
<canary --> fly> ?
<penguin --> nofly> ?
<canary --> nofly> ?
<penguin --> fly> ?

3. Click Run.

What is the expected output? What do you see instead?
After at least 131800 cycles, the Concept Window for <canary --> nofly>
includes the following derivation:
  <canary --> nofly>. %1.0000;0.4475% {128125: 8;7} 
    <(|,canary,penguin) --> nofly>. %1.0000;0.4475% {82778: 8;7} 
      <{p2} --> nofly>. %1.0000;0.9000% {0: 8} 
      <{p2} --> (|,canary,penguin)>. %1.0000;0.9000% {2870: 7} 
        <{p2} --> penguin>. %1.0000;0.9000% {0: 7} 

The conclusion <canary --> nofly> is based on evidence from statements 8;7.
 But the term "canary" is not related to these statements.  The problem is
that NARS can do a similar derivation starting from different evidence,
such as 5;6, "arbitrarily" introducing the term "canary" again, and
conclude <canary --> nofly> again, and do revision to combine them.  In
this way, NARS may be able to convince itself with high confidence of just
about anything. 

Original issue reported on code.google.com by [email protected] on 20 Sep 2009 at 10:22

Revision problem

We don't let happen the derivation of && statements,
this has consequences related to revision:

  IN: <a --> b>. %1.00;0.90% {0 : 1} 
  IN: <c --> d>. %1.00;0.90% {0 : 2} 
  IN: <(&&,<a --> b>,<c --> d>) ==> <f --> g>>. %1.00;0.90% {0 : 3} 
  IN: <f --> g>?  {0 : 4} 
8
 OUT: <f --> g>. %1.00;0.73% {7 : 1;2;3} 
2613
  IN: (&&,<a --> b>,<c --> d>). %1.00;0.90% {2621 : 6} 
517
 OUT: <f --> g>. %1.00;0.81% {3137 : 3;6} 
1872
  IN: <a --> b>?  {5010 : 7} 
1
 OUT: <a --> b>. %1.00;0.90% {0 : 1} 

What is the expected output? 
<f --> g> revised, also <a --> b>.

What do you see instead?
Not revised, it uses the more confident one though of course.

What do you think about that?

Original issue reported on code.google.com by patham9 on 20 Jul 2014 at 7:36

Term Window requires exact syntax.

What steps will reproduce the problem?
1. Launch NARS and enter
<a --> b>.
2. Click Run
3. Click menu View > Concept Content
4. Enter the following and click Show.  (Notice the extra spaces.)
< a --> b >

What is the expected output? What do you see instead?
NARS should show <a --> b>, but it ignores the input with extra spaces
because NARS will only match the exact string.  (This is also troublesome
for other cases like (&,a,b) vs. (&, a, b) which caused me frustration.)

Solution: TermWindow should use StringParser.parseTerm.  This requires
StringParser.parseTerm and StringParser.InvalidInputException to be
public.  (Is it a problem if these are public, or is this not the
right way to use parserTerm?)  The code changes are already committed to
SVN.  I will gladly revert if this is not a good idea.

Original issue reported on code.google.com by [email protected] on 7 Sep 2009 at 7:43

Exception: IntersectionInt cannot be cast to Statement

What steps will reproduce the problem?
1. Launch NARS and enter the following input:
<M --> S>.
<M --> P>.
(&&, S, <M --> P>).

2. Click Run.

What is the expected output? What do you see instead?
Expect NARS to run, but it throws "ClassCastException:
nars.language.IntersectionInt cannot be cast to nars.language.Statement"
in nars.inference.structuralStatement at line
  Term content = Statement.make((Statement) task.getContent(), subject,
predicate);

The values are:
task.getContent(): IntersectionInt "(|,P,S)"
subject: IntersectionInt "(|,P,S)"
predicate: Term "S"

structuralStatement is called from structuralCompose1.




Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 13 Sep 2009 at 7:27

Minor Stamp Issue

  IN: <{Pluto,Saturn} --> planet>. %1.00;0.90% {0 : 1} 
1
 OUT: <{Pluto} --> planet>. %1.00;0.81% {1 : 1} 

Shouldn't the derivation chain be {<{Pluto,Saturn} --> planet>}?
However, for these cases, it will not contain anything, I
assumed that for single premise tasks, 
currentBelief is not null, while currentTask is null.
But in this case currentBelief is null, while currentTask is not..

Why is that? For me this looks like a mistake, because
a singlePremiseTask has to be based on a belief,
while in a other task, currentTask will contain
the task the belief is combined with.

Original issue reported on code.google.com by patham9 on 19 Jul 2014 at 7:43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.