Picture of me as Student
Nybyggerne.dk
WebUglen
BirthdayReminder
MasterMind
SudokuSolver
OpenPop
Playing MasterMind where the CPU guesses with 12 pegs what the player had chosen When I went on HTX we had programming as a class. One of our assignment was to make a MasterMind application. The skills in programming in this class were on a large scale, some people had never programmed while others had programmed for years. Therefore the assignemt was different for each person.

I was in the better league, and had to program MasterMind game, but also include a CPU which could play against you. Another way to say it, was that I had to implement some logic that allowed the computer to guess the colors that the player had chosen only by looking at the white and black pegs that the player would show each time the computer made a choice.

The last version I made only includes one version of the CPU, where it is not the best (because the best CPU was very resource-heavy) but neither was the worst version used.

As seen on the picture to the left is how the game mostly progress when the CPU is trying to guess the players chosen pegs. On average with 6pegs, it can guess your colors in 4,51 moves.

When you are trying to guess the computers pegs, a number appears. This is marked here with a red circle. When you are playing to guess the computers chosen pegs, there is a number (see red cirle on image) This number tells you, that if the computer had played your pegs, and gotten the same response, it would now have that number of guesses left that could be the valid one. This number decreases pretty fast!

It is also possible to see some statistics each time the computer makes a move. Sometimes it is pretty impressive to see that only one move might have invalidated 10000 combinations.

It only runs on Windows, but will properly run on Linux using Wine too.

License
There is no license, its free. Distribute to everyone you wish.

Download:
There is only one version which I will properly never update, but here it is:
MasterMind Final Edition 1.4 MB

If you find any bugs, have suggestions or just want to tell you appreciate the program, please send me an email, thanks.
Last modified 10. October 2016 foens Dont spam me @cs.au.dk Valid XHTML 1.1 Valid CSS