use of automenta.vivisect.swing.NWindow in project narchy by automenta.
the class RunEnv method main.
public static void main(String[] args) throws InterruptedException {
// RLEnvironment env = new PoleBalancing2D();
RLEnvironment env = new Curiousbot();
// RLEnvironment env = new Tetris(16,24);
NWindow w = env.newWindow().show(800, 800);
System.out.println(env.numActions() + " actions, " + env.numStates() + " states");
int cyclesPerFrame = 15;
int frame = 0;
FALCON f = new FALCON(env);
f.setTrace(false);
f.init(AGENT.TDFALCON, true);
while (true) {
for (int i = 0; i < cyclesPerFrame; i++) {
f.act(true);
f.decay();
}
if (frame++ % 1000 == 0) {
f.prune();
f.purge();
}
w.repaint();
Thread.sleep(50);
// System.out.println(f.getNumCode());
}
}
use of automenta.vivisect.swing.NWindow in project opennars by opennars.
the class BagFairness method main.
public static void main(String[] args) {
Parameters.DEBUG = true;
int inputs = 100;
int maxConcepts = 1000;
float inputRate = 0.2f;
int displayedIterations = 600;
int numIterations = 600;
float minPri = 0.1f;
float maxPri = 1.0f;
new NWindow("_", new MultiTimeline(1, 1, 1) {
@Override
public Chart[] getCharts(int experiment) {
final NAR n = new NAR();
ArrayList<Chart> ch = new BagFairness(n, "nal/Examples/Example-MultiStep-edited.txt", maxConcepts, /* concepts */
numIterations - displayedIterations, numIterations).charts;
return ch.toArray(new Chart[ch.size()]);
}
}).show(1200, 900, true);
}
use of automenta.vivisect.swing.NWindow in project opennars by opennars.
the class HumanoidFacePanel method main.
public static void main(String[] arg) {
HumanoidFacePanel f = new HumanoidFacePanel();
NWindow w = new NWindow("Face", f);
w.setSize(250, 400);
w.setVisible(true);
}
use of automenta.vivisect.swing.NWindow in project opennars by opennars.
the class DockDemo method main.
public static void main(String[] args) {
NWindow w = new NWindow("Dock Test", new DockDemo());
w.setSize(640, 480);
w.setVisible(true);
w.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
use of automenta.vivisect.swing.NWindow in project opennars by opennars.
the class KeyboardInputExample method main.
public static void main(String[] args) {
// NAR n = NAR.build(new Neuromorphic().realTime());
// NAR n = NAR.build(new Default().realTime());
// n.param.duration.set(100);
NARSwing.themeInvert();
NAR n = new NAR();
new NARSwing(n).themeInvert();
new NWindow("Direct Keyboard Input", new KeyboardInputPanel(n)).show(300, 100, false);
n.start(100);
}
Aggregations