您的伪随机数生成器 (PRNG) 是否不够随机?
您是否曾经编写过模拟或随机算法,但由于所使用的(伪)随机数的质量而遇到麻烦?
发生了什么事?
您是如何检测/意识到您的 prng 是问题所在的?
切换 PRNG 是否足以解决问题,还是必须切换到真正的随机源?
我试图弄清楚哪些类型的应用程序需要人们担心其随机性来源的质量,以及当这成为问题时人们如何意识到。
Have you ever written simulations or randomized algorithms where you've run into trouble because of the quality of the (pseudo)-random numbers you used?
What was happening?
How did you detect / realize your prng was the problem?
Was switching PRNGs enough to fix the problem, or did you have to switch to a source of true randomness?
I'm trying to figure out what types of applications require one to worry about the quality of their source of randomness and how one realizes when this becomes a problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这主要是由于我的特殊兴趣,但除了并行计算之外,我永远不会想到创建自己的随机数生成器。在大多数语言中,调用经过良好测试的随机数函数都很简单。
This is mainly due to my particular interests, but other than parallel computing, the thought of creating my own random number generator would never cross my mind. Calling a well tested random number function is trivial in most languages.
针对 DieHard 运行 prng 是一个很好的做法。现在存在非常好的和快速的 PRNG(参见 Marsaglia 的工作),请参见 Numerical Recipes edition 3 以获得很好的介绍。
It is a good practice to run your prng against DieHard. Very good and fast PRNG exist nowadays (see the work of Marsaglia), see Numerical Recipes edition 3 for a good introduction.