4 releases
0.2.0 | Feb 6, 2022 |
---|---|
0.1.2 | Jan 24, 2022 |
0.1.1 | Jan 24, 2022 |
0.1.0 | Jan 24, 2022 |
#331 in Simulation
340KB
3.5K
SLoC
wordle_strategies
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, andwordle_runner
(WIP), a binary that can run and compare Wordle strategies written withwordle_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.
Dependencies
~3–4.5MB
~84K SLoC