Minimax partition
Each candidate guess partitions the remaining answer set by the 3^5 = 243 possible colour patterns Wordle can return. The minimax score of a guess is the size of its largest partition class — and at the root, the guess minimising the total expected depth (with the largest partition as a tiebreak) is optimal.
BoardSolve precomputes the colour pattern for every (guess, answer) pair in the official lists so the inner loop is a single table lookup, then searches with iterative deepening and pruning by the proven-optimal depth bound.
Hard mode and custom dictionaries
The same engine handles 'hard mode' (every guess must be consistent with previous clues) by restricting the candidate guesses to the current answer set. You can also paste a different answer list — the algorithm is independent of the specific words.