Expand description

wordle_strategies

build license docs changelog

WARNING: this project is still unstable, so minor updates may break backwards incompatibility.

Have you ever gotten so obsessed with Wordle that you wanted to evaluate different strategies programmatically? If so, you’re in the right place.

This crate is a part of the wordle_rs project, which has three parts:

  • wordle_rs, a library with tools you can use to write and evaluate your own Wordle strategies,
  • wordle_strategies, a library demonstrating a few strategies that I wrote, and
  • wordle_runner (WIP), a binary that can run and compare Wordle strategies written with wordle_rs.

Please feel free to contribute your own strategies to wordle_strategies!

Running strategies from wordle_strategies

To run a strategy from this crate, first add the following to your Cargo.toml:

[dependencies]
wordle_rs = "0.2.0"
wordle_strategies = "0.2.0"

Then, import a strategy and run the wordle_rs test harness on your strategy.

use wordle_rs::{harness::Harness, WordleError};
use wordle_strategies::Common;

fn main() -> Result<(), WordleError> {
    let harness = Harness::new()
        .add_strategy(Box::new(Common), None)
        .test_num(10);
    let perfs = harness.run()?;
    perfs.print_report()?;

    Ok(())
}

License

Everything in this project is licensed under the MIT license.

Modules

Utilities for building strategies.

Structs

A hardmode Wordle strategy that guesses the first word that could be correct.

A hardmode Wordle strategy that uses pre-computed letter counts to make better guesses.