Guessing Letter
This is a very simple game called Guessing Letter, similar to the more popular four digit number guessing game. I wrote this as a practice of javaScript.
The secret password is a four-letter string without spaces. Your job is to find out this word. Input your guess and click “Compare”, then you will get a comparason in the form of mAnB, where m is the number of slots in the password that you input correctly, and n is the number of slots in the password that you used the letter in that slot, possibly elsewhere.
I wrote a Matlab program to solve this question in as few steps as possible, based on the principle that one should maximize the negentropy of each guess.