Search in sources :

Example 1 with NARTrace

use of nars.util.NARTrace in project narchy by automenta.

the class ConceptIntegratorExample method main.

public static void main(String[] args) throws Exception {
    int cycles = 500;
    NAR nar = new Default().build();
    NARTrace t = new NARTrace(nar);
    nar.addInput("<a --> b>.");
    nar.addInput("<b --> c>.");
    nar.addInput("<(^pick,x) =\\> a>.");
    nar.addInput("<(*, b, c) <-> x>.");
    nar.addInput("a!");
    ConceptIntegrator ci = new ConceptIntegrator(nar, 16, cycles);
    nar.run(cycles);
    TimelineVis tc = new TimelineVis(ci.getCharts());
    /*
            new BarChart(new FirstOrderDifferenceTimeSeries("d(concepts)", t.charts.get("concept.count"))),

            new StackedPercentageChart(t, "concept.priority.hist.0", "concept.priority.hist.1", "concept.priority.hist.2", "concept.priority.hist.3").height(2),

            new LineChart(
                    new ConceptBagTimeSeries(nar, nar.memory.concepts, cycles, Mode.ConceptPriorityTotal)            
            ).height(4),

            new LineChart(
                    new ConceptBagTimeSeries(nar, nar.memory.concepts, cycles, Mode.TermLinkPriorityMean),
                    new ConceptBagTimeSeries(nar, nar.memory.concepts, cycles, Mode.TaskLinkPriorityMean)
            
            ).height(4),


            new LineChart(t, "task.novel.add", "task.immediate_processed").height(3),
            new LineChart(t, "task.goal.process", "task.question.process", "task.judgment.process").height(3),
            new LineChart(t, "emotion.busy").height(1),
            new EventChart(t, false, false, true).height(3)
        );
        */
    new NWindow("_", new PCanvas(tc)).show(800, 800, true);
}
Also used : TimelineVis(automenta.vivisect.timeline.TimelineVis) NARTrace(nars.util.NARTrace) NWindow(automenta.vivisect.swing.NWindow) PCanvas(automenta.vivisect.swing.PCanvas) Default(nars.model.Default) NAR(nars.core.NAR)

Example 2 with NARTrace

use of nars.util.NARTrace in project narchy by automenta.

the class NARCompare1 method main.

public static void main(String[] args) {
    int cycles = 128;
    String input = "<a --> b>.\n" + "<b --> c>.\n" + "<a --> c>?\n";
    NAR a = new Default().build();
    setA(a.param);
    NARTrace at = new NARTrace(a);
    a.addInput(input);
    a.run(cycles);
    NAR b = new Default().build();
    setB(b.param);
    NARTrace bt = new NARTrace(b);
    b.addInput(input);
    b.run(cycles);
    new NWindow("_", new PCanvas(new TimelineVis(new LineChart(at.getCharts("task.novel.add", "task.immediate_processed")).height(3), new LineChart(at.getCharts("task.goal.process", "task.question.process", "task.judgment.process")).height(3), new LineChart(at.getCharts("concept.priority.mean")).height(2), new LineChart(bt.getCharts("task.novel.add", "task.immediate_processed")).height(3), new LineChart(bt.getCharts("task.goal.process", "task.question.process", "task.judgment.process")).height(3), new LineChart(bt.getCharts("concept.priority.mean")).height(2)))).show(900, 800, true);
}
Also used : TimelineVis(automenta.vivisect.timeline.TimelineVis) NARTrace(nars.util.NARTrace) NWindow(automenta.vivisect.swing.NWindow) PCanvas(automenta.vivisect.swing.PCanvas) Default(nars.model.Default) NAR(nars.core.NAR) LineChart(automenta.vivisect.timeline.LineChart)

Example 3 with NARTrace

use of nars.util.NARTrace in project narchy by automenta.

the class BudgetExpense method main.

public static void main(String[] args) throws Exception {
    int cycles = 1000;
    NAR nar = new Default().build();
    NARTrace t = new NARTrace(nar);
    nar.addInput("<a --> b>.");
    nar.addInput("<b --> c>.");
    nar.addInput("<(^pick,x) =\\> a>.");
    nar.addInput("<(*, b, c) <-> x>.");
    nar.addInput("a!");
    TimelineVis tc = new TimelineVis(new LineChart(t.getCharts("task.novel.add", "task.immediate_processed")).height(3), new LineChart(t.getCharts("task.goal.process", "task.question.process", "task.judgment.process")).height(3), new LineChart(t.getCharts("emotion.busy")).height(1));
    nar.run(cycles);
    new NWindow("_", new PCanvas(tc)).show(800, 800, true);
}
Also used : TimelineVis(automenta.vivisect.timeline.TimelineVis) NARTrace(nars.util.NARTrace) NWindow(automenta.vivisect.swing.NWindow) PCanvas(automenta.vivisect.swing.PCanvas) Default(nars.model.Default) NAR(nars.core.NAR) LineChart(automenta.vivisect.timeline.LineChart)

Aggregations

NWindow (automenta.vivisect.swing.NWindow)3 PCanvas (automenta.vivisect.swing.PCanvas)3 TimelineVis (automenta.vivisect.timeline.TimelineVis)3 NAR (nars.core.NAR)3 Default (nars.model.Default)3 NARTrace (nars.util.NARTrace)3 LineChart (automenta.vivisect.timeline.LineChart)2