Search in sources :

Example 76 with TestNAR

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

the class NAL8EquivalenceTest method goal_deduction_equi_pos_pospos.

@Test
public void goal_deduction_equi_pos_pospos() {
    TestNAR tester = test;
    tester.input("x:y! :|:");
    tester.input("(goto(z) <=>+5 x:y).");
    tester.mustGoal(cycles, "goto(z)", 1.0f, 0.81f, 0);
    tester.mustNotOutput(cycles, "goto(z)", GOAL, ETERNAL);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 77 with TestNAR

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

the class NAL8EquivalenceTest method conjunctionSubstitutionViaEquiv.

@Test
public void conjunctionSubstitutionViaEquiv() {
    TestNAR tester = test;
    // ETERNAL
    tester.input("(a:b<=>c:d).");
    // PRESENT
    tester.input("(c:d &| e:f). :|:");
    tester.mustBelieve(cycles, "(a:b &| e:f)", 1.0f, 0.81f, 0);
    tester.mustNotOutput(cycles, "(a:b &| e:f)", BELIEF, ETERNAL);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 78 with TestNAR

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

the class NAL8EquivalenceTest method goal_deduction_equi_neg_pospos.

@Test
public void goal_deduction_equi_neg_pospos() {
    TestNAR tester = test;
    tester.input("--x:y! :|:");
    tester.input("(goto(z) <=>+5 x:y).");
    tester.mustGoal(cycles, "goto(z)", 0.0f, 0.81f, 0);
    tester.mustNotOutput(cycles, "goto(z)", GOAL, 0.9f, 1f, 0f, 0.81f, -5);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 79 with TestNAR

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

the class NAL8EquivalenceTest method conjunctionGoalSubstitutionViaEquiv.

@Test
public void conjunctionGoalSubstitutionViaEquiv() {
    TestNAR tester = test;
    // ETERNAL
    tester.input("(a:b<=>c:d).");
    // PRESENT
    tester.input("(c:d &&+0 e:f)! :|:");
    tester.mustGoal(cycles, "(a:b &&+0 e:f)", 1.0f, 0.81f, 0);
    tester.mustNotOutput(cycles, "(a:b &&+0 e:f)", BELIEF, ETERNAL);
}
Also used : TestNAR(nars.test.TestNAR) Test(org.junit.jupiter.api.Test) NALTest(nars.util.NALTest)

Example 80 with TestNAR

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

the class NAL8EquivalenceTest method goal_deduction_equi_subst.

@Test
public void goal_deduction_equi_subst() {
    TestNAR tester = test;
    tester.input("x:y! :|:");
    tester.input("(goto($1) <=>+5 $1:y).");
    tester.mustGoal(cycles, "goto(x)", 1.0f, 0.81f, 0);
}
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