๐Ÿ“ฆ rparrett / df-crash-miner

Mining for Dwarf Fortress world generation crash seeds

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
๐Ÿ“ฅ Clone https://github.com/rparrett/df-crash-miner.git
HTTPS git clone https://github.com/rparrett/df-crash-miner.git
SSH git clone git@github.com:rparrett/df-crash-miner.git
CLI gh repo clone rparrett/df-crash-miner
Rob Parrett Rob Parrett More screenshot! 9de4b4a 4 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ params
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ Cargo.lock
๐Ÿ“„ Cargo.toml
๐Ÿ“„ README.md
๐Ÿ“„ README.md

Dwarf Fortress Crash Miner

Automated discovery of reproducible world generation crash seeds

a.k.a. "Let's rewrite a perfectly okay bash script in rust for no particular reason"

This is in a working state but there are some rough edges. At the moment I am not terribly motivated to improve it further.

How

You'll have to build it from source.

First, install rust.

git clone https://github.com/rparrett/df-crash-miner/
cd df-crash-miner
cargo run --release update
cargo run --release crash --params=long_history_pocket.txt

You should now be seeing complaints about an invalid params file. The program has set up another .df-crash-miner directory in your user directory and is expecting to find that params file in there. There's an example in this repo that you can copy over.

cp df-crash-miner params/* ~/.df-crash-miner/params/
cargo run --release crash --params=long_history_pocket.txt

Param files must have [TITLE:CRASH], or you'll just see "default" medium-sized worlds being generated.

Param files must not have [SEED:] and friends, or you'll just see the same worlds generated over and over.

Eventually, crashes may occur and the program will save copies of this param file with the crash seeds to ~/.df-crash-miner

But these crashes may have been due to a cosmic ray bit flip or may be from a bug that's too intermittent to be useful for debugging.

So it's a good idea to re-run the world gen to see how often it crashes with the same seeds.

cargo run --release repro --num 10

This will run each set of crash seeds 10 times and report back how many times they actually crashed.

Screenshots

๏ฃฟ ~/src/df-crash-miner/ [main] cargo run --release --help
Dwarf Fortress Crash Miner 0.1.0

USAGE:
    df-crash-miner [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --concurrency <concurrency>    Number of world gens to run simultaneously [default: 4]

SUBCOMMANDS:
    crash     Discover new crashes
    help      Prints this message or the help of the given subcommand(s)
    repro     Reproduce crashes with param files from the crashes directory
    update    Download the latest version of Dwarf Fortress

๏ฃฟ ~/src/df-crash-miner/ [main] cargo run --release repro
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Params                                Crash   Success   Avg Time โ”‚
โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ก
โ”‚ macos-20210208-145758-631971000.txt   4       0         14s      โ”‚
โ”‚ macos-20210208-145816-037288000.txt   4       0         46s      โ”‚
โ”‚ macos-20210208-145523-124008000.txt   4       0         20s      โ”‚
โ”‚ macos-20210208-143937-930018000.txt   4       0         7s       โ”‚
โ”‚ macos-20210208-150121-168033000.txt   4       0         9s       โ”‚
โ”‚ macos-20210208-143519-313230000.txt   4       0         7s       โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ