Package org.encog.ml.world

Examples of org.encog.ml.world.State


    Set<SuccessorState> result = new TreeSet<SuccessorState>();

    if (action != null) {
      // probability of successful action
      if (this.probabilitySuccess > Encog.DEFAULT_DOUBLE_EQUAL) {
        State newState = determineActionState((GridState) state, action);
        if( newState!=null )
          result.add(new SuccessorState(newState, this.probabilitySuccess));
      }

      // probability of left
      if (this.probabilityLeft > Encog.DEFAULT_DOUBLE_EQUAL) {
        State newState = determineActionState((GridState) state,
            GridWorld.leftOfAction(action));
        if( newState!=null )
          result.add(new SuccessorState(newState, this.probabilityLeft));
      }

      // probability of right
      if (this.probabilityRight > Encog.DEFAULT_DOUBLE_EQUAL) {
        State newState = determineActionState((GridState) state,
            GridWorld.rightOfAction(action));
        if( newState!=null )
          result.add(new SuccessorState(newState, this.probabilityRight));
      }

      // probability of reverse
      if (this.probabilityReverse > Encog.DEFAULT_DOUBLE_EQUAL) {
        State newState = determineActionState((GridState) state,
            GridWorld.reverseOfAction(action));
        if( newState!=null )
          result.add(new SuccessorState(newState, this.probabilityReverse));
      }
    }
View Full Code Here


    return minState;
  }

  public void setBlocked(int row, int column) {
    State state = this.state[row][column];
    this.state[row][column] = null;
    this.getStates().remove(state);   
 
View Full Code Here

  public Set<SuccessorState> determineSuccessorStates(State state,
      Action action) {
   
    Set<SuccessorState> result = new TreeSet<SuccessorState>();   
    if(action!=null) {
      State newState = determineActionState((GridState)state, action);
      result.add(new SuccessorState(newState,1.0));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.world.State

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.