use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_elimination5.
@Test
public void variable_elimination5() {
TestNAR tester = test;
// en("Tweety has wings.");
tester.believe("<{Tweety} --> [withWings]>");
// en("If something can chirp and has wings, then it is a bird.");
tester.believe("<(&&,<$x --> [chirping]>,<$x --> [withWings]>) ==> <$x --> bird>>");
// en("If Tweety can chirp, then it is a bird.");
tester.mustBelieve(cycles, "<<{Tweety} --> [chirping]> ==> <{Tweety} --> bird>>", 1.00f, 0.73f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method testSimpleIndepUnification.
@Test
public void testSimpleIndepUnification() {
TestNAR t = test;
t.input("(<$x --> y> ==> <$x --> z>).");
t.input("(x --> y).");
t.mustBelieve(cycles, "(x --> z)", 1.0f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method multiple_variable_elimination.
@Test
public void multiple_variable_elimination() {
TestNAR tester = test;
// en("Every lock can be opened by every key.");
tester.believe("((($x --> key) && ($y --> lock)) ==> open($x, $y))");
// en("Lock-1 is a lock.");
tester.believe("({lock1} --> lock)");
// en("Lock-1 can be opened by every key.");
tester.mustBelieve(cycles * 3, "(($1 --> key) ==> open($1, {lock1}))", 1.00f, 0.73f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method variable_introduction3.
@Test
@Disabled
public void variable_introduction3() {
TestNAR tester = test;
// en("A gull is a swimmer.");
tester.believe("<gull --> swimmer>", 1f, 0.9f);
// en("A swan is never a swimmer.");
tester.believe("<swan --> swimmer>", 0f, 0.9f);
// en("Gull and swan have no commonality.");
tester.mustBelieve(cycles, "(&&,<gull --> #1>,<swan --> #1>)", 0.0f, 0.81f);
// en("Gull and non-swans have commonality.");
tester.mustBelieve(cycles, "(&&,<gull --> #1>,(--,<swan --> #1>))", 1.0f, 0.81f);
// tester.mustBelieve(cycles, "<<gull --> $1> ==> <swan --> $1>>", 0.80f, 0.45f); //en("I guess what can be said about gull usually can also be said about swan.");
// tester.mustBelieve(cycles, "<<swan --> $1> ==> <gull --> $1>>", 1.00f, 0.39f); //en("I guess what can be said about swan can also be said about gull.");
// tester.mustBelieve(cycles, "<<gull --> $1> <=> <swan --> $1>>", 0.80f, 0.45f); //en("I guess gull and swan share most properties.");
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL6Test method implVariableSubst.
@Test
public void implVariableSubst() {
TestNAR tester = test;
tester.believe("x:y.");
tester.believe("(x:$y==>$y:x).");
// en("there is a lock which is opened by key1");
tester.mustBelieve(cycles, "y:x", 1.00f, 0.81f);
}
Aggregations