Search in sources :

Example 61 with TestNAR

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);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 62 with TestNAR

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);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 63 with TestNAR

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);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 64 with TestNAR

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);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 65 with TestNAR

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);
}
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