Sutom Resolver is a .NET console application that helps solve Sutom-style word puzzles.
It is built around a solver pipeline that can:
- generate a candidate guess from a known pattern
- evaluate guess feedback using the Sutom rules
- refine the candidate list after each response
- simulate thousands of games to compare solver strategies
The repository currently contains several solver versions under SutomResolver/solver/:
v1- baseline solverv2- improved solver logicv3- heuristic-driven solverv4- current solver used by the entry point
- Interactive solving from a partially known pattern
- Game simulation for benchmarking solver performance
- Word normalization to handle accents consistently
- Dictionary-based candidate filtering
- Multiple solver implementations for experimentation
- Automated tests and CI with coverage and SonarCloud analysis
.
|-- SutomResolver/ # Console app
| |-- Program.cs # Application entry point
| |-- Simulator.cs # Interactive mode and game simulation
| |-- SutomHelper.cs # Word loading and response evaluation helpers
| |-- data/fr.txt # French dictionary used by the solver
| |-- solver/ # Solver implementations
|-- SutomResolver.Tests/ # MSTest test project
|-- .github/workflows/ # CI workflow
|-- coverlet.runsettings # Coverage configuration
`-- SutomResolver.sln # Visual Studio solution
git clone https://github.com/Korgys/sutom-resolver.git
cd sutom-resolverdotnet buildcd SutomResolver
dotnet runThe application is intended to be used from the command line.
Enter the known pattern when prompted, for example:
L___
You then answer each proposed guess using the Sutom feedback format:
_or?for absent letters+for letters present but in the wrong position- the letter itself when it is correctly placed
- Start with the known pattern of the hidden word.
- After each suggested guess, enter the feedback pattern returned by the game.
- Keep following the prompt until the solver finds the word or no candidates remain.
Entrez le pattern du mot a trouver (ex: L___) :
L___
Le solveur propose : LION
Entrez le pattern du mot a trouver :
L++_
The exact guesses depend on the active solver and dictionary state.
The project also supports simulation through the Simulator<T> class.
The current entry point uses the interactive mode, but the codebase can be extended to run batch simulations for solver comparison.
The solver uses a dictionary-driven workflow:
- Load the French word list from
SutomResolver/data/fr.txt. - Normalize words to uppercase without diacritics.
- Filter candidates by word length and any known constraints.
- Produce the next guess from the active solver implementation.
- Apply the Sutom response pattern to shrink the candidate set.
- Repeat until the word is found or the solver runs out of attempts.
The response evaluator in SutomHelper.GetResultFromGuess follows the same two-pass logic used by word games:
- exact matches are marked first
- misplaced letters are marked only if occurrences remain available
The default application flow is interactive.
Example session:
Entrez le pattern du mot a trouver (ex: L___) :
If you enter a partially known pattern, the solver will keep proposing guesses until:
- the word is found
- the candidate list is exhausted
- the response you provide eliminates all possibilities
Simulator<T> is designed to benchmark solver quality over many random games.
It tracks:
- number of games played
- wins
- losses
- average turns
- runtime in milliseconds
This is what the test project uses to compare solver versions.
- Improve solver performance
- Add richer CLI options for batch solving and simulations
- Publish coverage and quality badges with live project metrics
Run the full test suite with:
dotnet testThe test project currently checks:
- success rate for solver versions
v1,v2, andv3 - relative improvement between solver generations
The solver relies on the French word list stored in:
SutomResolver/data/fr.txt
If you want to adapt the project to another language or dictionary:
- replace the word list
- keep the normalization behavior aligned with your target language
- review the solver heuristics and test expectations
The cleanest extension point is a new solver implementation under:
SutomResolver/solver/
To add a new strategy:
- Implement the
ISolvercontract. - Add your solver in a new folder or version namespace.
- Update the entry point if you want it to become the default.
- Add tests that compare it against the existing versions.
This project is licensed under the MIT License. See LICENSE.