.
american roulette algorithm qinp