11 个版本
0.1.11 | 2020 年 9 月 11 日 |
---|---|
0.1.10 | 2020 年 9 月 11 日 |
0.1.9 | 2020 年 8 月 24 日 |
0.1.8 | 2020 年 7 月 25 日 |
在 #memorable 中排名第 4
170KB
256 行代码(不包括注释)
Muid-Rust
使用 Rust 实现对 可记忆的唯一标识符 (Muids) 的搜索。
用法
设置 DIFFICULTY 环境变量为要找到的 muid 的难度级别。
使用 cargo build --release
编译代码以获得优化构建。你可能需要使用 Rust 的夜间版本。
Muid Search Tool
Rusty Conover <rusty@conover.me>
Searches for Memorable Unique Identifiers of a specified difficulty.
USAGE:
muid [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-m, --mode <mode> Sets the mode used for searching [default: range] [possible values: rng, range]
--range-start <VALUE> Sets the starting step number for range based searching [default: 0]
--rng-max-tries <VALUE> Sets the maximum number of iterations for rng based searching,
0 implies no limit [default: 0]
示例
# For level 10, valid levels even numbers between 6-14
$ RUSTFLAGS="-C target-cpu=native" DIFFICULTY=10 cargo build --release
...
...
$ ./target/release/muid-rust
Searching with difficulty=6
Using 16 cpus to search for muids...
Pretty Name dog-fly Key: 0e09bdaa2a53d31aa35242ae50152f25 Hash: d09f14004105432722cda46ad08f4a4f
Pretty Name thy-dog Key: de52b52b10d6244f739688f61fca2b0d Hash: 764d09826b1292c2f79e83c2da56fb59
Pretty Name cal-cod Key: 0c86f987ec9a978039edfef34e5892f5 Hash: ca1c0d27ebbaf2111e03ae97b0fbf071
Pretty Name ebb-fox Key: 9b701fa73e12156302b3748f0fd77aaf Hash: ebbf0811b004ef1c6c334696e11663ce
Pretty Name hah-bat Key: 3e0a9c2b22000198d0495025ee3e3b07 Hash: 6a6ba7cfd42a44ee91591bb77e07f683
或更具挑战性,难度为 10
Pretty Name lactose-bat Key: 6834037f64447ce3ee783fada788c952 Hash: 1ac705eba79ecd4f0689cc07869d242b
Pretty Name sachem-toad Key: 3849a7a599274bd587717d5d2680f6d2 Hash: 5ac6e370addbd9086524ddc1789970fa
Pretty Name dambose-fox Key: d2d88c544ed6811ba431c311c7f37960 Hash: da3b05ef084ae4614ab9828bde0957ed
Pretty Name hatable-cod Key: 0ac7f3e7d0115ae516483ccd583adb24 Hash: 6a7ab1ec0d47ff7b19defe707e6016fc
有用的 muid 难度在 12 级以上。
每增加一级难度,找到每个 muid 需要的 CPU 时间大约增加 16 倍。
需要注意的事项
此程序在找到固定数量的 muid 后不会终止,它只是继续搜索。
如果您使用的是 rng 搜索方法并指定适当的参数,则可以停止搜索。
此程序将使用您计算机上的所有 CPU,达到 100%。
依赖项
~9.5MB
~263K SLoC