org.encog.ml.world.grid

## Class GridWorld

- java.lang.Object
- - org.encog.ml.world.basic.BasicWorld
  - - org.encog.ml.world.grid.GridWorld

- All Implemented Interfaces:
    World

      public class GridWorld
      extends BasicWorld

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Action` | `ACTION_EAST`
    `static Action` | `ACTION_NORTH`
    `static Action` | `ACTION_SOUTH`
    `static Action` | `ACTION_WEST`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GridWorld(int rows, int columns)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Action` | `determineActionToState(GridState currentState, GridState targetState)`
    `static double` | `euclideanDistance(GridState s1, GridState s2)`
    `GridState` | `findClosestStateTo(List<GridState> states, GridState goalState)`
    `GridState` | `findClosestStateToGoal(List<GridState> states)`
    `List<GridState>` | `getAdjacentStates(GridState s)`
    `int` | `getColumns()`
    `int` | `getRows()`
    `GridState` | `getState(int row, int column)`
    `static boolean` | `isStateBlocked(GridState state)`
    `static Action` | `leftOfAction(Action action)`
    `static Action` | `reverseOfAction(Action action)`
    `static Action` | `rightOfAction(Action action)`
    `void` | `setBlocked(int row, int column)`

    - ### Methods inherited from class org.encog.ml.world.basic.BasicWorld

      `addAction, addAgent, addGoal, addState, createAbsorbingState, getActions, getAgents, getGoals, getPolicyValue, getProbability, getStates, isGoalState, removeAgent, removeGoal, removeRewardBelow, runToGoal, setAllRewards, setPolicyValue, setProbability, tick`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ACTION_NORTH

          public static final Action ACTION_NORTH

    - #### ACTION_SOUTH

          public static final Action ACTION_SOUTH

    - #### ACTION_EAST

          public static final Action ACTION_EAST

    - #### ACTION_WEST

          public static final Action ACTION_WEST

  - ### Constructor Detail

    - #### GridWorld

          public GridWorld(int rows,
                   int columns)

  - ### Method Detail

    - #### isStateBlocked

          public static boolean isStateBlocked(GridState state)

    - #### getRows

          public int getRows()

    - #### getColumns

          public int getColumns()

    - #### getState

          public GridState getState(int row,
                           int column)

    - #### leftOfAction

          public static Action leftOfAction(Action action)

    - #### rightOfAction

          public static Action rightOfAction(Action action)

    - #### reverseOfAction

          public static Action reverseOfAction(Action action)

    - #### getAdjacentStates

          public List<GridState> getAdjacentStates(GridState s)

    - #### euclideanDistance

          public static double euclideanDistance(GridState s1,
                                 GridState s2)

    - #### findClosestStateTo

          public GridState findClosestStateTo(List<GridState> states,
                                     GridState goalState)

    - #### determineActionToState

          public Action determineActionToState(GridState currentState,
                                      GridState targetState)

    - #### findClosestStateToGoal

          public GridState findClosestStateToGoal(List<GridState> states)

    - #### setBlocked

          public void setBlocked(int row,
                        int column)

Copyright © 2014. All Rights Reserved.