Package org.encog.ml.world.grid

Examples of org.encog.ml.world.grid.GridState


    if (!(resultState instanceof GridState)
        || !(previousState instanceof GridState)) {
      throw new WorldError("Must be instance of GridState");
    }

    GridState gridResultState = (GridState) resultState;
    GridState gridPreviousState = (GridState) previousState;

    Action resultingAction = determineResultingAction(gridPreviousState,
        gridResultState);
    GridState desiredState = determineActionState(gridPreviousState,
        desiredAction);

    // are we trying to move nowhere
    if (gridResultState == gridPreviousState) {
      if (GridWorld.isStateBlocked(desiredState))
View Full Code Here


    return null;
  }
 
  public GridState determineActionState(GridState currentState, Action action) {
   
    GridState result = null;
   
    if( action==GridWorld.ACTION_NORTH) {
      result = this.world.getState(currentState.getRow()-1, currentState.getColumn());
    } else if( action==GridWorld.ACTION_SOUTH) {
      result = this.world.getState(currentState.getRow()+1, currentState.getColumn());
View Full Code Here

   
    if( !(resultState instanceof GridState) || !(previousState instanceof GridState) ) {
      throw new WorldError("Must be instance of GridState");
    }
   
    GridState gridResultState = (GridState)resultState;
    GridState gridPreviousState = (GridState)previousState;
       
    Action resultingAction =  determineResultingAction(gridPreviousState, gridResultState);
    GridState desiredState = determineActionState(gridPreviousState,desiredAction);
   
    // are we trying to move nowhere
    if( gridResultState==gridPreviousState ) {
      if( GridWorld.isStateBlocked(desiredState) )
        return 1.0;
View Full Code Here

TOP

Related Classes of org.encog.ml.world.grid.GridState

Copyright © 2018 www.massapicom. 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.