In the wiki, the colors of the balls in the urn are predefined and no new color is added in the procress. But in the code, new color is added to the urn under some circumstance. And the new color is sampled from G_0. However the G_0 in the code is not a distribution (not sum to 1).
When adding a new color, the code sample a new color by running unit_uniform = lambda { (rand * 100).to_i / 100.0 }. The ratio is used as the identifer of the color. What is the relationship between the ratios?