The game of mastermind, as defined here, is to draw four digits from the pack 0-9 and have mastermind guess what they are. A chosen digit in the right position scores a Bull, a chosen digit in the wrong position scores a Cow, and the machine makes guesses consistent with these scores.
To give it one game type:
mm(d1,d2,d3,d4).
To have it play all games type:
all
In this case it will present a running avarage guess count. The optimum game is believed to average about 5.5.
The strategy here is to always make the same first five shrewd guesses, but break off if significant information is obtained and then back through the remaining consistent possibilities.
Ray Reeves
support@amzi.com