3 ms·
An algorithm for winning at rock-paper-scissors
- srean 13y agoOnce, just to humor myself I had written a script that zlib compressed my own and my adversary's history, appended by one of the three possible symbols r, p, s. The idea was that if there were repeating patterns in the history, the compressor would latch on to them. The code would then play the symbol that led to the highest compression. It did not win the competition, but worked better than I had anticipated. In essence I was (re)using the compressor as a probability estimator rather than writing one from scratch. I should also mention that randomized plays were not allowed.