DataPredict

API Reference - ExperienceReplays - BaseExperienceReplay

The base class for most experience replay classes. It serves as a template for using it with the reinforcement learning models.

Constructors

new()

Creates a new base experience replay object.

BaseExperienceReplay.new(batchSize: number, numberOfRunsToUpdate: number, maxBufferSize: number)

Parameters:

Functions

setParameters()

Change the parameters of a base experience replay object.

BaseExperienceReplay:setParametersbatchSize: number, numberOfRunsToUpdate: number, maxBufferSize: number)

Parameters:

extendResetFunction()

Adds new function on reset alongside with the current reset() function.

BaseExperienceReplay:setResetFunction(resetFunction)

Parameters:

reset()

Resets the base experience replay object.

BaseExperienceReplay:reset()

setRunFunction()

Sets the model’s run function.

BaseExperienceReplay:setRunFunction(updateFunction)

Parameters:

run()

For every nth experience collected, it will run the updateFunction once.

BaseExperienceReplay:run(updateFunction)

Parameters:

addExperience()

Adds an experience to the experiance replay object.

BaseExperienceReplay:addExperience(previousFeatureVector, action: number/string, rewardValue: number, currentFeatureVector)

Parameters:

addTemporalDifferenceError()

Adds a temporal difference error to the experiance replay object.

BaseExperienceReplay:addTemporalDifferenceError(temporalDifferenceErrorVectorOrValue)

Parameters:

setIsTemporalDifferenceErrorRequired()

Set whether or not to store temporal difference errors to the experiance replay object.

BaseExperienceReplay:setIsTemporalDifferenceErrorRequired(option)

Parameters: