Mastermind the game was invented by a postmaster, not a toy designer.

Mordecai Meirowitz, an Israeli postmaster and telecommunications expert, devised it in 1970. One player sets a hidden code of coloured pegs, and the other tries to break it in as few guesses as possible.

The idea was not new. Wikipedia says the game resembles Bulls and Cows, a pencil-and-paper guessing game that may be a century old. A computer version called MOO ran in the 1960s on Cambridge University's Titan system. Meirowitz turned the scheme into a physical board with plastic pegs.

Meirowitz pitched the idea to major toy companies, according to Wikipedia. The Forward reports that Meirowitz showed the game at the 1971 Nuremberg Toy Fair. There Invicta Plastics, a firm near Leicester in England, bought the rights. Its founder, Edward Jones-Fenleigh, refined the design, and the game came out in 1971 and 1972.

The name was an existing word, though none of the sources say who chose it. Grammarphobia says the OED's earliest "master-mind," meaning an outstanding intellect, is in John Dryden's play Cleomenes of 1692. The criminal sense is first cited from Anthony Trollope's The Eustace Diamonds in 1872. Merriam-Webster dates the verb, to plan a scheme from the top, to 1927. The game plays on both: a cool intellect quietly working out someone else's secret. Wikipedia says Invicta always called it "Master Mind," as two words.

The box became famous too. From 1973 it showed a man in a suit jacket with a young woman standing behind him. The two amateur models, Bill Woodward and Cecilia Fung, met again for a publicity photo in 2003.

Spin-offs kept the name, such as Super Mastermind and Word Mastermind. Other countries did not always. East Germany sold a version called Super Code. Mathematicians took the game seriously as well. Donald Knuth showed that the four-peg version can always be solved in five guesses or fewer.