Q&A: PrioritisedReplayBuffer config — capacity, alpha, beta, update_priorities #268
Unanswered
web3guru888
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Q&A: Configuring and tuning
PrioritisedReplayBufferCommon questions about the Phase 7.3 replay buffer — feel free to add more.
Q1: What values should I use for
capacity?A good starting point is
capacity = 50_000. Monitorasi_replay_buffer_size / asi_replay_buffer_capacity— if the buffer fills in < 1 epoch, increase capacity.Q2: What is
alphaand how does it affect training?alphacontrols prioritisation strength:alphaStart with
alpha=0.6. If training is unstable, reduce to 0.4.Q3: What is
beta_startand does it need tuning?beta_startis the initial IS correction strength (0 = no correction, 1 = full correction). The standard recommendation (Schaul et al.) isbeta_start=0.4annealed to1.0.You rarely need to change
beta_start. However, setbeta_anneal_stepsto match your expected total training steps so β reaches 1.0 at the end of training:Q4: When should I use
UniformReplayBufferinstead?Use
UniformReplayBufferwhen:Use
build_replay_buffer(strategy="uniform")to switch without code changes.Q5: How does
update_priorities()work and when should I call it?After a training step, compute new TD-errors (or losses) for the replayed episodes and call:
Call this after every training step where you used replay samples. Stale priorities cause the buffer to over-sample old hard episodes. If you can't compute TD-errors cheaply, use loss values as a proxy.
Q6: Can
PrioritisedReplayBufferbe shared across multiple agents?Not directly — the current implementation is in-process. For multi-agent sharing:
snap = await buffer.snapshot()pickleormsgpackand store in Redisawait buffer.restore(snap)to loadA shared Redis-backed buffer backend is planned but not in Phase 7.3 scope.
Q7: How do I monitor replay health via Prometheus?
A rising mean priority indicates the agent is encountering harder episodes — expected during curriculum advancement. A falling mean priority suggests the agent is mastering tasks.
All reactions