What is black-peg Mastermind?
A secret code has N positions, each holding one of K symbols. Repeats are allowed. You guess any code of the same length, and the only answer is the number of positions where your guess and the secret have the same symbol, from 0 to N. You never learn which positions matched. The game ends when the answer is N/N; that final guess counts.
Classic Mastermind answers with two kinds of pegs: black for the right colour in the right place and white for the right colour in the wrong place. Black-peg Mastermind, also called black-peg only Mastermind, gives just the black pegs. One count can be explained in many different ways, which is what makes it hard.
Example
Secret GGHHKGAGHF, guess HHHHHHHHHH. The H in positions 3, 4 and 9
matches, so the answer is 3. Nothing says which three.