Interface RlEnv

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface RlEnv
    extends java.lang.AutoCloseable
    An environment to use for reinforcement learning.
    • Method Detail

      • reset

        void reset()
        Resets the environment to it's default state.
      • getObservation

        NDList getObservation()
        Returns the observation detailing the current state of the environment.
        Returns:
        the observation detailing the current state of the environment
      • getActionSpace

        ActionSpace getActionSpace()
        Returns the current actions that can be taken in the environment.
        Returns:
        the current actions that can be taken in the environment
      • step

        RlEnv.Step step​(NDList action,
                        boolean training)
        Takes a step by performing an action in this environment.
        Parameters:
        action - the action to perform
        training - true if the step is during training
        Returns:
        the RlEnv.Step with the result of the action
      • runEnvironment

        default float runEnvironment​(RlAgent agent,
                                     boolean training)
        Runs the environment from reset until done.
        Parameters:
        agent - the agent to choose the actions with
        training - true to run while training. When training, the steps will be recorded
        Returns:
        the total reward
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable