What feedback means
In IQ-25 the secret contains four digits from 1 to 6, with repetitions allowed. The first feedback number counts exact digit-and-position matches. The second counts remaining digit matches in other positions, after exact matches are removed. Feedback does not identify the positions.
Repeated digits
If the secret has one 1 and a guess has three 1s, you cannot count three matches. Each occurrence in the secret is matched at most once. Count exact matches first, then match remaining digits according to their multiplicities.
Eliminate contradictions
There are 6⁴=1296 possible codes. After each guess, keep only hypothetical secrets that would produce the observed feedback. A new guess can test several hypotheses at once. Keep earlier responses in mind: a candidate must satisfy all constraints simultaneously.
Choosing the next guess
If the digits are known, rearrange them. If their composition is uncertain, test new digits while retaining some known ones. With limited guesses, avoid guesses that provide nearly the same information as earlier ones. Start with 12 guesses, then try the 8-guess mode.
Common questions
Can a digit appear more than once?
Yes, in both the secret and the guess.
Practical example
Secret 1234, guess 1356. What feedback appears?
Show explanation
1 exact match (1), 1 misplaced match (3).
Put it into practice
Guess the four-digit code