updateQthirdState: Update Q-values at Third State

Description Usage Arguments Value

View source: R/Q.R

Description

This function takes the Q$thirdStateVec dataframe initialized in the background and filters it to pull the Q-table index that matches the terminal state. It then updates the Q-value according to the Q-learning algorithm.

Usage

1
updateQthirdState(state, reward, alpha, gamma)

Arguments

state

The state the agent is currently in.

reward

The reward an agent receives at the current state.

alpha

The learning rate alpha.

gamma

The temporal discounting factor gamma.

Value

Updated third state Q-value


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