.
american roulette algorithm qmid