public static class CartPoleDomain.CartPoleTerminalFunction extends java.lang.Object implements TerminalFunction
Constructor and Description |
---|
CartPoleTerminalFunction()
Initializes with default max angle of 12 degrees (about 0.2 radians)
|
CartPoleTerminalFunction(double maxAbsoluteAngleInRadians)
Initializes with a max pole angle as specified in radians
|
Modifier and Type | Method and Description |
---|---|
double |
getHalfTrackLength() |
double |
getMaxAbsoluteAngle() |
boolean |
isTerminal(State s) |
void |
setHalfTrackLength(double halfTrackLength) |
void |
setMaxAbsoluteAngle(double maxAbsoluteAngle) |
public CartPoleTerminalFunction()
public CartPoleTerminalFunction(double maxAbsoluteAngleInRadians)
maxAbsoluteAngleInRadians
- the maximum pole angle that causes task termination/failure.public double getMaxAbsoluteAngle()
public void setMaxAbsoluteAngle(double maxAbsoluteAngle)
public double getHalfTrackLength()
public void setHalfTrackLength(double halfTrackLength)
public boolean isTerminal(State s)
isTerminal
in interface TerminalFunction