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
Constructor Summary |
GridWorld(int rows,
int columns)
|
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 |
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
GridWorld
public GridWorld(int rows,
int columns)
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.