akaGM
Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору WELL Algorithm Matsumoto (co-creator of the Mersenne Twister), LEcuyer (a major RNG researcher), and Panneton introduced another class of TGFSR PRNGs in 2006 [Panneton06]. These algorithms produce numbers with better equidistribution than MT19937 and improve upon “bit-mixing” properties. WELL stands for “Well Equidistributed Long-period Linear,” and they seem to be better choices for anywhere MT19937 is currently used. They are fast, come in many sizes, and produce higher quality random numbers. WELL period sizes are presented for period 2^n for n = 512, 521, 607, 800, 1024, 19937, 21701, 23209, and 44497, with corresponding state sizes. This allows a user to trade period length for state size. All run at similar speed. 2^512 is about 10^154, and it is unlikely any video game will ever need that many random numbers, since it is far larger then the number of particles in the universe. The larger periods ones arent really needed except for computation like weather modeling or earth simulations. A standard PC needs over a googol7 of years to count to 2^512. A significant place the WELL PRNGs perform better than MT19937 is in escaping states with a large number of zeros. If MT19937 is seeded with many zeros, or somehow falls into such a state, then the generated numbers have heavy bias towards zeros for a many iterations. The WELL algorithms behave much better, escaping zero bias states quickly. The only downside is that they are slightly slower than MT19937, but not much. The upside is the numbers are considered to be higher quality, and the code is significantly simpler. Here is WELL512 C/C++ code written by the author and placed in the public domain8. It is about 40% faster than the code presented on LEcuyers site, and is about 40% faster than MT19937 presented on Matsumotos site. | Всего записей: 24132 | Зарегистр. 06-12-2002 | Отправлено: 16:03 27-11-2023 | Исправлено: akaGM, 17:08 27-11-2023 |
|