updateQtable: Update Q Table

Description Usage Arguments Value

View source: R/Q.R

Description

This function updates the Q-table values by calling the functions updateQRL which updates the Q$R and Q$L values, updateQsecondState, which updates the second state Q-values, and updateQthirdState, which updates the third state Q-values.

Usage

1
updateQtable(state, action, reward, alpha = 0.1, gamma = 0.9)

Arguments

state

The state the agent is currently in.

action

The action (right or left) an agent performs.

reward

The reward an agent receives at the current state.

alpha

The learning rate alpha.

gamma

The temporal discounting factor gamma.

Value

Updated Q-values.


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