“播种”是什么意思?意思是?

发布于 2024-08-08 08:58:17 字数 52 浏览 4 评论 0原文

很简单的问题。 “播种”一词的一般含义是什么?我将放置上下文,即您必须为随机函数提供种子。

Very simple question. What does the term 'seeding' mean in general? I'll put the context, i.e., you must seed for random functions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

俏︾媚 2024-08-15 08:58:17

这意味着:选择一个地方开始。

将伪随机数生成器视为一个非常长的数字列表。这个列表是循环的,最终会重复。

要使用它,您需要选择一个起始位置。这称为“种子”。

It means: pick a place to start.

Think of a pseudo random number generator as just a really long list of numbers. This list is circular, it eventually repeats.

To use it, you need to pick a starting place. This is called a "seed".

甜警司 2024-08-15 08:58:17

个人计算机上常见的大多数随机函数都不是随机的,而是在一定程度上是确定性的。这些伪随机函数的“种子”是未来值所基于的起点。这对于调试目的很有用:如果在执行之间保持种子相同,您将得到相同的数字。

为了获得更随机的数字,在执行过程中通常使用不同的种子。这通常基于机器的时间。

这种方法与根据我们周围世界的某种物理属性生成“真实”随机数完全不同。熔岩灯和太阳黑子是两个更“有趣”的属性,可以通过观察它们来生成“更随机”的数字。如果确实有必要,任何人都可以点击 http://www.random.org/ 来获取真正的随机数,例如一个扑克网站。如果您没有好的发电机,人们可以尝试弄清楚发电机的工作原理并预测未来的数字。

Most random functions that are common on personal computers aren't random, but deterministic to a degree. The 'seed' for these psuedo-random functions are the starting point upon which future values are based. This is useful for debugging purposes: if you keep the seed the same from execution to execution you'll get the same numbers.

To get numbers that are more random a different seed is often used from execution to execution. This is often based on the time of the machine.

This method is completely different than generating a 'true' random number based on some sort of physical property in the world around us. Lava lamps and sun spots are two of the more 'fun' properties that can be observed to generate 'more random' numbers. Anyone can hit http://www.random.org/ to get a real random number if its truly neccessary like for a poker website. If you don't have a good generator folks can attempt to figure out how the generator works and predict future numbers.

_蜘蛛 2024-08-15 08:58:17

想象一个纸牌游戏和游戏程序的开发与运行游戏来实际玩它。

伪随机数生成器使用一个或多个种子来确定序列的起点。其中一些总是产生相同的序列,另一些则可以根据种子产生不同的序列。有些使用级联,一个简单的 RNG 被赋予一个简单的种子,并且运行一段时间为杰作 RNG 生成一个更复杂的种子。

在开发程序或希望重现以前的结果时,能够故意重复该序列是非常有用的。

然而,想象一下纸牌游戏。总是发相同序列的牌显然不是一个好主意。

Imagine a card game and development of the game program vs. running the game to actually play it.

Pseudo-random number generators use a seed or seeds to determine the starting point of the sequence. Some of them always make the same sequence, others can produce different sequences depending on the seed. Some use a cascade, a simple RNG is given a simple seed, and this is run for a while to produce a more complex seed for the masterpiece RNG.

It is quite useful to be able to deliberately repeat the sequence when developing the program or when one wishes to reproduce previous results.

However, imagine a card game. It's obviously not a good idea to always deal the same sequence of cards.

兮颜 2024-08-15 08:58:17

“播种”随机函数可防止它给出相同的随机数序列。
将其视为随机生成器的超级随机启动。

"Seeding" random function prevents it from giving out the same sequence of random numbers.
Think of it as a super-random start of your random generator.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文