this post was submitted on 24 Mar 2024
26 points (96.4% liked)
Rust
5930 readers
32 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've started building a wordle-analyzer. I got nerdsniped, and now I'm implementing the game (already did a game and a cli implementation using the abstracted interface) and a solver.
The idea is to provide:
I'm providing built-in versions, but anyone could implement the traits.
I currently have two solver implementations;
The naive solver can actually solve the game in less then 10 steps most of the time. Mathematically, the optimum is about 3,4 steps. There are two amazing 3blue1brown videos going into details, and my eventual goal is implementing solvers making use of that math.
I've been using generics and traits like never before for that project. Solver? It's a trait. Game? It's a trait. Word lists? It's a trait.
And all my structs have generics
<'wl, WL>
so that I only need to have the word list once to save resources. You get a little crazy from the lifetime errors but it's fun.Besides that, my homeserver got janky this month, and today I started migrating it to proxmox. It's hard, because I need to do a lot more thinking than just docker go brr now.
In case you want to check my wordle-analyzer out: https://git.cscherr.de/PlexSheep/wordle-analyzer I need to update the readme before publishing.
That sounds like fun! Wow. How stable is it at the moment?
Not very stable at all, but the cli game (wordlec) is playable with the responses of whether you hit a letter or not, the naive solver and the stupid solver work too.
However, I expect that the API will change a lot before v0.1. I will release it when I deem it somewhat stable. Happy to hear you like it.