@gueripep/wordle-solver
Version:
A Wordle solver using entropy maximization and information theory
33 lines • 1.27 kB
TypeScript
import { SolveResult } from '../core/types.js';
/**
* Wordle solver service that implements the optimal solving strategy
*/
export declare class WordleSolver {
private readonly optimalFirstGuess;
/**
* Attempts to solve a Wordle puzzle by making optimal guesses
* @param targetWord - The target word to guess
* @param maxAttempts - Maximum number of attempts (default: 6)
* @returns SolveResult with all attempts and whether it was solved
*/
solve(targetWord: string, maxAttempts?: number): SolveResult;
/**
* Selects the best guess for a given attempt
* @param attemptNumber - The current attempt number (0-based)
* @param availableWords - Words still available as possibilities
* @returns The best guess word
*/
private selectBestGuess;
/**
* Gets the optimal first guess
*/
getOptimalFirstGuess(): string;
}
/**
* Convenience function to solve a Wordle puzzle
* @param targetWord - The target word to guess
* @param maxAttempts - Maximum number of attempts (default: 6)
* @returns SolveResult with all attempts and whether it was solved
*/
export declare function solveWordle(targetWord: string, maxAttempts?: number): SolveResult;
//# sourceMappingURL=solver.d.ts.map