<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>伪随机数 on 技术博客 - 有条工具</title><link>/blog/tags/%E4%BC%AA%E9%9A%8F%E6%9C%BA%E6%95%B0/</link><description>Recent content in 伪随机数 on 技术博客 - 有条工具</description><generator>Hugo -- 0.147.7</generator><language>zh-cn</language><copyright>2024-2025 有条工具技术博客</copyright><lastBuildDate>Wed, 18 Nov 2026 09:00:00 +0800</lastBuildDate><atom:link href="/blog/tags/%E4%BC%AA%E9%9A%8F%E6%9C%BA%E6%95%B0/feed.xml" rel="self" type="application/rss+xml"/><item><title>随机数的工程学：mulberry32 种子复现同一份卷，与为什么不该用 sort 洗牌</title><link>/blog/articles/prng-seeding-shuffling/</link><pubDate>Wed, 18 Nov 2026 09:00:00 +0800</pubDate><guid>/blog/articles/prng-seeding-shuffling/</guid><description>「同一份口算卷怎么过几天还能再打一份一模一样的？」答案在伪随机数的种子机制：mulberry32 这类确定性 PRNG 同一种子产生完全相同的 [0,1) 序列——种子即复现密码。这篇拆解 PRNG 的确定性本质、Math.random 与种子化的取舍、抽牌不放回的正确姿势，以及那个流传极广的错误写法 sort(() =&amp;gt; Math.random() - 0.5) 为什么洗出一副有偏的牌。</description></item></channel></rss>