This m-file performs the game of Guess my Number. You can select one from five levels of game. Then you should input your guess number until you can find it. At the end you will receive the performance level to guess.
Antonio Trujillo-Ortiz (2021). guessmynumber (https://www.mathworks.com/matlabcentral/fileexchange/10450-guessmynumber), MATLAB Central File Exchange. Retrieved .
It does work, but its not terribly interesting as games go.
The program is rather primitive and the assessment of the number of guesses needed to solve the problem is inadequate (You would expect a log2(N) (binary search) number of guesses about optimal, less guesses are plain luck)
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!