PinBallDomain
Class PinBallState

java.lang.Object
  extended by PinBallDomain.PinBallState
All Implemented Interfaces:
State

public class PinBallState
extends java.lang.Object
implements State

State class for PinBall.

Author:
George Konidaris (gdk at cs dot umass dot edu)

Constructor Summary
PinBallState(double xx, double yy, double xxdot, double yydot, PinBall p)
          State constructor.
 
Method Summary
 boolean endState()
          Check whether or not this state is an end-of-episode state.
 double euclideanDistance(State s)
          Compute the Euclidean distance between this state and another.
 double[] getDescriptor()
          Convert to an array of doubles (each value normalized).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PinBallState

public PinBallState(double xx,
                    double yy,
                    double xxdot,
                    double yydot,
                    PinBall p)
State constructor.

Parameters:
xx - X coordinate of the ball
yy - Y coordinate of the ball
xxdot - X velocity of the ball
yydot - Y velocity of the ball
p - Originating domain
Method Detail

getDescriptor

public double[] getDescriptor()
Convert to an array of doubles (each value normalized).

Specified by:
getDescriptor in interface State
Returns:
state descriptor double array

endState

public boolean endState()
Check whether or not this state is an end-of-episode state.

Specified by:
endState in interface State
Returns:
true if this state is an end-of-episode state, false otherwise

euclideanDistance

public double euclideanDistance(State s)
Compute the Euclidean distance between this state and another.

Specified by:
euclideanDistance in interface State
Parameters:
s - other state
Returns:
distance