Module

Utils/Generals

static class for general utility

View Source core/src/Utils/General.ts, line 2

Methods

# static linearDecayEpsilon(stepCount, decaySteps, epsilonStart, epsilonEnd) → {number}

linearly decay the epsilon value

Parameters:
Name Type Description
stepCount number

the current step

decaySteps number

number of total decay steps

epsilonStart number

epsilon start value

epsilonEnd number

epsilon end value

View Source core/src/Utils/General.ts, line 68

the epsilon value and the new step count

number

# static sampleN(array, n, rng)

samples n values from the provided array

Parameters:
Name Type Description
array Array.<any>

the array to sample from

n number

the number of values to sample

rng seedrandom.PRNG

the random number generator

View Source core/src/Utils/General.ts, line 35

the samples

# static shuffleArray(array, rng) → {Array.<any>}

Shuffle the array

Parameters:
Name Type Description
array Array.<any>

the array to shuffle

rng seedrandom.PRNG

the random number generator

View Source core/src/Utils/General.ts, line 13

the shuffled array

Array.<any>