use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method multiple_variable_elimination3.
@Test
public void multiple_variable_elimination3() {
TestNAR tester = test;
// en("There is a lock that can be opened by every key.");
tester.believe("(&&,<#x --> lock>,(<$y --> key> ==> open($y,#x)))");
// en("Lock-1 is a lock.");
tester.believe("<{lock1} --> lock>");
tester.mustBelieve(cycles * 2, "<<$1 --> key> ==> open($1,{lock1})>", 1.00f, 0.73f);
// 0.43f); //en("I guess Lock-1 can be opened by every key.");
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_introduction_with_existing_vars2.
@Test
public void variable_introduction_with_existing_vars2() {
// test that an introduced variable doesn't interfere with an existing variable of same name ($1)
TestNAR tester = test;
//
// en("A gull is a swimmer.");
tester.believe("<#1 --> swimmer>");
// en("Usually, a swan is a swimmer.");
tester.believe("<swan --> swimmer>", 0.80f, 0.9f);
// en("I guess what can be said about gull usually can also be said about swan.");
tester.mustBelieve(cycles, "<<#1 --> $2> ==> <swan --> $2>>", 0.80f, 0.45f);
// en("I guess what can be said about swan can also be said about gull.");
tester.mustBelieve(cycles, "<<swan --> $1> ==> <#2 --> $1>>", 1.00f, 0.39f);
// tester.mustBelieve(cycles, "<<#1 --> $2> <=> <swan --> $2>>", 0.80f, 0.45f); //en("I guess gull and swan share most properties.");
// en("Gull and swan have some common property.");
tester.mustBelieve(cycles, "(&&,<#1 --> #2>,<swan --> #2>)", 0.80f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method strong_unification_neg.
// see discussion on https://groups.google.com/forum/#!topic/open-nars/1TmvmQx2hMk
@Test
public void strong_unification_neg() {
TestNAR tester = test;
tester.believe("( --sentence($a,is,$b) ==> ($a --> $b) )", 1.00f, 0.90f);
tester.believe("sentence(bmw,is,car)", 0.00f, 0.90f);
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles, "car:bmw", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_unification3.
@Test
public void variable_unification3() {
TestNAR tester = test;
Param.DEBUG = true;
tester.log();
// en("If something is a swan, then it is a bird.");
tester.believe("<<$x --> swan> ==> <$x --> bird>>", 1.00f, 0.80f);
// en("If something is a swan, then it is a swimmer.");
tester.believe("<<$y --> swan> ==> <$y --> swimmer>>", 0.80f, 0.9f);
// en("I believe that if something is a swan, then usually, it is both a bird and a swimmer.");
tester.mustBelieve(cycles, "<<$1 --> swan> ==> (&&,<$1 --> bird>,<$1 --> swimmer>)>", 0.80f, 0.72f);
// en("I guess if something is a swimmer, then it is a bird.");
tester.mustBelieve(cycles, "<<$1 --> swimmer> ==> <$1 --> bird>>", 1f, 0.37f);
// en("I guess if something is a bird, then it is a swimmer.");
tester.mustBelieve(cycles, "<<$1 --> bird> ==> <$1 --> swimmer>>", 0.80f, 0.42f);
// tester.mustBelieve(cycles, "<<$1 --> bird> <=> <$1 --> swimmer>>", 0.80f, 0.42f); //en("I guess something is a bird, if and only if it is a swimmer.");
// tester.mustBelieve(cycles, "<<$1 --> swan> ==> (&&,(--,<$1 --> bird>),(--,<$1 --> swimmer>))>", 0.00f, 0.72f); //en("I believe that if something is a swan, then it is a bird or a swimmer.");
// technicallt this is the same as:
// tester.mustBelieve(cycles, "<<$1 --> swan> ==> (||,<$1 --> bird>,<$1 --> swimmer>)>", 1.00f, 0.72f); //en("I believe that if something is a swan, then it is a bird or a swimmer.");
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method strong_unification_pos.
// see discussion on https://groups.google.com/forum/#!topic/open-nars/1TmvmQx2hMk
@Test
public void strong_unification_pos() {
TestNAR tester = test;
tester.believe("(sentence($a,is,$b) ==> ($a --> $b))", 1.00f, 0.90f);
tester.believe("sentence(bmw,is,car)", 1.00f, 0.90f);
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles, "car:bmw", 1.00f, 0.81f);
}
Aggregations