Search in sources :

Example 26 with NAR

use of nars.main.NAR in project opennars by opennars.

the class TestChamber method main.

public static void main(String[] args) {
    // set NAR architecture parameters:
    // builder...
    // not that much events in testchamber anyway
    Parameters.CONSIDER_NEW_OPERATION_BIAS = 1.0f;
    // but many possible different ways to achieve certain things
    Parameters.SEQUENCE_BAG_SIZE = 100;
    NAR nar = new NAR();
    nar.param.decisionThreshold.set(0.51);
    // set NAR runtime parmeters:
    /*for(NAR.PluginState pluginstate : nar.getPlugins()) {
            if(pluginstate.plugin instanceof InternalExperience || pluginstate.plugin instanceof FullInternalExperience) {
                nar.removePlugin(pluginstate);
            }
        }*/
    // nar.addPlugin(new TemporalParticlePlanner());
    // (nar.param).duration.set(10);
    (nar.param).noiseLevel.set(0);
    new NARSwing(nar);
    new TestChamber(nar);
    nar.start(narUpdatePeriod);
}
Also used : NARSwing(nars.gui.NARSwing) NAR(nars.main.NAR)

Example 27 with NAR

use of nars.main.NAR in project opennars by opennars.

the class Launcher method jButton1ActionPerformed.

// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_jButton1ActionPerformed
    NARSwing sw = new NARSwing(new NAR());
    this.dispose();
}
Also used : NARSwing(nars.gui.NARSwing) NAR(nars.main.NAR)

Example 28 with NAR

use of nars.main.NAR in project opennars by opennars.

the class Shell method main.

/**
 * The entry point of the standalone application.
 * <p>
 * @param args optional argument used : one addInput file
 */
public static void main(String[] args) {
    Shell nars = new Shell(new NAR());
    nars.run(args);
    // TODO only if single finish ( no reset in between )
    if (nars.dumpLastState) {
        System.out.println("\n==== Dump Last State ====\n" + nars.nar.toString());
    }
}
Also used : NAR(nars.main.NAR)

Aggregations

NAR (nars.main.NAR)28 Test (org.junit.Test)10 Term (nars.language.Term)9 NARSwing (nars.gui.NARSwing)8 CompoundTerm (nars.language.CompoundTerm)8 Narsese (nars.io.Narsese)5 Sentence (nars.entity.Sentence)4 AnswerHandler (nars.io.events.AnswerHandler)4 NWindow (automenta.vivisect.swing.NWindow)3 TextOutputHandler (nars.io.events.TextOutputHandler)3 LineChart (automenta.vivisect.timeline.LineChart)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Concept (nars.entity.Concept)2 Inheritance (nars.language.Inheritance)2 TreeMLData (automenta.vivisect.TreeMLData)1 PCanvas (automenta.vivisect.swing.PCanvas)1 Chart (automenta.vivisect.timeline.Chart)1 MultiTimeline (automenta.vivisect.timeline.MultiTimeline)1 StackedPercentageChart (automenta.vivisect.timeline.StackedPercentageChart)1