View Source Rein.Environment behaviour (rein v0.0.1)
Defines an environment to be passed to Rein
.
Summary
Callbacks
Applies the given action to the environment.
Initializes the environment state with the given environment-specific options.
The number of possible actions for the environment
Resets any values that aren't fixed for the environment state.
Types
@type rl_state() :: Rein.t()
@type t() :: Nx.Container.t()
An arbitrary Nx.Container
that holds metadata for the environment
Callbacks
Applies the given action to the environment.
Returns the updated environment, also updated with the reward and a flag indicating whether the new state is terminal.
Initializes the environment state with the given environment-specific options.
Also calls reset/2
in the end.
@callback num_actions() :: pos_integer()
The number of possible actions for the environment
Resets any values that aren't fixed for the environment state.