Package ai.djl.modality.rl
Interface ReplayBuffer
-
- All Known Implementing Classes:
LruReplayBuffer
public interface ReplayBuffer
RecordsRlEnv.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addStep(RlEnv.Step step)
Adds a new step to the buffer.RlEnv.Step[]
getBatch()
Returns a batch of steps from this buffer.
-
-
-
Method Detail
-
getBatch
RlEnv.Step[] getBatch()
Returns a batch of steps from this buffer.- Returns:
- a batch of steps from this buffer
-
addStep
void addStep(RlEnv.Step step)
Adds a new step to the buffer.- Parameters:
step
- the step to add
-
-