use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_introduction.
// @Test
// public void testBeliefToEquivalence() {
//
// TestNAR tester = test;
// tester.believe("<<$1 --> bird> ==> <$1 --> swimmer>>", 1f, 0.9f); //en("I guess a bird is usually a swimmer.");
// tester.believe("<<$1 --> swimmer> ==> <$1 --> bird>>", 1f, 0.9f); //en("I guess a bird is usually a swimmer.");
// tester.mustBelieve(cycles, "<<$1 --> swimmer> <=> <$1 --> bird>>", 1.00f, 0.81f); //en("I guess a swimmer is a bird.");
// }
@Test
public void variable_introduction() {
TestNAR tester = test;
// en("A swan is a bird.");
tester.believe("<swan --> bird>");
// en("A swan is usually a swimmer.");
tester.believe("<swan --> swimmer>", 0.80f, 0.9f);
// en("I guess a swimmer is a bird.");
tester.mustBelieve(cycles, "<<$1 --> swimmer> ==> <$1 --> bird>>", 1.00f, 0.39f);
// en("I guess a bird is usually a swimmer.");
tester.mustBelieve(cycles, "<<$1 --> bird> ==> <$1 --> swimmer>>", 0.80f, 0.45f);
// tester.mustBelieve(cycles, "<<$1 --> swimmer> <=> <$1 --> bird>>", 0.80f, 0.45f); //en("I guess a bird is usually a swimmer, and the other way around.");
// en("Some bird can swim.");
tester.mustBelieve(cycles, "(&&, <#1 --> swimmer>, <#1 --> bird>)", 0.80f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method second_level_variable_unification.
@Test
public void second_level_variable_unification() {
TestNAR tester = test;
// en("there is a lock which is opened by all keys");
tester.believe("(((#1 --> lock) && ($2 --> key)) ==> open($2, #1))", 1.00f, 0.90f);
// en("key1 is a key");
tester.believe("({key1} --> key)", 1.00f, 0.90f);
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles, "((#1 --> lock) && open({key1}, #1))", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method strong_unification_simple.
// see discussion on https://groups.google.com/forum/#!topic/open-nars/1TmvmQx2hMk
@Test
public void strong_unification_simple() {
TestNAR tester = test;
tester.believe("(pair($a,$b) ==> ($a --> $b))", 1.00f, 0.90f);
tester.believe("pair(x,y)", 1.00f, 0.90f);
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles * 4, "(x --> y)", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method impliesUnbelievedYet.
// see discussion on https://groups.google.com/forum/#!topic/open-nars/1TmvmQx2hMk
@Test
public void impliesUnbelievedYet() {
TestNAR tester = test;
// x:a, x:#1, x:$1
tester.believe("(x:a ==> c:d).");
tester.believe("x:a.");
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles, "c:d", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_elimination_conj.
// @Test
// public void variable_elimination3() {
//
// TestNAR tester = test;
// tester.believe("<<$x --> animal> <=> <$x --> bird>>"); //en("Something is a animal if and only if it is a bird.");
// tester.believe("<robin --> bird>"); //en("A robin is a bird.");
// tester.mustBelieve(cycles, "<robin --> animal>", 1.00f, 0.45f /*0.81f*/); //en("A robin is a animal.");
//
// }
@Test
public void variable_elimination_conj() {
TestNAR tester = test;
// en("Some bird can swim.");
tester.believe("(&&,<#x --> bird>,<#x --> swimmer>)");
// en("Swan is a type of bird.");
tester.believe("<swan --> bird>", 0.90f, 0.9f);
// en("I guess swan can swim.");
tester.mustBelieve(// en("I guess swan can swim.");
cycles, // en("I guess swan can swim.");
"<swan --> swimmer>", // en("I guess swan can swim.");
0.90f, 0.43f);
}
Aggregations