Bulls and Cows

This is a game I used to play as a kid.

One player guesses a number with 4 digits and writes it down.

The other player takes guesses at the number.

For every digit that the other person guesses right but is in the wrong place they get a “Cow”

For every digit that the other person guesses right but and is in the right place they get a “Bull”

By using logical reasoning a good player can efficiently through asking a few questions deduce what the number is.

I was thinking this might be a good way to figure out what keys are broken in the Chamerlain garage remote.

The game Mastermind is the same idea except using coloured pegs instead of numbers.