Wordle Green/Yellow/Gray Feedback Pattern

Compute exact green=2/yellow=1/gray=0 Wordle feedback with green-first multiset duplicate accounting, not membership-only matching; no dictionary guessing or word-length-five assumption.

Description

Wordle feedback must account for repeated letters.

Wordle feedback must account for repeated letters. Exact matches consume answer letters before misplaced matches.1

Enter equal-length lowercase ASCII answer and guess of 1–32 letters. Mark exact positions first, then consume remaining answer counts left to right. Return feedback codes and their concatenated pattern string.

When to use Wordle Green/Yellow/Gray Feedback Pattern

Use Wordle Green/Yellow/Gray Feedback Pattern when you need to evaluate the supplied records under the calculation and evidence rules below. No dictionary, answer-list membership or guess strategy is checked.

Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.

How to use Wordle Green/Yellow/Gray Feedback Pattern and understand its results

  1. Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
  2. Enter answerWord, guessWord using the field table and calculation rules, then run the tool.
  3. Read feedbackCodes, feedbackPattern. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
answerWordAnswer wordstringRequired
guessWordGuess wordstringRequired

Enter equal-length lowercase ASCII answer and guess of 1–32 letters. Mark exact positions first, then consume remaining answer counts left to right. Return feedback codes and their concatenated pattern string.

exact=2; remaining-letter match=1; absent=0

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
feedbackCodesFeedback codeslist of number
feedbackPatternFeedback patternstring
json
{
  "input": {
    "answerWord": "apple",
    "guessWord": "alley"
  },
  "output": {
    "feedbackCodes": [
      2,
      1,
      0,
      1,
      0
    ],
    "feedbackPattern": "21010"
  }
}

Limitations and assumptions

No dictionary, answer-list membership or guess strategy is checked.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Mastermind Black/White Peg Feedback: Mastermind distinguishes exact-position matches from remaining matching symbols. Multiset consumption prevents overcounting duplicates. For a complementary task, use Scrabble Letter Tile Values Lookup: Scrabble tile totals depend on caller letter values and blank positions. A blank scores zero regardless of its displayed letter.

References

  1. Wordle Green/Yellow/Gray Feedback Pattern — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies