Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siadat/wordle-solver-haskell
solve a wordle with haskell
https://github.com/siadat/wordle-solver-haskell
haskell wordle wordle-haskell wordle-solver
Last synced: 27 days ago
JSON representation
solve a wordle with haskell
- Host: GitHub
- URL: https://github.com/siadat/wordle-solver-haskell
- Owner: siadat
- License: bsd-3-clause
- Created: 2022-01-26T00:17:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T16:18:49.000Z (almost 3 years ago)
- Last Synced: 2023-03-11T13:49:39.226Z (over 1 year ago)
- Topics: haskell, wordle, wordle-haskell, wordle-solver
- Language: Haskell
- Homepage:
- Size: 71.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# wordle-solver-haskell
[![Haskell CI](https://github.com/siadat/wordle-solver-haskell/actions/workflows/haskell.yml/badge.svg)](https://github.com/siadat/wordle-solver-haskell/actions/workflows/haskell.yml)
A Wordle solver written in Haskell. This tool suggests words (eg `boxer`) and then you provide the colors for that word (eg `02022`).
No heuristics are used. The tool only suggests the first word that complies with previous seen colors and guesses.I am learning Haskell and I would highly appreciate your feedback!
The [main logic](https://github.com/siadat/wordle-solver-haskell/blob/main/src/Lib.hs#L131-L142) and its [tests](https://github.com/siadat/wordle-solver-haskell/blob/main/test/Spec.hs#L30-L34) might be interesting.## Usage
Open a Wordle game (eg [Wordle](https://www.powerlanguage.co.uk/wordle/) or [Absurdle](https://qntm.org/files/wordle/index.html)), then run:
```
make run
``````
Guide:
0 = black
1 = yellow
2 = green
Example:
22001 = 2 greens, 2 blacks, 1 yellowEnter colors for 'showy': 00000
Enter colors for 'angle': 00001
Enter colors for 'tepid': 01010
Enter colors for 'fixer': 11021
Enter colors for 'brief': 22222
Found!
Bye
```## Run the tests
```
make test
```## Acknowledgements
- Thanks [@Zij-IT](https://github.com/Zij-IT) for improving the code via https://github.com/siadat/wordle-solver-haskell/pull/1