Wordle comparison: Difference between revisions

m
m (J: eliminate redundant test)
Line 179:
Explanation:
 
<tt><nowiki><I.x=y</nowiki></tt> is a box containing the list of exact match indices, and <tt><nowiki>(<@I.y=/~x#~y~:x)</nowiki></tt> is a list of boxes (one box for each character in the guess) of the indices of nonnot-necessarily-exact matches. Meanwhile <tt><nowiki>({.~1<.#)</nowiki></tt> means "at most one" and operates on lists (so it's empty for an empty list and the first element for a non-empty list).
 
In other words, we build a list of candidate matches for each character and then, for each character, exclude any already picked index and if there's a remaining candidates, we pick the first of those.
6,951

edits