Rock, Paper, Scissors redux, now with AI

The New York Times recently posted about an AI-backed Rock-Paper-Scissors game. I have written about it before and some have disagreed with me.

The AI version learns from past games and uses that data to predict future moves. There are two modes: “Novice” and “Veteran”. The former only learns from the rounds you’ve played with it, the latter draws from all previous games that have been played with it.

If you are someone, like my naysayer in the link above, that buys into the illusion that you can adopt any kind of real strategy in Rock-Paper-Scissors, the AI will smoke you. If you even pay attention to what the computer (or any opponent) does at all, you are buying into the lie and will become predictable.

As that page mentions, “[a] truly random game of rock-paper-scissors would result in a statistical tie with each player winning, tying and losing one-third of the time.” This is true assuming that both players are playing randomly, ignorant of one another’s choices. If one player adopts a random strategy (“plays irrationally”) while the other one plays with a strategy (“rationally”), the player with no strategy is unaffected, but the player with the strategy will be at a slight disadvantage.

A given choice in RPS is identical to the other possible choices — each one can win, lose, or tie the round with equal probability. The choices have no inherent value until the opponent’s choice is revealed. When both players play rationally, they attempt to out-think what their opponent will pick, and assign a weight value to the available choices based on that prediction. The thing to consider here is that the weight assigned is entirely based on the assumption that the opponent is selecting something on a rational basis. By selecting your choice randomly, you completely negate any advantage the other player would have gained through their strategy; not only that, but there is also a subtle cumulative penalty that they incur for as long as they believe you are still acting rationally.

When playing Texas Hold’em with some friends, a few years, ago, I realized that I was outmatched on skill and experience, so I instead adopted a completely irrational strategy – I would bet erratically, irrespective of what I was actually holding (unless I had a REALLY strong hand) and I ended up winning. Granted, my friends aren’t professionals, and that strategy would probably fail against real pros.

The fundamental difference between Poker and RPS is that RPS has no memory of previous rounds, unlike Poker. Each round in RPS may as well be a roll of the dice, a completely separate statisical event. You can play completely randomly and are not penalized cumulatively, like you would be with chips in Poker.

The screen-cap above is a small sample run I did against the computer, using a random number generator to make my choices. In a range of 1-3, 1 is Rock, 2 is Paper, 3 is Scissors. No matter what the computer plays, stick with the random protocol. You might as well just hide half of the screen, so that you aren’t tempted to make a “strategic choice.” After 40 rounds of random choice, my final record was 16W, 11T and 13L. Admittedly, the sample size isn’t very large, but I think it at least provides some good support to my argument: regardless of whether or not your opponent is using any kind of strategy, a random play is strictly better, and the more rationally they try to play the worse they do.

From the Archives: Monty Hall

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


UPDATE

After John W’s skepticism, I decided to put my code where my mouth is — please see:

http://amhill.net/projects/montyhall/

It has a simulator, demonstrating the superiority of switching, based on a sample size of 10,000 or less. Source code included.  Check it out!

For those of you who remember Let’s Make a Deal the idea of the three-door choice is very familiar. For those who aren’t familiar with Monty Hall and his extravaganza of game-showness, here’s the low-down:

Door 1
Door 2
Door 3
Goat
Goat
New Car

The contestant is presented with a choice of three doors. Two of them have a goat, and one of them has a fabulous prize, like a new car, or a boat, or an evening with Brad Pitt, or whatever. (the contestants were mostly women, since at the time less women were in the workforce, therefore they were the target demographic). Anyways, here’s how it works. They pick one of the doors, then Monty reveals one of the two doors they did not choose; but the door revealed will always contain a goat. The contestant is then allowed to stick with their choice, or change it. The puzzle here is: Is it better odds, statistically speaking, to stick with your choice, or change it, after the goat is revealed? Most mathematicians have said yes in the past, but Marilyn Vos Savant disagreed. Here is a paraphrasing of her proof: Continue reading

Goblin Game [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


goblin_gameYes it may be a magic card, but it inherently possesses a fundamental of game theory. For those of you who are not familiar with what that image to the right is, it is a card from the game Magic: the Gathering ,however it’s origin is unimportant, nor is whether or not you understand the nuances of the numbers and whatnot. The text in the lower-half of the card is what is important here. Allow me to elucidate in real-life terms….money!:

Let’s say that everyone (3 or more people) has 20 dollars. The game proceeds like this:

  1. Each player hides a certain number of objects (poker chips, for example). The number must be greater than 1.
  2. After everyone has their objects hidden, all players simultaneously reveal their objects to other players. The number of objects hidden is significant here, and should be recorded.
  3. Everyone immediately loses the amount of money equal to the number of objects hidden, this goes into a “pot” in the middle. If a player has hidden more objects than he has money, all of his money is put into the pot instead.
  4. Whoever had set aside the fewest objects loses half of their remaining money, rounded up.
  5. Repeat steps 1 – 4 until only one player is left with any money. That player then wins it all.

Understand how to play? More importantly, do you understand how this illustrates game theory? All players must consider the actions of other players when making their own decisions. Continue reading

Super-simplified Game Theory [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


Perhaps best known for the in-depth foray into the fundamentals and theory of zero-sum games is John Nash. A zero-sum game is where the winnings and losses of all players involved is always balanced. Poker is a zero-sum game, Blackjack is not.

John Nash said that during any given game, there is an equilibrium point, where no player has any advantage over another. Comparing this to poker, this would be like if all players had an equal number of chips. While this isn’t required to happen, it must be possible for it to happen.
Game theory is applied to phenomena well beyond those of board games and card games. It has military implications, economic and commercial strategy applications as well. Continue reading

From the Archives: Anatomy of a Time Walk (M:tG)

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!

Note: This post involves some rather esoteric knowledge about the card game Magic: the Gathering. Caveat lector.


Time Walk (Beta)One of the most expensive cards, and part of the elite “Power Nine” restricted list, Time Walk is one of the more sought-after cards in the Vintage tournament environment. (At least by those who don’t already have it) [Ed. note: it currently fetches between 450 and 700 dollars, depending on condition]

But what does Time Walk really do? Taking an extra turn, at first, seems like a really big deal, but how often would this “extra turn” turn out to be simply a card draw, making it no better than a card that says: “Cycling (1U): when you cycle this card, untap all your permanents you control.” If there were ways to simulate some of the elements of a turn without investing 500.00 in this card, wouldn’t that be a good thing? To get to the root of this we have to analyze what a turn really consists of. Continue reading

On Basketball and Sporting Events

This past Tuesday, while Melissa was at home writing an English paper, I took Sullivan to Indiana University East’s first volleyball game as an NAIA team. I’m not one who usually frequents sporting events at all, but I made an exception in this case because, as part of External Affairs and Marketing, we’re supposed to make a big deal out of this.

Our team played AWESOME. While I wouldn’t say the girls played as good as professional / Olympic teams, they were pretty well coordinated and talented players. There were quite a number of serves that would just BARELY scrape over the top of the net (that’s a good thing — low serves hit the ground sooner and are harder to return. Especially if they’re fast). They played 3 games altogether, and only two of them did their opponents accrue more than 15 of the 30 necessary points. So, Go Lady Pioneers!

Continue reading