Constructor
# new ReplayMemory(maxSize)
Parameters:
Name | Type | Description |
---|---|---|
maxSize |
number
|
The maximal size of the replay memory |
Classes
Members
Methods
# sample(batchSize, rngnullable) → {BatchSample}
Sample from memory
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
batchSize |
number
|
The size of the batch to sample |
|
rng |
seedrandom.PRNG
|
<nullable> |
The random number generator to use for sampling |
The batch sample
# save(experience) → {void}
Save an experience in the replay memory
Parameters:
Name | Type | Description |
---|---|---|
experience |
Experience
|
The experience to save |
void