Walker Alias Method: Constant-Time Weighted Random Sampling, Table Construction and Chi-Square Test
See how the alias method draws from an uneven distribution with one slot lookup and one coin flip. The Vose construction turns any set of weights into a row of equal-height slots, each holding at most two outcomes; every draw picks a slot at random and then decides between its own and its alias colour. Watch balls fly from the table into a live histogram, compare it with the target, follow the chi-square statistic towards its expected value and see how many comparisons an inverse-CDF binary search would need instead. A Blender-built scene with independent numerical checks.
See how the alias method draws from an uneven distribution with one slot lookup and one coin flip. The Vose construction turns any set of weights into a row of equal-height slots, each holding at most two outcomes; every draw picks a slot at random and then decides between its own and its alias colour. Watch balls fly from the table into a live histogram, compare it with the target, follow the chi-square statistic towards its expected value and see how many comparisons an inverse-CDF binary search would need instead. A Blender-built scene with independent numerical checks.
See how the alias method draws from an uneven distribution with one slot lookup and one coin flip. The Vose construction turns any set of weights into a row of equal-height slots, each holding at most two outcomes; every draw picks a slot at random and then decides between its own and its alias colour. Watch balls fly from the table into a live histogram, compare it with the target, follow the chi-square statistic towards its expected value and see how many comparisons an inverse-CDF binary search would need instead. A Blender-built scene with independent numerical checks.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install