Examples of OnlineDFSAgent


Examples of aima.core.search.online.OnlineDFSAgent

  }

  @Test
  public void testAlreadyAtGoal() {
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("A"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineDFSAgent

  }

  @Test
  public void testNormalSearch() {
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("G"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineDFSAgent

  @Test
  public void testNoPath() {
    aMap = new ExtendableMap();
    aMap.addBidirectionalLink("A", "B", 1.0);
    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("X"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "A");
    me.addEnvironmentView(new TestEnvironmentView());
View Full Code Here

Examples of aima.core.search.online.OnlineDFSAgent

    aMap.addBidirectionalLink("2,2", "2,3", 1.0);
    aMap.addBidirectionalLink("3,2", "3,3", 1.0);
    aMap.addBidirectionalLink("2,3", "1,3", 1.0);

    MapEnvironment me = new MapEnvironment(aMap);
    OnlineDFSAgent agent = new OnlineDFSAgent(new OnlineSearchProblem(
        MapFunctionFactory.getActionsFunction(aMap),
        new DefaultGoalTest("3,3"), new MapStepCostFunction(aMap)),
        MapFunctionFactory.getPerceptToStateFunction());
    me.addAgent(agent, "1,1");
    me.addEnvironmentView(new TestEnvironmentView());
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.