versus.meeting
Interface RLWorld

All Known Implementing Classes:
RLMeetingWorld

public interface RLWorld

Code from http://www.cse.unsw.edu.au/~aek/catmouse.

Version:
$Id: RLWorld.java,v 1.2 2003/07/20 03:57:51 glchen Exp $
Author:
Anthony Knittel

Method Summary
 boolean endState()
          Returns true if current state is absorbing state, false if not.
 int[] getDimension()
          Returns the array containing the information about the number of states in each dimension ( [0] - [array.length - 2] ) and the number of possible actions ( [array.length - 1] ).
 double getInitValues()
          Gets the initial value for the policy.
 int[] getNextState(int action)
          Returns a new instance of the new state that results from applying the given action to the current state.
 double getReward()
          Returns the value for the last reward received from calling the method getNextState( int action ).
 int[] resetState()
          Resets the current state to the start position and returns that state.
 boolean validAction(int action)
          Returns true if the given action is a valid action on the current state, false if not.
 

Method Detail

getDimension

public int[] getDimension()
Returns the array containing the information about the number of states in each dimension ( [0] - [array.length - 2] ) and the number of possible actions ( [array.length - 1] ).


getNextState

public int[] getNextState(int action)
Returns a new instance of the new state that results from applying the given action to the current state.


getReward

public double getReward()
Returns the value for the last reward received from calling the method getNextState( int action ).


validAction

public boolean validAction(int action)
Returns true if the given action is a valid action on the current state, false if not.


endState

public boolean endState()
Returns true if current state is absorbing state, false if not.


resetState

public int[] resetState()
Resets the current state to the start position and returns that state.


getInitValues

public double getInitValues()
Gets the initial value for the policy.