# The termination probability of Russian roulette in PBRT

As described in PBRT 14.5, the path tracer stops bouncing rays at a probability q, which is determined by the throughput of the path.

<<Possibly terminate the path with Russian roulette>>=
if (bounces > 3) {
Float q = std::max((Float).05, 1 - beta.y());
if (sampler.Get1D() < q)
break;
beta /= 1 - q;
}


In my understanding, the probability q should be a constant for paths of the same length, so that the Russian roulette estimator is unbiased. Would such a dynamic termination probability still produce biased results?

Update:

Given an estimator F, its corresponding Russian roulette estimator is defined to be

R = (F - qc) / (1 - q) , if xi > q
R = c                  , otherwise


Since E[R] = (1 - q)(E[F] - qc) / (1 - q) + qc = E[F], as long as F is a unbiased estimator, R is a unbiased estimator as well.

Specific to a path tracer, its path-integral form of LTE with Russian roulette can be written as

1 / (1 - q1)(P(p1) + 1 / (1 - q2)(P(p2) + 1 / (1 - q3)(P(p3) + ...


if q1, q2, qc, ... is not a constant, then the estimator for each path length is not an unbiased estimator, I think.

• Where did that come from: the probability q should be a constant for paths of the same length, so that the Russian roulette estimator is unbiased.? – lightxbulb Jul 30 '19 at 15:44
• @lightxbulb I added extra explanation for my confusion in the question – Zhe Chen Jul 31 '19 at 4:47
• What you wrote makes no sense. Even you E[R] expression is wrong. Look for better resources regarding it. – lightxbulb Jul 31 '19 at 9:36
• @lightxbulb Can you elaborate what's wrong here? It's the same as the one on PBRT. – Zhe Chen Jul 31 '19 at 12:40
• What they wrote is correct only if $E[F] = c$ or $c=0$. Since you mentioned neither of those assumptions - it is incorrect. – lightxbulb Jul 31 '19 at 13:42