I made a Shiny app that beats people at rock paper scissors. It uses a 5-gram to model opponent behavior and pick the action most likely to win on the next round. Good luck!
Write-up that explains code and computer player logic here:
https://macstrelioff.github.io/MacStrelioff/data-science/shiny_apps_rps/
App hosted here:
macstrelioff.shinyapps.io/RockPaperScissorsAgent