use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method comparison.
@Test
public void comparison() {
TestNAR tester = test;
// Swan is a type of swimmer.");
tester.believe("<swan --> swimmer>", 0.9f, 0.9f);
// Swan is a type of bird.");
tester.believe("<swan --> bird>");
// I guess that bird is similar to swimmer.");
tester.mustBelieve(cycles, "<bird <-> swimmer>", 0.9f, 0.45f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method structureTransformation3.
@Test
public void structureTransformation3() throws nars.Narsese.NarseseException {
/*
<bright <-> smart>. %0.9;0.9%
<{bright} --> {smart}>?
*/
TestNAR tester = test;
// Bright is similar to smart.");
tester.believe("<bright <-> smart>", 0.9f, 0.9f);
// Is bright thing a type of smart thing?");
tester.ask("<{bright} --> {smart}>");
// Bright thing is a type of smart thing.");
tester.mustBelieve(cycles, "<{bright} --> {smart}>", 0.9f, 0.9f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method analogy.
// @Test public void inductionNegation() {
// //(A --> C), (B --> C), neq(A,B) |- (B --> A), (Belief:Induction, Desire:Weak, Derive:AllowBackward)
// test().log()
// .believe("<worm --> bird>", 0.1f, 0.9f)
// .believe("<tweety --> bird>", 0.9f, 0.9f)
// .mustBelieve(cycles, "<worm --> tweety>", 0.10f, 0.42f)
// .mustBelieve(cycles, "<tweety --> worm>", 0.90f, 0.07f)
// .mustBelieve(cycles, "<tweety <-> worm>", 0.10f, 0.42f)
// ;
// }
@Test
public void analogy() {
TestNAR tester = test;
// Swan is a type of swimmer.");
tester.believe("<swan --> swimmer>");
// Gull is similar to swan.");
tester.believe("<gull <-> swan>");
// I think gull is a type of swimmer.");
tester.mustBelieve(cycles, "<gull --> swimmer>", 1.0f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method set_operationsSetInt_union_2_3_4.
@Test
public void set_operationsSetInt_union_2_3_4() {
TestNAR tester = test;
// .en("PlanetX is Mars, Pluto, or Venus.");
tester.believe("<planetX --> [marsy,earthly,venusy]>", 1.0f, 0.9f);
// .en("PlanetX is probably neither Pluto nor Saturn.");
tester.believe("<planetX --> [earthly,saturny]>", 0.1f, 0.9f);
// .en("PlanetX is Mars, Pluto, Saturn, or Venus.");
tester.mustBelieve(cycles, "<planetX --> [marsy,earthly,saturny,venusy]>", 0.1f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method set_operationsSetInt_union1_1_2_3.
@Test
public void set_operationsSetInt_union1_1_2_3() {
TestNAR tester = test;
// .en("PlanetX is Mars, Pluto, or Venus.");
tester.believe("<planetX --> [marsy,venusy]>", 1.0f, 0.9f);
// .en("PlanetX is probably neither Pluto nor Saturn.");
tester.believe("<planetX --> [earthly]>", 0.1f, 0.9f);
// .en("PlanetX is Mars, Pluto, Saturn, or Venus.");
tester.mustBelieve(cycles, "<planetX --> [marsy,earthly,venusy]>", 0.1f, 0.81f);
}
Aggregations