Rock Paper Scissors…

I saw this article in the NY Times and was inspired to write my own Rock Paper Scissors implementation.

The AI uses something very similar to a Markov Chain to determine it’s next move, with the exception that the transition matrix is updated after each decision by the player. Currently, I just use a simple weighting scheme to change the conditional probabilities between rounds, although hopefully in the near future I’ll be able to find the time to develop an updating scheme based on Bayes Theorem.

This is the source code.

Quick after thought: I beat the NYTimes/Facebook ai 8-2-2 with the strategy of determining my next selection by rolling a die. :)

This entry was posted in Includes JAVA code, Statistics. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>