Maximum number of steps needed to solve a n-digit Pico, Bagel and Fermi Game

Bagel Pico Fermi is a mathematical number guessing game.

In this game, one person writes down a 3 digit number with all different digits and can be started with even 0. and the guessers try and figure it out based on process of elimination and strategy. The guessers take turns guessing a 3 digit number with all different digits. The first guess is made randomly. The writer writes down the first guess and then writes a 3 letter code next to it. A Bagel (B) means that no any digit of guess is in the answer at all. A Pico (P) means a digit is correct, but it is in the wrong spot. A Fermi (F) means a number is correct and it is in the correct location. Mutiple clues can be given if more than one number matches any above rule. The clues are ordered alphabetically so we cannot know which clue is for which digit. Read more about this here.

Example: Let secret Number is 385

Guess 1: 123, Clues : pico

Guess 2: 675, Clues : Fermi

Guess 3: 196, Clues : Bagel

Guess 4: 395, Clues : Fermi Fermi

I hope now yo understand this game.

My Question

I want to know what is the maximum number of guesses one has to made in order to correctly find out the secret number. For 1-digit number, maximum guesses to be made is 9 but I couldn't figure how to find this for number with greater digit.

• Please state the rules here so people don't have to click through. Links can rot and cannot be searched. There is a lot of text and pictures around the rules. – Ross Millikan Aug 9 at 3:58
• Okay, Thanks for the suggestion. I have edited the question. – Rohit Joshi Aug 9 at 11:50
• This class of game is more often called Mastermind. This particular variant has 3 (or 4) symbols from an alphabet of 10. en.wikipedia.org/wiki/Mastermind_(board_game) – Dan Uznanski Aug 9 at 14:27
• @Rohit Joshi: You forgot to state that the rules require the secret number to have distinct digits. Presumably the guesses are also required to have distinct digits. If so, that should be stated as well. Also, to avoid an awkward asymmetry, you should indicate that a leading zero digit is allowed. For example, in the video, they show the number $012$. – quasi Aug 9 at 15:33
• @quasi Thank you ! I had not thought about that. – Rohit Joshi Aug 9 at 17:12