View Source Rein (rein v0.1.0)

Reinforcement Learning training and inference framework

Summary

Types

@type t() :: %Rein{
  agent: module(),
  agent_state: term(),
  environment: module(),
  environment_state: term(),
  episode: Nx.t(),
  iteration: Nx.t(),
  random_key: Nx.t(),
  trajectory: Nx.t()
}

Functions

Link to this function

train(environment_with_options, agent_with_options, epoch_completed_callback, state_to_trajectory_fn, opts \\ [])

View Source
@spec train(
  {environment :: module(), init_opts :: keyword()},
  {agent :: module(), init_opts :: keyword()},
  epoch_completed_callback :: (map() -> :ok),
  state_to_trajectory_fn :: (t() -> Nx.t()),
  opts :: keyword()
) :: term()