Examples of CellWorldPosition


Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(3, pos.getY());
  }

  @Test
  public void testMoveLeftIntoBlockedCellLeavesPositionUnchanged() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(2, 3,
        CellWorld.LEFT, alwaysLessThanEightyPercent);
    Assert.assertEquals(2, pos.getX());
    Assert.assertEquals(3, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(3, pos.getY());
  }

  @Test
  public void testMoveRightIntoWallLeavesPositionUnchanged() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 4,
        CellWorld.RIGHT, alwaysLessThanEightyPercent);
    Assert.assertEquals(1, pos.getX());
    Assert.assertEquals(4, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(4, pos.getY());
  }

  @Test
  public void testMoveRightIntoUnblockedCellChangesPositionCorrectly() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 2,
        CellWorld.RIGHT, alwaysLessThanEightyPercent);
    Assert.assertEquals(1, pos.getX());
    Assert.assertEquals(3, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(3, pos.getY());
  }

  @Test
  public void testMoveRightIntoBlockedCellLeavesPositionUnchanged() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(2, 1,
        CellWorld.RIGHT, alwaysLessThanEightyPercent);
    Assert.assertEquals(2, pos.getX());
    Assert.assertEquals(1, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(1, pos.getY());
  }

  @Test
  public void testMoveRightIntoUnblockedCellActuallyMovesUpWhenProbabilityBetween80And90Percent() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 1,
        CellWorld.RIGHT, betweenEightyAndNinetyPercent);
    Assert.assertEquals(2, pos.getX());
    Assert.assertEquals(1, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(1, pos.getY());
  }

  @Test
  public void testMoveRightIntoUnblockedCellActuallyMovesDownWhenProbabilityGreaterThan90Percent() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(3, 3,
        CellWorld.RIGHT, greaterThanNinetyPercent);
    Assert.assertEquals(2, pos.getX());
    Assert.assertEquals(3, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(3, pos.getY());
  }

  @Test
  public void testMoveUpIntoWallLeavesPositionUnchanged() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(3, 1,
        CellWorld.UP, alwaysLessThanEightyPercent);
    Assert.assertEquals(3, pos.getX());
    Assert.assertEquals(1, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(1, pos.getY());
  }

  @Test
  public void testMoveUpIntoUnblockedCellChangesPositionCorrectly() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 1,
        CellWorld.UP, alwaysLessThanEightyPercent);
    Assert.assertEquals(2, pos.getX());
    Assert.assertEquals(1, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(1, pos.getY());
  }

  @Test
  public void testMoveUpIntoBlockedCellLeavesPositionUnchanged() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 2,
        CellWorld.UP, alwaysLessThanEightyPercent);
    Assert.assertEquals(1, pos.getX());
    Assert.assertEquals(2, pos.getY());
  }
View Full Code Here

Examples of aima.core.environment.cellworld.CellWorldPosition

    Assert.assertEquals(2, pos.getY());
  }

  @Test
  public void testMoveUpActuallyMovesLeftWhenProbabilityBetween80And90Percent() {
    CellWorldPosition pos = cw.moveProbabilisticallyFrom(1, 4,
        CellWorld.UP, betweenEightyAndNinetyPercent);
    Assert.assertEquals(1, pos.getX());
    Assert.assertEquals(3, pos.getY());
  }
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.