use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method compound_decomposition_one_premise_pos.
@Test
public void compound_decomposition_one_premise_pos() {
TestNAR tester = test;
// .en("Robin cannot be both a flyer and a swimmer.");
tester.believe("(<robin --> [flying]> && <robin --> swimmer>)", 1.0f, 0.9f);
// .en("Robin cannot swim.");
tester.mustBelieve(cycles, "<robin --> swimmer>", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method conditional_induction0NegBothSimple.
@Test
public void conditional_induction0NegBothSimple() {
TestNAR tester = test;
tester.believe("--((x&&a) ==> c)");
tester.believe("--((x&&b) ==> c)");
tester.mustBelieve(cycles, "(a ==> b)", 1.00f, 0.45f);
tester.mustBelieve(cycles, "(b ==> a)", 1.00f, 0.45f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method compound_decomposition_two_premises1.
// @Test
// public void compound_composition_SubjPosNeg() {
// test
// .believe("<<robin --> bird> ==> <robin --> animal>>") //.en("If robin is a type of bird then robin is a type of animal.")
// .believe("--<<robin --> [alien]> ==> <robin --> animal>>") //.en("If robin is alien then robin isnt a type of animal.");
// .mustBelieve(cycles, " <(&&,<robin --> bird>, --<robin --> [alien]>) ==> <robin --> animal>>", 1f, 0.81f); //.en("If robin isnt alien and is a type of bird then robin is a type of animal.");
// }
@Test
public void compound_decomposition_two_premises1() {
TestNAR tester = test;
// .en("If robin is a type of bird then robin is not a type of flying animal.");
tester.believe("--(bird:robin ==> (animal:robin && [flying]:robin))", 1.0f, 0.9f);
// .en("If robin is a type of bird then robin can fly.");
tester.believe("(bird:robin ==> [flying]:robin)");
// .en("It is unlikely that if a robin is a type of bird then robin is a type of animal.");
tester.mustBelieve(cycles * 2, "--(bird:robin ==> animal:robin)", 1.00f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL5Test method conditional_induction0SimpleDepVar.
@Test
public void conditional_induction0SimpleDepVar() {
TestNAR tester = test;
tester.believe("((&&,x1,#1) ==> c)");
tester.believe("((&&,y1,#1) ==> c)");
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 NAL6Test method variable_unification7.
@Test
public void variable_unification7() {
TestNAR tester = test;
// en("If something can fly and eats worms, then it is a bird.");
tester.believe("<(&&,<$x --> flyer>,<($x,worms) --> food>) ==> <$x --> bird>>");
// en("If something can fly, then it has wings.");
tester.believe("<<$y --> flyer> ==> <$y --> [withWings]>>");
// en("If something has wings and eats worms, then I guess it is a bird.");
tester.mustBelieve(cycles, "<(&&,<$1 --> [withWings]>,<($1,worms) --> food>) ==> <$1 --> bird>>", 1.00f, 0.45f);
}
Aggregations