Package ai.djl.modality.rl
Interface ReplayBuffer
- All Known Implementing Classes:
LruReplayBuffer
public interface ReplayBuffer
Records
RlEnv.Step
s so that they can be trained on.
Using a replay buffer ensures that a variety of states are trained on for every training batch making the training more stable.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStep
(RlEnv.Step step) Adds a new step to the buffer.getBatch()
Returns a batch of steps from this buffer.
-
Method Details
-
getBatch
RlEnv.Step[] getBatch()Returns a batch of steps from this buffer.- Returns:
- a batch of steps from this buffer
-
addStep
Adds a new step to the buffer.- Parameters:
step
- the step to add
-