wordle_rs

build license docs changelog

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, a binary that can run and compare Wordle strategies written with wordle_rs.

Please feel free to contribute your own strategies to wordle_strategies!

Using wordle_rs to write and evaluate a strategy

Add the following to your Cargo.toml:

toml [dependencies] wordle_rs = "0.1.2"

Then, define a new struct and implement the Strategy trait for it.

```rust,ignore use wordle_rs::Strategy;

struct MyCoolStrategy;

impl Strategy for MyCoolStrategy { // snip } ```

Finally, configure and run the test harness on your strategy.

```rust,ignore use wordle_rs::{harness::Harness};

fn main() { let harness = Harness::new() .addstrategy(Box::new(MyCoolStrategy)) .testall(); let perfs = harness.runandsummarize(); } ```

Or, use wordle_runner to run the strategy for you!

Using wordle_runner

Forthcoming.

Running strategies from wordle_strategies

To run a pre-made strategy (possibly against your own!), first add the following to your Cargo.toml:

toml [dependencies] wordle_rs = "0.1.2" wordle_strategies = "0.1.2"

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

```rust,ignore use wordlers::{harness::Harness}; use wordlestrategies::Common;

fn main() { let harness = Harness::new() .addstrategy(Box::new(Common)) .testnum(10); let perfs = harness.runandsummarize(); } ```

License

Everything in this project is licensed under the MIT license.