Mastermind playing program (2)

The second version of the mastermind playing program has a hit rate of 94%, give or take, for 4 digits within 12 tries at most, and an average of 9.3 guesses are actually needed (including lost games.) Correlation is used as a 'last ditch' effort to properly place the digits. The code is now 3.5k longer at about 19k, so maybe it is time to pick out another project.

In the original mastermind page, it was not mentioned that once three wrong columns have been found for a digit, its proper location can be deduced. When two digits have been rightfully placed, the position of the rest at most takes two tries. Otherwise, that section is a fair description of what the code does- if not how it does it.

Present Random Quote:

A free gift is what you have already paid for- dearly!

1