wordle_strategies

Crates.iowordle_strategies
lib.rswordle_strategies
version0.2.0
sourcesrc
created_at2022-01-24 18:01:15.652795
updated_at2022-02-06 15:45:47.229732
descriptionSome Wordle strategies built with wordle_rs
homepage
repositoryhttps://github.com/cgm616/wordle_rs/
max_upload_size
id520333
size2,651,677
Cole Graber-Mitchell (cgm616)

documentation

README

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.

Commit count: 74

cargo fmt