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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

One Number Repeated Forever: RNG in NSMB (2020)

78 点作者 sanqui大约 4 年前

5 条评论

coolreader18大约 4 年前
I was able to guess that it was the Mario game (but I was unsure since this is HN not gamefaqs), but I'd think there are probably other acronyms that people here might jump to - I think the acronym should probably be expanded in the title.
_Microft大约 4 年前
I am curious what went wrong during development here.<p>Was it an accident? Did someone think that it would be a waste to throw away all these fine higher bits and just did <i>anything</i> with them?<p>(It feels a bit like a self-designed crypto algorithm when someone adds complexity because that&#x27;s sure better than not, isn&#x27;t it?)<p>They might not have been too familiar with linear congruential generators (LCG) because then they would have known that casting the result to an unsigned 32bit integer was not an accident but the modulus operation of the LCG (here: &quot;mod 2^32&quot;). See [0] for details.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linear_congruential_generator" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linear_congruential_generator</a>
评论 #27038909 未加载
评论 #27039548 未加载
评论 #27040254 未加载
blackboxlogic大约 4 年前
Am I having a moment or is the math off?<p>&gt; Given a random starting seed, rand_nsmb will repeat an output after 1,820,529 calls, on average.<p>&gt; Longest cycle: 1 cycle of length 1,708,724
评论 #27039793 未加载
评论 #27039636 未加载
memco大约 4 年前
The article mentions that the seeding is sufficiently random so to make it unlikely to at the RNG will get fixed, but it would be cool to see more details about how you might be able to guarantee that seed so you can speed run or TAS the game.
azundo大约 4 年前
Obligatory XKCD: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;221&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;221&#x2F;</a>
评论 #27039584 未加载