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 ActionACTION_EASTstatic ActionACTION_NORTHstatic ActionACTION_SOUTHstatic ActionACTION_WEST
-
Constructor Summary
Constructors Constructor and Description GridWorld(int rows, int columns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ActiondetermineActionToState(GridState currentState, GridState targetState)static doubleeuclideanDistance(GridState s1, GridState s2)GridStatefindClosestStateTo(java.util.List<GridState> states, GridState goalState)GridStatefindClosestStateToGoal(java.util.List<GridState> states)java.util.List<GridState>getAdjacentStates(GridState s)intgetColumns()intgetRows()GridStategetState(int row, int column)static booleanisStateBlocked(GridState state)static ActionleftOfAction(Action action)static ActionreverseOfAction(Action action)static ActionrightOfAction(Action action)voidsetBlocked(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
-
-
-
-
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
-
-
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)
-
findClosestStateTo
public GridState findClosestStateTo(java.util.List<GridState> states, GridState goalState)
-
determineActionToState
public Action determineActionToState(GridState currentState, GridState targetState)
-
setBlocked
public void setBlocked(int row, int column)
-
-
DMelt 3.0 © DataMelt by jWork.ORG