Re:Show HN: BreakLock – A hybrid of Mastermind and the Andro...
by taneq on Wednesday April 26, 2017 @09:31AM
(#14202752)
This is harder than Mastermind because you're not allowed to repeat colours/numbers in your entries.
Interestingly, I find I'm using some similar logic to what I use playing Minesweeper. "Three of this quartet are in the pattern, one of this quartet is in the pattern, they overlap in two places, therefore the two non-overlapped points in the three-scoring quartet must be in the pattern."
First try took 19 attempts, second try took 13 and I think I can do better.
It's surprising how effective Knuth's algorithm is. If I recall 4 or 5 guesses to solve 4 digit mastermind.
[1] Computer Recreations, Software – Practice & Experience 1.2, 201-204 (Apr-Jun 1971) [2] D.E. Knuth, The Computer as Master Mind, J. Recreational Mathematics Vol. 9 (1976/7)