sample_mixed

Function sample_mixed 

Source
pub fn sample_mixed(
    buffer_a: &ReplayBuffer,
    buffer_b: &ReplayBuffer,
    ratio: f64,
    batch_size: usize,
    seed: u64,
) -> Result<SampledBatch, RloxError>
Expand description

Sample a mixed batch from two buffers.

Draws ceil(batch_size * ratio) from buffer_a and the remainder from buffer_b. Returns a merged SampledBatch.

ยงArguments

  • buffer_a - first buffer (e.g., offline dataset)
  • buffer_b - second buffer (e.g., online replay)
  • ratio - fraction of samples from buffer_a (0.0 to 1.0)
  • batch_size - total number of transitions to sample
  • seed - RNG seed