Documentation ¶
Index ¶
- func Add(name string, creator NewAgentCreator) error
- func Create(name string, debug logger.Debug) (rlglue.Agent, error)
- func NewDqn(logger logger.Debug) (rlglue.Agent, error)
- func NewESarsa(logger logger.Debug) (rlglue.Agent, error)
- func NewExample(logger logger.Debug) (rlglue.Agent, error)
- func NewHandController(logger logger.Debug) (rlglue.Agent, error)
- func NewRandom(logger logger.Debug) (rlglue.Agent, error)
- type Dqn
- func (agent *Dqn) End(state rlglue.State, reward float64)
- func (agent *Dqn) Feed(lastS rlglue.State, lastA int, state rlglue.State, reward float64, ...)
- func (agent *Dqn) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
- func (agent *Dqn) Policy(state rlglue.State) int
- func (agent *Dqn) Start(state rlglue.State) rlglue.Action
- func (agent *Dqn) StateNormalization(state rlglue.State) rlglue.State
- func (agent *Dqn) Step(state rlglue.State, reward float64) rlglue.Action
- func (agent *Dqn) Update()
- type ESarsa
- func (agent *ESarsa) ActionValue(tileCodedStateActiveFeatures []int, action rlglue.Action) float64
- func (agent *ESarsa) End(state rlglue.State, reward float64)
- func (agent *ESarsa) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
- func (agent *ESarsa) PolicyExpectedSarsaLambda(tileCodedStateActiveFeatures []int) (rlglue.Action, []float64)
- func (agent *ESarsa) Start(state rlglue.State) rlglue.Action
- func (agent *ESarsa) Step(state rlglue.State, reward float64) rlglue.Action
- type Example
- type HandController
- func (agent *HandController) End(state rlglue.State, reward float64)
- func (agent *HandController) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
- func (agent *HandController) Start(state rlglue.State) rlglue.Action
- func (agent *HandController) Step(state rlglue.State, reward float64) rlglue.Action
- type NewAgentCreator
- type Random
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(name string, creator NewAgentCreator) error
Add is used to register a new agent type. This is most likely called by an init function in the Agent's go file. The function returns an error if an agent with that name already exists.
Types ¶
type Dqn ¶
func (*Dqn) End ¶
End informs the agent that a terminal state has been reached, providing the final reward.
func (*Dqn) Initialize ¶
func (agent *Dqn) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
func (*Dqn) Start ¶
Start provides an initial observation to the agent and returns the agent's action.
func (*Dqn) StateNormalization ¶
type ESarsa ¶
Expected sarsa-lambda with tile coding
func (*ESarsa) ActionValue ¶
ActionValue returns action value for a tile coded state and action pair
func (*ESarsa) End ¶
End informs the agent that a terminal state has been reached, providing the final reward.
func (*ESarsa) Initialize ¶
func (agent *ESarsa) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
Initialize configures the agent with the provided parameters and resets any internal state.
func (*ESarsa) PolicyExpectedSarsaLambda ¶
func (agent *ESarsa) PolicyExpectedSarsaLambda(tileCodedStateActiveFeatures []int) (rlglue.Action, []float64)
PolicyExpectedSarsaLambda returns action based on tile coded state
type Example ¶
Example just iterates through all actions, starting from a random one.
func (*Example) End ¶
End informs the agent that a terminal state has been reached, providing the final reward.
func (*Example) Initialize ¶
func (agent *Example) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
Initialize configures the agent with the provided parameters and resets any internal state.
type HandController ¶
func (*HandController) End ¶
func (agent *HandController) End(state rlglue.State, reward float64)
End informs the agent that a terminal state has been reached, providing the final reward.
func (*HandController) Initialize ¶
func (agent *HandController) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
Initialize configures the agent with the provided parameters and resets any internal state.
type NewAgentCreator ¶
NewAgentCreator is a function that can create an agent.
type Random ¶
Random takes a random action at each timestep.
func (*Random) End ¶
End informs the agent that a terminal state has been reached, providing the final reward.
func (*Random) Initialize ¶
func (agent *Random) Initialize(run uint, expAttr, envAttr rlglue.Attributes) error
Initialize configures the agent with the provided parameters and resets any internal state.