org.rlcommunity.rlglue.codec.types
Class Reward_observation_action_terminal

java.lang.Object
  extended by org.rlcommunity.rlglue.codec.types.Reward_observation_action_terminal

public class Reward_observation_action_terminal
extends java.lang.Object

Composite type for holding reward, observation, action, and terminal. We're trying to move towards not directly accessing the underlying members, which is why we have the getters and setters.

Author:
btanner

Field Summary
 Action a
           
 Observation o
           
 double r
           
 int terminal
           
 
Constructor Summary
Reward_observation_action_terminal()
           
Reward_observation_action_terminal(double reward, Observation observation, Action action, boolean terminal)
           
Reward_observation_action_terminal(double reward, Observation observation, Action action, int terminal)
           
Reward_observation_action_terminal(Reward_observation_action_terminal src)
           
 
Method Summary
 Reward_observation_action_terminal duplicate()
           
 Action getAction()
           
 Observation getObservation()
           
 double getReward()
           
 int getTerminal()
          Deprecated. use isTerminal
 boolean isTerminal()
           
 void setAction(Action newAction)
          Set the action.
 void setObservation(Observation o)
           
 void setReward(double newReward)
          Set the reward value.
 void setTerminal(boolean newTerminal)
          Adding this method in an effort to get us away from the integer terminal type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

r

public double r

o

public Observation o

a

public Action a

terminal

public int terminal
Constructor Detail

Reward_observation_action_terminal

public Reward_observation_action_terminal()

Reward_observation_action_terminal

public Reward_observation_action_terminal(double reward,
                                          Observation observation,
                                          Action action,
                                          int terminal)

Reward_observation_action_terminal

public Reward_observation_action_terminal(double reward,
                                          Observation observation,
                                          Action action,
                                          boolean terminal)
Since:
2.0 Want to move towards using terminal as a boolean not an int.

Reward_observation_action_terminal

public Reward_observation_action_terminal(Reward_observation_action_terminal src)
Method Detail

setReward

public void setReward(double newReward)
Set the reward value.

Parameters:
newReward -
Since:
2.0

getReward

public double getReward()

setTerminal

public void setTerminal(boolean newTerminal)
Adding this method in an effort to get us away from the integer terminal type. Eventually we can just use the methods and privatize the members.

Parameters:
newTerminal -
Since:
2.0

setObservation

public void setObservation(Observation o)
Parameters:
o -
Since:
2.0

getTerminal

public int getTerminal()
Deprecated. use isTerminal

One day we will make the members private and you'll have to use accessors. It would be better if you used the version that returns a boolean, but this is better than accessing the members directly.

Returns:
an integer, 1 if terminal, 0 if not

getObservation

public Observation getObservation()

setAction

public void setAction(Action newAction)
Set the action.

Parameters:
newAction -
Since:
2.0

getAction

public Action getAction()

isTerminal

public boolean isTerminal()
Returns:
boolean representation of whether the episode is over.
Since:
2.0 Want to move towards using terminal as a boolean not an int.

duplicate

public Reward_observation_action_terminal duplicate()