updateQRL: Update QR and QL

Description Usage Arguments Value

View source: R/Q.R

Description

The updateQRL function will take in the action an agent performs and update either Q$R or Q$L as appropriate.

Usage

1
updateQRL(state, action, alpha, gamma)

Arguments

state

The state the agent is currently in.

action

The action (right or left) an agent performs.

alpha

The learning rate alpha.

gamma

The temporal discounting factor gamma.

Value

Updated Q$R or Q$L values.


jdtrat/dynaq documentation built on July 24, 2020, 7:18 a.m.