Search in sources :

Example 1 with FALCON

use of automenta.falcon.FALCON 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());
    }
}
Also used : Curiousbot(nars.experiment.wander.Curiousbot) NWindow(automenta.vivisect.swing.NWindow) RLEnvironment(jurls.reinforcementlearning.domains.RLEnvironment) FALCON(automenta.falcon.FALCON)

Aggregations

FALCON (automenta.falcon.FALCON)1 NWindow (automenta.vivisect.swing.NWindow)1 RLEnvironment (jurls.reinforcementlearning.domains.RLEnvironment)1 Curiousbot (nars.experiment.wander.Curiousbot)1