use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method set_operations2_difference.
@Test
public void set_operations2_difference() throws Narsese.NarseseException {
assertEquals("{Mars,Venus}", DIFFe.the($.$("{Mars,Pluto,Venus}"), $.$("{Pluto,Saturn}")).toString());
TestNAR tester = test;
// .en("PlanetX is Mars, Pluto, or Venus.");
tester.believe("(planetX --> {Mars,Pluto,Venus})", 0.9f, 0.9f);
// .en("PlanetX is probably neither Pluto nor Saturn.");
tester.believe("(planetX --> {Pluto,Saturn})", 0.1f, 0.9f);
// .en("PlanetX is either Mars or Venus.");
tester.mustBelieve(cycles * 2, "(planetX --> {Mars,Venus})", 0.9f, 0.73f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method set_operations5.
@Test
public void set_operations5() {
TestNAR tester = test;
// .en("PlanetX is Mars, Pluto, or Venus.");
tester.believe("<{Mars,Pluto,Venus} --> planetX>", 1.0f, 0.9f);
// .en("PlanetX is probably neither Pluto nor Saturn.");
tester.believe("<{Pluto,Saturn} --> planetX>", 0.1f, 0.9f);
// .en("PlanetX is Mars, Pluto, Saturn, or Venus.");
tester.mustBelieve(cycles * 3, "<{Mars,Pluto,Saturn,Venus} --> planetX>", 0.1f, 0.81f);
// .en("PlanetX is either Mars or Venus.");
tester.mustBelieve(cycles * 3, "<{Mars,Venus} --> planetX>", 0.9f, 0.81f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method setDefinition4.
@Test
public void setDefinition4() {
TestNAR tester = test;
// Bright thing is similar to smart thing.");
tester.believe("<[bright] <-> [smart]>");
// Bright is similar to smart.");
tester.mustBelieve(cycles, "<bright <-> smart>", 1.0f, 0.9f);
// Bright thing is a type of smart thing.");
tester.mustBelieve(cycles, "<[bright] --> [smart]>", 1.0f, 0.9f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method inheritanceToSimilarity2.
@Test
public void inheritanceToSimilarity2() {
TestNAR tester = test;
// Swan is a type of bird.");
tester.believe("<swan --> bird>");
// Bird is different from swan.");
tester.believe("<bird <-> swan>", 0.1f, 0.9f);
// Bird is probably not a type of swan.");
tester.mustBelieve(cycles * 4, "<bird --> swan>", 0.1f, 0.73f);
}
use of nars.test.TestNAR in project narchy by automenta.
the class NAL2Test method set_operationsSetExt_unionNeg.
@Test
public void set_operationsSetExt_unionNeg() {
TestNAR tester = test;
// .en("PlanetX is Mars, Pluto, or Venus.");
tester.believe("<planetX --> {Earth}>", 0.1f, 0.9f);
// .en("PlanetX is probably neither Pluto nor Saturn.");
tester.believe("<planetX --> {Mars}>", 0.1f, 0.9f);
// .en("PlanetX is Mars, Pluto, Saturn, or Venus.");
tester.mustBelieve(cycles, "<planetX --> {Earth,Mars}>", 0.19f, 0.81f);
}
Aggregations