Press on the upper user choices of Rock, Paper and Scissors buttons. The computer will keep track of your choices and learn your patterns using a first level Markov process. If you ever settle down on a pattern, the computer will learn how to beat you every time. S/H: Shows/Hides the Markov Matrix
Example: Given Markov Matrix, (Next Move) R P S R 2 5 3 (Last Move) P 1 0 4 S 0 5 7 each numerical entry shows a tally of how many times a particular sequence (RR, RP, RS, etc.) was executed before. The Matrix entries are incremented as the game is played more and more. For example RP=5 means that for 5 times the user chose to follow Rock with Paper. (Next Move) R P S R 2 5 3 (Last Move) P 1 0 4 S 0 5 7 If the user previously chose R, most likely their next move will be P (as max value is RP=5) so the computer will choose Scissors to beat it. If the user previously chose S, most likely their next move will be S (as max value is SS=7) so the computer will choose Rock to beat it. If you look at the Markov Matrix and remember your last choice, you can predict what the computer is expecting you to do next and thus you can beat the computer on that round. This project was inspired by: https://medium.com/@ssaurel/creating-a-rock-paper-scissors-game-in-java-with-a-markov-chain-for-the-ai-7672954fd7f6