TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

“True” Randomness vs. “Pseudo” Randomness

65 点作者 memorable大约 2 年前

14 条评论

11thEarlOfMar大约 2 年前
One time, my wife and siblings had to choose from a number of heirlooms that had be left to them but not assigned. They are living around the planet, and the discussion came up about how to decide the order in which they&#x27;d select the items.<p>I came up with this: Each of them select a different stock market index. On the same calendar trading day, they choose two digits past the decimal. When the market&#x27;s close, compare the two digits of the closing price of their chosen index to the two digits they selected and then choose heirlooms in the order of closeness.<p>It worked quite well. They were on board because they could make two selections in determining their order: Market and digits. Two of them could choose the same two digits if they wanted and still have different scores. No complaints.<p>Not random, but seemed fair to all.
评论 #35413619 未加载
评论 #35417007 未加载
评论 #35412956 未加载
评论 #35413664 未加载
评论 #35413152 未加载
评论 #35413474 未加载
tetha大约 2 年前
One example for using algorithmic over true randomness comes up in games. For example, if the entire map generation is driven by a single RNG instance with a user-chosen (or, initially chosen off of true randomness), players can share seeds generating interesting worlds. Or, even more interesting, folks are brute-forcing Slay the Spire seeds in order to find cool seeds involving a relic called Pandoras Box, which replaces your entire starting hand.<p>From there on, it becomes a very conscious decision how many RNGs to manage in an engine. Unpredictable things, like UI or random animation choices and such tend to have their own RNG, so something like the AI or story-driving systems can have their own, more predictable RNG.<p>However, this again raises a tricky follow-up question: Do you persist the RNG state in the save file of a user? The answer here isn&#x27;t as obvious as it seems, as it allows different kinds of save-game abuses. Re-initializing the RNG on load allows players to reload in order to get different results from actions. Persisting the RNG allows players to start testing and predicting actions after loading the game. It&#x27;s a tricky question.<p>Another really interesting tangent to go on here as well is how the NES and similar old consoles handled randomness: They didn&#x27;t really. The randomness was based on player inputs. This in turn gives raise to a great TAS technique: RNG manipulation. Carefully crafting input sequences can optimize the random results you get later, which results in entirely crazy runs.<p>It&#x27;s a very interesting topic overall.
评论 #35413480 未加载
评论 #35414170 未加载
acidburnNSA大约 2 年前
I had a fun time rigging my Geiger counter up to my computer for a little demo project of getting random numbers from radioactive decay. It&#x27;s stupidly slow as is, but could be sped up. I should hook it up to my sound card multichannel analyzer and scintillator now that I have one and update this. Would be way faster with more pulses coming in from the lower-energy gammas and x-rays that the G-M tube can&#x27;t see.<p><a href="https:&#x2F;&#x2F;partofthething.com&#x2F;thoughts&#x2F;making-true-random-numbers-with-radioactive-decay&#x2F;" rel="nofollow">https:&#x2F;&#x2F;partofthething.com&#x2F;thoughts&#x2F;making-true-random-numbe...</a>
评论 #35410940 未加载
Exuma大约 2 年前
After this article I went and started reading about &quot;roulette computers&quot; and apparently there are 50+ sites owned by a single scammer, that all have the same layout: <a href="https:&#x2F;&#x2F;www.roulette-computers.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.roulette-computers.com&#x2F;</a><p>And apparently he owns this network of forums and review sites that all funnel towards this scam. Very interesting... It&#x27;s like as 100x worse than mattress reviews it looks like<p>I wonder if there is an actual legitimate roulette computer that exists (which is mentioned in this randomness article).<p>Maybe the scammer made this post on PCG-Random ...
评论 #35412789 未加载
评论 #35412841 未加载
dghughes大约 2 年前
My former job of a slot machine tech would often involve setting up a slot machine. The PAR (paytable and reel) sheet had set groupings you could pick. Integrity and Compliance, local government regulators, security, management, superiors, surveillance all watching me like a hawk while I enabled it then seal the chips.<p>edit: just a note that for years I wasn&#x27;t even allowed to see or touch a PAR sheet. Literally, not even see or touch the things. They were securely locked up.<p>Much of a slot machine is &quot;random&quot; but to a point where the house never lost. If it were truly random not pseudo random there would be no way to control what was won or maybe nobody would win at all. Organized chaos really. And most of the time the slot is a 10 or even 20 year old barely functioning piece of junk. The machine has been paid off (so to speak) so any money it makes is pure profit.
评论 #35413516 未加载
评论 #35413434 未加载
oconnor663大约 2 年前
&gt; High-quality algorithmic randomness is similar. If we are denied an omniscient perspective—if we can&#x27;t look “inside the box” to see what is going on—the random numbers produced will seem completely random.<p>The article touches on this briefly, but I think the distinction between cryptographic pseudorandomness and (unfortunately) &quot;ordinary&quot; pseudorandomness is important here. To get at the difference, we could say that you&#x27;re allowed to look at everything inside the box, except specifically the bits of the secret seed. If there&#x27;s still no way for you to distinguish the output from true randomness, other than the &quot;brute force&quot; strategy of trying every possible seed value, then this box gives you cryptographic randomness (i.e. it&#x27;s a &quot;CSPRNG&quot;). Usually we&#x27;d also want to make the seed big enough that we don&#x27;t have to worry about that brute force attack in practice, 256 bits as a rule of thumb.<p>&gt; They would then use their spy-craft to combine their message with the random numbers (e.g., by numbering the letters of the alphabet and adding each successive letter of their message to each successive number from the table). They could then send that message knowing that if it was intercepted, it would be unreadable without a copy of their codebook<p>(I&#x27;m sure the author understands the following, but I think it&#x27;s important to clairfy it anytime we touch on encryption.)<p>This sort of scenario is tricky if we don&#x27;t make the &quot;cryptographic vs ordinary&quot; distinction above. There are lots of PRNGs that look random to us but whose output can be fully predictable to a computer program after a few observations. This isn&#x27;t a rare corner case: <i>most</i> PRNGs have this issue unless they&#x27;re speficially designed not to. For example, the Mersenne Twister algorithm used by Python&#x27;s `random` module has this property, and I think the PCG algorithm that this article is about also has this property. If you use Python&#x27;s `random.randbytes()` to generate your codebook, it&#x27;s entirely possible and arguably likely that someone reading your encrypted messages will learn enough to predict every subsequent page of your codebook, which lets them easily decrypt all your messages after a certain point.
评论 #35417440 未加载
cratermoon大约 2 年前
This article&#x27;s argument boils down to Newtonian physics being, in theory, completely deterministic, thus not &quot;true&quot; randomness. It says, &quot;tools exist to predict the path of a roulette ball (using data gained after it has been released and before the croupier calls, “No more bets!”), at least according to people who make money selling such gizmos&quot;. Key phrase there is <i>according to people who make money selling such gizmos</i>.<p>It leaves quantum randomness for a footnote, after spending many words saying that if you use a big enough permuted congruential generator, it&#x27;s random enough for cryptographic use.
mattpallissard大约 2 年前
&gt; Arguably then, from a truly omniscient perspective, nothing, not even the physical world, is truly random<p>Technicality or practicality? This is one of those mathematician vs engineer topics. I&#x27;m reminded of this lkml thread from a few years back.<p><a href="https:&#x2F;&#x2F;lwn.net&#x2F;ml&#x2F;netdev&#x2F;CAHk-=wiSw7zYVUxiGT=_TPx1fqtNNYgu0L6rC=GaSGpCDnDbVw@mail.gmail.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;ml&#x2F;netdev&#x2F;CAHk-=wiSw7zYVUxiGT=_TPx1fqtNNYgu0...</a>
评论 #35412100 未加载
transitivebs大约 2 年前
two of the best PRNG libs for JS&#x2F;TS: <a href="https:&#x2F;&#x2F;github.com&#x2F;transitive-bullshit&#x2F;random">https:&#x2F;&#x2F;github.com&#x2F;transitive-bullshit&#x2F;random</a> and <a href="https:&#x2F;&#x2F;github.com&#x2F;stdlib-js&#x2F;stdlib">https:&#x2F;&#x2F;github.com&#x2F;stdlib-js&#x2F;stdlib</a>
night-rider大约 2 年前
Is it possible to gather entropy from weird sources from the user like mouse movements, that person&#x27;s timezone, OS version and type, language preferences, screen resolution, browser fingerprint etc?<p>How would that be any different than atmospheric noise or die rolls? Are people&#x27;s mouse movements and browser fingerprints that predictable, because last time I checked, people have a certain cadence by the way they move their mouse and the way they type, and browser fingerprinting yields very unique data which is hard to replicate and reproduce.
评论 #35413953 未加载
rramadass大约 2 年前
This article touches a nerve for me since i have always wanted to better understand (ever since exposed to books by Ivar Ekeland and Nassim Taleb) the relation and differences between concepts like <i>Random, Probability, Stochastic, Pseudo-Random, Determinism&#x2F;Non-Determinism, Chaos, Information, Entropy</i>.<p>I would really appreciate it if folks can point me to books&#x2F;papers&#x2F;articles&#x2F;etc. which explain all of the above starting from first principles.<p>Also are there any courses one can pursue to study the above?
评论 #35412693 未加载
prng2021大约 2 年前
“Arguably then, from a truly omniscient perspective, nothing, not even the physical world, is truly random”<p>Super misleading statement, especially with the accompanying footnote. Quantum physics indicates there really is true randomness in the physical world, but let’s just ignore that, stick to Newtonian physics, and throw in a quick footnote to cover ourselves.
评论 #35413273 未加载
danbmil99大约 2 年前
I&#x27;ll just put this here.<p><a href="https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;the-art-of&#x2F;9780470503829&#x2F;simo_9780470503829_oeb_c01_r1.html" rel="nofollow">https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;the-art-of&#x2F;978047050382...</a>
searealist大约 2 年前
She has time to write blog posts, but claims she doesn&#x27;t have a few minutes to update the lying front page that makes claims like pcg having just as good prediction difficulty as chacha20 and other misleading entries.