Showing posts with label game theory. Show all posts
Showing posts with label game theory. Show all posts

Tuesday, July 26, 2011

Winning at roulette

I’m going to tell you a sure way to win at roulette…for free. All you have to do is double your bet every time you lose until you win. You properly heard this before. The only problem is that it is not working over a long time. It might fool you because you will win small amounts for some time but sooner or later you’ll lose it all back and then some. The only sure way to win long term is to be the casino.
So let’s take a closer look at this strategy. First of all it’s called Martingale and has been played properly as long as roulette itself. It has just a few very simple rules:
• Start with one betting unit (e.g. 10$)
• If you win => pocket the win and start over again
• If you lose => double your bet (going from 1, 2, 4, 8, 16, 32….)
That’s it ! This will win you one betting unit most of the time. And give you a false sense of security. Until you hit that one big losing streak which will erase all wins.


The above table shows all possible combinations after five rounds (without the fatal green zero(s)). Without the green zeros the chance to hit red or black is fifty percent each. Now analyze the possible outcomes if you bet on red every time following the rules above:


As you can see in the above tables you will bust once out of 32 times. When you do you will lose a total of 31 units. The other 31 times you will win one unit each. This results in an expected value (EV) of:
(31/32 * 1) + (1/32 * -31) = 0
So you are not making a profit…but you are also not losing like I said before. This is because, as already mentioned above, we neglected the zero(s) which is making the roulette unprofitable. But showing no profit if the rules are not as bad as in the casino should already demonstrate that the method is not working as advertised.
If we include the green zeros into the above tables the chance to win is getting smaller (lower than fifty percent). Hitting the correct color has a chance of 18/37 = ~48.6% (single zero) or 18/38 = ~47.4 (double zero). This results in a negative EV for this betting system which is called Martingale.

Tuesday, October 6, 2009

Klondike Solitaire - is it beatable ?

I am one of those people who can play klondike (sometimes also just called solitaire) for hours and hours. And I was always looking for the best strategy to play. When searching on the internet I noticed that there is next to no websites on strategy and zero information on the expected value (EV) of this game.
One of the few pages with some insight on this topic is OddThinking but this is a slightly different game than the one I am interested in. I prefer the vegas style game where you can only move through the deck exactly once and any card that has been moved up has to stay up.
As stated before I could not find an analysis of this game online which is strange because this game can even be played in some online casinos for real money. So I build myself a simulator to play it automatically. Here are my first results:
My best strategy so far is able to move up about 9.3 cards in average. Which would result in a house edge of 7%. I am confident that it still can be improved.
A Monte Carlo run of 1000 plays per deck (meaning a certain deck or single game is played 1000 times with totally random moves) is able to score a average of 14.5 cards. Of course this value can never be reached by any "real" strategy it will only give a upper threshold.
A "real" strategy has to make a decision on the next move by the information which is currently available (we call this a information set). Since Klondike is a game of imperfect information (because some cards are still hidden) there might be different games which have the same information set. All visible cards are exactly the same but the hidden cards are distributed differently. Our strategy always has to make the same move which of course will result in different results on each unique game. Monte Carlo will choose different moves each time and will ignore the information set. That is the reason why a strategy will never beat the Monte Carlo approach (if the game has imperfect information).

More to follow.....

Wednesday, September 5, 2007

Checkers solved

In case you have not heard it by now: Checkers is solved. A perfect play of both sides will always lead to a draw. Checkers is the most complex game at the moment that is solved. Have a look at Chinook for a detailed description of the project. It took them 24 years to calculate all 5 * 10^20 possibilities in a legal game.

So checkers solved, chess dominated by computers and backgammon as well. If you are looking for a game where computers do not stand a chance against a decent human you should head straight to Go. There are 4.7 * 10^170 positions possible in Go whereas chess "only" has 10^43. And because computers are still calculating each and every move - more or less - they got to much to do. Humans just have a better "feeling" for a situation - if trained well.

Well i guess in another 30 years or even less chess will be solved as well. And maybe someday Go might fall - but by this time we will all be living inside the matrix anyway.

Saturday, July 28, 2007

pirates of the gold coast

Let me tell you how i discovered game theory. I read a riddle about five pirates – intelligent pirates – who want to split a treasure. I don’t want to present you with fancy formulas and mathematical explanations. Just try to solve the riddle yourself and enjoy the surprising solution. So here is the riddle:

Five pirates got their hand on 500 gold coins. Now they want to devide the treasure. But because they are intelligent pirates – like a sober captain sparrow - and not the stereotype pirates who would just betray and kill until there is only a last one standing. One after the other will make a suggestion how to split the coins among the pirates. If a suggestion doesn’t get at least half the votes it is declined and the pirate making the suggestion is killed by the others. If the suggestion gets half the votes - or more - it is accepted and the gold is split. The pirate making the suggestion can also vote. So if the first suggestions is not accepted – and the pirate killed - the second pirate only needs to persuade one companion to have the gold split the way he wants it to. So what is the accepted suggestion ? Each pirates wants to make as much as possible - of course - without dying - surprise, surprise.
I will post the solution and explanation as a comment within a couple of days.