Two ways to take large steps without a hand-tuned proposal. Slice sampling draws a height u under the curve and then a point uniformly from the slice {z : p̃(z) > u}, finding the slice by stepping out and shrinking. Hybrid Monte Carlo gives the state a random momentum and follows Hamiltonian dynamics with the leapfrog integrator, which preserves volume and nearly preserves the energy H, so long moves are still accepted.
Slice sampling target: p̃(z) = 0.55 exp(−(z+2)2/(2·0.752)) + 0.45 exp(−(z−2)2/(2·0.952)), the two-bump shape of Figure 11.13. Leapfrog: E(z) = z2/2 from (z, r) = (1, 1). Hybrid Monte Carlo: a Gaussian with standard deviations 1 and 0.1 along the diagonals, or the mixture of N(±(1, 1), 0.52I); each iteration picks the direction of integration at random and jitters ε by up to ±10% (Section 11.5.2). The comparison chain is random-walk Metropolis with ρ = σmin, run for L steps per HMC iteration so both use the same number of density or gradient evaluations.
code/ch11_sampling.py (functions slice_sample, leapfrog, hmc; Figures 11.13 and 11.14) and the checks in code/checks_ch11.py (volume preservation, reversibility, O(ε2) energy error, detailed balance). JSRandom(seed) reproduces this page's chains number for number.