User Tools

Site Tools


bagels

The Game: Pico, Fermi, Bagel

U of Washington Description

Some PFB Puzzles

The computer picks a 3-digit number at random in which no two digits are the same. The user must guess the number. If the human has a correct digit in the correct position then the computer displays “Fermi”. If the human has a correct digit in the wrong place then the computer displays ‘Pico’. If none of the human’s digits are in the computer’s number then the computer displays ‘Bagels’. Keep track of the number of guesses it takes for the human guess the computer’s number.

PicoFermiBagel.java starter code.

What you need to get it to work

  1. complete the clue method that has the clues in Pico Fermi Bagels order
  2. complete the makeNonRepeatingCode so the game is easier to play
  3. complete the clueForKids method so the clues are in the same order as the numbers

What else?

  1. Make the game with (4 or more) non-repeating digits
  2. Make the game with 3 (or more) digits, where a repeated digit is allowed.
  3. Cake you make a version where the computer is the player that guesses your number? Can you find the best strategy?
  4. Make the game ask which version on the game at the beginning
  5. Make the computer play against the play to see who gets it first.
  6. Can you make it more like Mastermind that has Four colors rather than 10 digits, but the colors can repeat?
bagels.txt · Last modified: 2025/07/15 11:21 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki