So what happens when you decide to play Roshambo against a Machine Learning AI? You lose... Hard.
The Rock, Paper, Scissors AI uses a string to save a list of characters representing all previous moves made by the player. It then uses a search algorithm to check for the set of previous player moves in the entire set of moves, and finds the most common move to follow. For example, if I choose Rock (R), the Paper (P), then Scissors (S), it would be represented in the string as "RPS". So if I were to use the moves RPSRP, the algorithm would search for the last two moves (being Rock and Paper) in the entire string, excluding the previous two moves. It would find the only other instance of "RP" to be followed by scissors. Knowing the user is most likely to choose scissors, it then chooses rock, since rock beats scissors. It obviously gets way more complicated, but that's the system in a nutshell.