Bobby’s booby-trapped safe requires a $3$-digit code to unlock it. Alex has a probe which can test combinations without typing them on the safe. The probe responds Fail if no individual digit is correct. Otherwise it responds Close, including when all digits are correct. For example, if the correct code is $014$, then the responses to $099$ and $014$ are both Close, but the response to $140$ is Fail. If Alex is following an optimal strategy, what is the smallest number of attempts needed to guarantee that he knows the correct code, whatever it is?
I think the optimal number is $13$ (start by trying $000$, $111$, $\ldots$, $999$), but it's hard to find bounds here. Any help?