Examples of MoveToAction


Examples of aima.core.environment.map.MoveToAction

    mscf = new MapStepCostFunction(aMap);
  }

  @Test
  public void testCosts() {
    Assert.assertEquals(5.0, mscf.c("A", new MoveToAction("B"), "B"), 0.001);
    Assert.assertEquals(6.0, mscf.c("A", new MoveToAction("C"), "C"), 0.001);
    Assert.assertEquals(4.0, mscf.c("B", new MoveToAction("C"), "C"), 0.001);
    Assert.assertEquals(7.0, mscf.c("C", new MoveToAction("D"), "D"), 0.001);
    Assert.assertEquals(14.0, mscf.c("B", new MoveToAction("E"), "E"),
        0.001);
    //
    Assert.assertEquals(5.0, mscf.c("B", new MoveToAction("A"), "A"), 0.001);
    Assert.assertEquals(6.0, mscf.c("C", new MoveToAction("A"), "A"), 0.001);
    Assert.assertEquals(4.0, mscf.c("C", new MoveToAction("B"), "B"), 0.001);
    Assert.assertEquals(7.0, mscf.c("D", new MoveToAction("C"), "C"), 0.001);
    //
    Assert.assertEquals(1.0, mscf.c("X", new MoveToAction("Z"), "Z"), 0.001);
    Assert.assertEquals(1.0, mscf.c("A", new MoveToAction("Z"), "Z"), 0.001);
    Assert.assertEquals(1.0, mscf.c("A", new MoveToAction("D"), "D"), 0.001);
    Assert.assertEquals(1.0, mscf.c("A", new MoveToAction("B"), "E"), 0.001);
  }
View Full Code Here

Examples of aima.core.environment.map.MoveToAction

  }

  @Test
  public void testExecuteAction() {
    me.addAgent(ma, "D");
    me.executeAction(ma, new MoveToAction("C"));
    Assert.assertEquals(me.getAgentLocation(ma), "C");
  }
View Full Code Here

Examples of aima.core.environment.map.MoveToAction

    MapAgent ma2 = new MapAgent(me.getMap(), me, new UniformCostSearch(),
        new String[] { "A" });

    me.addAgent(ma1, "A");
    me.addAgent(ma2, "A");
    me.executeAction(ma1, new MoveToAction("B"));
    me.executeAction(ma2, new MoveToAction("C"));

    Assert.assertEquals(me.getAgentLocation(ma1), "B");
    Assert.assertEquals(me.getAgentLocation(ma2), "C");
  }
View Full Code Here

Examples of de.mhus.cao.model.fs.action.MoveToAction

public class FsActionProvider extends CaoActionProvider {

  FsActionProvider(MActivator activator) {
    list.add(new CreateFolderAction(activator,null));
    list.add(new CopyToAction(activator,null));
    list.add(new MoveToAction(activator,null));
    list.add(new DeleteAction(activator,null));
   
    list.add(new SetTargetAction(activator,null)); // TODO put in default provider
  }
View Full Code Here

Examples of de.mhus.hair.dctm.action.MoveToAction

  DctmActionProvider(MActivator activator) {
//    list.add(new CreateFolderAction(activator,null));
    list.add(new CopyToAction(activator,null));
    list.add(new CopyFromStreamAction(activator,null));
    list.add(new MoveToAction(activator,null));
    list.add(new DeleteAction(activator,null));
   
    list.add(new SetTargetAction(activator,null)); // TODO put in default provider
  }
View Full Code Here

Examples of games.stendhal.server.actions.move.MoveToAction

    en.step(player, "yes");
    String questStarted = player.getQuest(questSlot);
    assertTrue(questStarted.startsWith("start;"));

    // tried to double-click
    new MoveToAction().onAction(player, null);
    assertEquals("Mouse movement is not possible here. Use your keyboard.", PlayerTestHelper.getPrivateReply(player));

    // didn't solve the maze
    en.step(player, "hi");
    assertEquals("Greetings! How may I help you?", getReply(npc));
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.