Examples of stepUntilDone()


Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "C" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(C):Action[name==moveTo, location==B]:Action[name==moveTo, location==C]:METRIC[pathCost]=10.0:METRIC[maxQueueSize]=2:METRIC[queueSize]=0:METRIC[nodesExpanded]=4:Action[name==NoOp]:",
        envChanges.toString());
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "E" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(E):Action[name==moveTo, location==B]:Action[name==moveTo, location==C]:Action[name==moveTo, location==D]:Action[name==moveTo, location==E]:METRIC[pathCost]=20.0:METRIC[maxQueueSize]=2:METRIC[queueSize]=1:METRIC[nodesExpanded]=6:Action[name==NoOp]:",
        envChanges.toString());
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "B" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(B):Action[name==NoOp]:METRIC[pathCost]=0.0:METRIC[maxQueueSize]=2:METRIC[queueSize]=0:METRIC[nodesExpanded]=3:Action[name==NoOp]:",
        envChanges.toString());
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, bidirectionalSearch,
        new String[] { "C" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new BDSEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(C):Action[name==NoOp]:METRIC[pathCost]=0.0:METRIC[maxQueueSize]=2:METRIC[queueSize]=0:METRIC[nodesExpanded]=4:Action[name==NoOp]:",
        envChanges.toString());
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapAgent ma = new MapAgent(me.getMap(), me, recursiveBestFirstSearch,
        new String[] { SimplifiedRoadMapOfPartOfRomania.BUCHAREST });

    me.addAgent(ma, SimplifiedRoadMapOfPartOfRomania.BUCHAREST);
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(Bucharest), Goal=In(Bucharest):Action[name==NoOp]:METRIC[pathCost]=0.0:METRIC[maxRecursiveDepth]=0:METRIC[nodesExpanded]=0:Action[name==NoOp]:",
        envChanges.toString());
  }
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapAgent ma = new MapAgent(me.getMap(), me, recursiveBestFirstSearch,
        new String[] { SimplifiedRoadMapOfPartOfRomania.BUCHAREST });

    me.addAgent(ma, SimplifiedRoadMapOfPartOfRomania.ARAD);
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(Arad), Goal=In(Bucharest):Action[name==moveTo, location==Sibiu]:Action[name==moveTo, location==RimnicuVilcea]:Action[name==moveTo, location==Pitesti]:Action[name==moveTo, location==Bucharest]:METRIC[pathCost]=418.0:METRIC[maxRecursiveDepth]=4:METRIC[nodesExpanded]=6:Action[name==NoOp]:",
        envChanges.toString());
  }
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(A):Action[name==NoOp]:METRIC[pathCost]=0.0:METRIC[maxQueueSize]=1:METRIC[queueSize]=0:METRIC[nodesExpanded]=0:Action[name==NoOp]:",
        envChanges.toString());
  }
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "D" });
    me.addAgent(ma, "A");
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(A), Goal=In(D):Action[name==moveTo, location==C]:Action[name==moveTo, location==D]:METRIC[pathCost]=13.0:METRIC[maxQueueSize]=2:METRIC[queueSize]=1:METRIC[nodesExpanded]=3:Action[name==NoOp]:",
        envChanges.toString());
  }
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

    MapEnvironment me = new MapEnvironment(aMap);
    MapAgent ma = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });
    me.addAgent(ma, "E");
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals(
        "CurrentLocation=In(E), Goal=In(A):Action[name==NoOp]:METRIC[pathCost]=0:METRIC[maxQueueSize]=1:METRIC[queueSize]=0:METRIC[nodesExpanded]=1:Action[name==NoOp]:",
        envChanges.toString());
  }
View Full Code Here

Examples of aima.core.environment.map.MapEnvironment.stepUntilDone()

        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("A"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction(), hf);
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
    me.stepUntilDone();

    Assert.assertEquals("Action[name==NoOp]->", envChanges.toString());
  }

  @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.