use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method exemplification.
@Test
public void exemplification() {
TestNAR tester = test;
// .en("If robin can fly then robin is a type of bird.");
tester.believe("<<robin --> [flying]> ==> <robin --> bird>>");
// .en("If robin is a type of bird then robin is a type of animal.");
tester.believe("<<robin --> bird> ==> <robin --> animal>>");
// .en("I guess if robin is a type of animal then robin can fly.");
tester.mustBelieve(cycles, "<<robin --> animal> ==> <robin --> [flying]>>.", 1.00f, 0.45f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method compound_decomposition_two_premises3.
@Test
public void compound_decomposition_two_premises3() {
TestNAR tester = test;
// .en("Robin can fly or swim.");
tester.believe("(||,<robin --> [flying]>,<robin --> swimmer>)");
// .en("Robin cannot swim.");
tester.believe("<robin --> swimmer>", 0.0f, 0.9f);
// .en("Robin can fly.");
tester.mustBelieve(cycles, "<robin --> [flying]>", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method conditional_induction0SimpleIndepVar.
@Test
public void conditional_induction0SimpleIndepVar() {
TestNAR tester = test;
tester.believe("((&&,x1,$1) ==> (a,$1))");
tester.believe("((&&,y1,$1) ==> (a,$1))");
tester.mustBelieve(cycles, "(x1 ==> y1)", 1.00f, 0.45f);
tester.mustBelieve(cycles, "(y1 ==> x1)", 1.00f, 0.45f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method compound_composition_one_premises.
/**
* not sure this one makes logical sense
*/
@Disabled
@Test
public void compound_composition_one_premises() throws nars.Narsese.NarseseException {
TestNAR tester = test;
// .en("Robin can fly.");
tester.believe("<robin --> [flying]>");
// .en("Can robin fly or swim?");
tester.ask("(||,<robin --> [flying]>,<robin --> swimmer>)");
// tester.mustBelieve(cycles*2," (||,<robin --> swimmer>,<robin --> [flying]>)",1.00f,0.81f); //.en("Robin can fly or swim.");
// .en("Robin can fly or swim.");
tester.mustBelieve(cycles * 2, " (&&,(--,<robin --> swimmer>),(--,<robin --> [flying]>))", 0.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method compound_composition_Pred.
@Test
public void compound_composition_Pred() {
TestNAR tester = test;
// .en("If robin is a type of bird then robin is a type of animal.");
tester.believe("<<robin --> bird> ==> <robin --> animal>>");
// .en("If robin is a type of bird then robin can fly.");
tester.believe("<<robin --> bird> ==> <robin --> [flying]>>", 0.9f, 0.9f);
// .en("If robin is a type of bird then usually robin is a type of animal and can fly.");
tester.mustBelieve(cycles, " <<robin --> bird> ==> (&&,<robin --> [flying]>,<robin --> animal>)>", 0.90f, 0.81f);
// tester.mustBelieve(cycles,
// "((robin-->bird)==>((--,(robin-->animal))&&(--,(robin-->[flying]))))", 0f, 0.81f);
// " <<robin --> bird> ==> (||,<robin --> [flying]>,<robin --> animal>)>",1.00f,0.81f); //.en("If robin is a type of bird then robin is a type of animal or can fly.");
}
Aggregations