Showing posts with label looping. Show all posts
Showing posts with label looping. Show all posts

May 27, 2015

Playing Mastermind with GoldSim

Posted by Ryan Roper

This last weekend, I went into nerd mode and created a GoldSim version of the classic game Mastermind. If you're not familiar with Mastermind, here's the Wikipedia article about it: Mastermind (board game). According to the article, "Mastermind...is a code-breaking game for two players. The modern game with pegs was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert. It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century or more." I play this game with my kids and it often leaves me musing about what kind of strategy or algorithm I might devise to more systematically make guesses to solve the code. This musing usually lasts about 5 or 10 minutes before I decide it's not worth my time and I go on with my life. However, recently I thought it would be a fun and interesting exercise to create a GoldSim version of Mastermind.