Return a single random index chosen from weights (treated as unnormalized probabilities).
Equivalent to Python's random.choices(range(n), weights=weights, k=1)[0].
Return a sample from a Gaussian distribution with the given mean and standard deviation.
Return a uniform random number in [0, 1).
A deterministic pseudo-random number generator using the mulberry32 algorithm, with Box-Muller transform for Gaussian sampling and weighted random choices.