Search in sources :

Example 56 with TestNAR

use of nars.test.TestNAR in project narchy by automenta.

the class NAL2Test method structureTransformation2.

@Test
public void structureTransformation2() throws nars.Narsese.NarseseException {
    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);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 57 with TestNAR

use of nars.test.TestNAR in project narchy by automenta.

the class NAL2Test method set_operations5Half.

@Test
public void set_operations5Half() {
    TestNAR tester = test;
    // .en("PlanetX is Mars, Pluto, or Venus.");
    tester.believe("<{Mars,Pluto,Venus} --> planetX>", 1.0f, 0.9f);
    // .en("PlanetX is either Mars or Venus.");
    tester.mustBelieve(cycles, "<{Mars,Venus} --> planetX>", 1.0f, 0.81f);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 58 with TestNAR

use of nars.test.TestNAR in project narchy by automenta.

the class NAL2Test method comparison2.

@Test
public void comparison2() {
    TestNAR tester = test;
    // Sport is a type of competition.");
    tester.believe("<sport --> competition>");
    // Chess is a type of competition.");
    tester.believe("<chess --> competition>", 0.9f, 0.9f);
    // I guess chess is similar to sport.");
    tester.mustBelieve(cycles, "<chess <-> sport>", 0.9f, 0.45f);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 59 with TestNAR

use of nars.test.TestNAR in project narchy by automenta.

the class NAL2Test method set_operations4.

@Test
public void set_operations4() {
    TestNAR tester = test;
    // .en("PlanetX is Mars, Pluto, or Venus.");
    tester.believe("<[marsy,earthly,venusy] --> planetX>", 1.0f, 0.9f);
    // .en("PlanetX is probably neither Pluto nor Saturn.");
    tester.believe("<[earthly,saturny] --> planetX>", 0.1f, 0.9f);
    // .en("PlanetX is Mars, Pluto, Saturn, or Venus.");
    tester.mustBelieve(cycles * 2, "<[marsy,earthly,saturny,venusy] --> planetX>", 1.0f, 0.81f);
    // .en("PlanetX is either Mars or Venus.");
    tester.mustBelieve(cycles * 2, "<[marsy,venusy] --> planetX>", 0.90f, 0.81f);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 60 with TestNAR

use of nars.test.TestNAR in project narchy by automenta.

the class NAL2Test method setDefinition2.

@Test
public void setDefinition2() {
    TestNAR tester = test;
    // Smart thing is a type of bright thing.");
    tester.believe("<[smart] --> [bright]>");
    // Bright thing is similar to smart thing.");
    tester.mustBelieve(cycles, "<[bright] <-> [smart]>", 1.0f, 0.9f);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Aggregations

TestNAR (nars.test.TestNAR)178 Test (org.junit.jupiter.api.Test)169 NALTest (nars.util.NALTest)162 NAL7Test (nars.nal.nal7.NAL7Test)18 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)11 Disabled (org.junit.jupiter.api.Disabled)5 NAR (nars.NAR)2 Concept (nars.concept.Concept)2 DoubleSummaryStatistics (java.util.DoubleSummaryStatistics)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 BiFunction (java.util.function.BiFunction)1 IntFunction (java.util.function.IntFunction)1 nars (nars)1 NARS (nars.NARS)1 TaskStatistics (nars.task.util.TaskStatistics)1 Term (nars.term.Term)1 DeductiveMeshTest (nars.test.DeductiveMeshTest)1 ETERNAL (nars.time.Tense.ETERNAL)1 NotNull (org.jetbrains.annotations.NotNull)1 Assertions.assertNotEquals (org.junit.jupiter.api.Assertions.assertNotEquals)1