gyx v0.1.25 Gyx.Agents.SARSA

This agent implements SARSA, it takes into account the current state, action, reward (st, at, rt) and on policy estimates for the best next action at+1 and state st+1.


The Q update is given by:

sarsa


The Q table process must be referenced on struct Q key, which must follow the Gyx.Qstorage behaviour

Link to this section Summary

Link to this section Types

Link to this type

t()
t() :: %Gyx.Agents.SARSA{
  Q: any(),
  epsilon: float(),
  epsilon_min: float(),
  gamma: float(),
  learning_rate: float()
}

Link to this section Functions

Link to this function

act_epsilon_greedy(agent, environment_state)

Link to this function

act_greedy(agent, environment_state)

Link to this function

handle_call(arg, from, state)

Link to this function

init(process_q)

Link to this function

start_link(opts)

Link to this function

start_link(process_q, opts)

Link to this function

td_learn(agent, sarsa)