Well, my computer has now on my behalf played 360,325 blackjack hands against a number of different online casinos, playing for real money. The results are not very bad, but not as good as expected either. Not good enough to keep me going at least, so now I quit. And so, I might as well share the experience with the BJ community.
I have written a computer program that can play against the Unified Gaming engine. It plays about 250 hands per hour in the single deck game and 175 hands per hour in the 6-deck game, where it must exit the game after each hand and re-enter to check for a shuffle. Thanks to Bob Fischer for providing me with the tip about how to detect the shuffle!
I�ll try to arrange the information in a number of sections. Those of you who just want to see the results can skip straight to that section.
1. Background
2. The making of my robot player (the technical part)
3. The choice of game
4. The systems used
5. Statistics and expected results
6. The results
1. Background
Being European, I�ve always lacked good blackjack games nearby. So, great was my joy when I discovered online casinos about 3� years ago. I started playing for fun against Avalon and Acropolis, two casinos that use the software later developed further and marketed more broadly through Stanley Acroplis. I practiced playing for fun, but it soon occurred to me that online blackjack play could be �computerized�. The decision rules for playing blackjack based on card counting can be translated into formulas that can be written into a program and followed unerringly by a computer. And it would never tire, basically being able to play around the clock.
So, I started writing a computer program to do this, and about 3 years ago, I had designed a �robot� (as others have later termed it) that was able to play 110 double hands per hour against the Acropolis engine in �fun� mode, i.e. at home on my own computer, without being connected to the internet.
I proceeded to play a large number of rounds to test the results. But the penetration of only 33% (2 decks of 6) turned out to be a show stopper. As could be expected, I found out that it took a bet spread of at least 1-10 to beat this game, and since the minimum bet in real play mode was $5, I would have to enter playing $5-50. My bankroll was just not large enough for this kind of play. So I stopped.
As I was completely unaware of the multitude of games available probably even at that time, I put it all away.
In the spring of 2001, my interest was aroused again, and this time I researched the opportunities more thoroughly, checking out a number of the different online BJ resources. I especially came across an article on the Gamemaster Online that told about a guy having made a �robot player� and played 140,000 hands in real play mode, making money on it playing the 1-deck Unified Gaming game that offered an initial player advantage. This information was very interesting in light of all the allegations of �rigged games� that proliferated on the net. And it proved that the robot player idea could be turned into real action, after all. So, I decided to revive the old program and try it out for real.
2. The making of my robot player (the technical part)
Before I go on, I should perhaps say that I am not a professional programmer. My experience was limited to a little programming in Pascal and a basic knowledge of how computers work. Most of the knowledge needed to do the job I picked up along the way using help files and tutorials and knowledge bases on the net.
Anyway, I knew from the beginning that the key problem would be to identify the cards being dealt. I went through a lot of initial considerations about how to do this, but finally settled on the use of a screen capture program. In my case, HyperSnap DX, but there are plenty of others out there. Using this, I could capture parts of the screen, crop the picture to a smaller, black-and white picture containing less bytes, which I could then process for recognition. In the beginning, I copied the image into Excel, where I had saved a similar copy of each card and used a macro to look up which card it was. Pretty quickly though, I switched to saving the picture as a bitmap and then doing a file comparison to look up what card it was. This worked fine for a while, but after hours of play, the harddisk would get hot and go slow, so the game speed could not be kept up. In the end, I figured out how to do byte-by-byte comparisons directly in the computer memory, and this brought the card recognition time down to milliseconds. With the time it took to capture and crop the card, the total time for recognition came down to about 0.3 second per card. And this is just using a PII 450 MHz PC.
To tie it all up, and to mimick mouse and keyboard actions, I found and used a batch programming tool called Winbatch. This is where I wrote all the logic of how to play the game, how to decide the actions to be made and where to move the mouse cursor to capture the cards and to click on buttons.
The neat thing about this solution was that everything happened on my desktop. In no way did I peek or tamper or anything like that with the BJ programs that I played or with the communication between my PC and the game servers. From the casino�s end, it was impossible to distinguish my robot player from myself, at least in the short run.
Before ever reaching this point, however, a LOT of time had gone into writing the program and overcoming the technical obstacles that turned up along the way. Just the basics of figuring out the exact game play routine of the BJ engine being played, where on the screen to capture the cards being dealt, how to deal with the timing of the internet connection, writing all the decision rules etc., took a long time. And on top of that came technical problems that brought me into far corners of computer science that I had never frequented.
One example was when my PC would seem to run out of memory after about 180 hands. No information was built up along the way except for a few variables to track statistics across rounds and shoes, and different memory monitoring tools could not detect any leak. And yet, the PC always faultered after about 180 hands with an out-of-memory error message. I looked for help on programmer�s bulletin boards, read about memory leaks in Java programs, tried to switch Java engines, and reached a point where I almost gave up. Somehow I had a hunch that it might be some hidden Windows bug, and I decided to try a switch from Windows 98 to Windows XP. And this worked. So I got going again, without ever knowing what the problem had been, exactly. And that was just one out of many obstacles that I had to overcome.
In the end, however, I had a program that could play around the clock, although I never let it do that for resons of concealment. I made a version of the program for every casino I played, since they all had different graphical layouts. Fortunately, the cards always looked the same and the card positions would not change relative to each other, so it took me only about an hour�s work to tailor the program to a new UG casino.
3. The choice of game
Why did I choose to play against the Unified Gaming engine when they got so bad reviews almost all across the board? Well, at the time I started, they did offer the only game with a player advantage off the top and several UG sites got good reviews by the Wizard of Odds. Also, they were $1 minimum games, and I really didn�t want to risk higher stakes once I started playing for real money.
As it turned out, I never had any serious problems with UG casinos. The payouts were often slow, and it could take some effort to get the money, as payments would not always go through automatically. But the money always arrived eventually.
Today, there are very few Unified Gaming sites left, I count 7 sites in 5 independent groups (Hampton, 5 Dimes, Offshore Action/St. Kitts, Aloha, Winward/Tangiers). All others have changed to other software. I guess the UG game is no longer in vogue, but when I started on this venture, the great lure was the 0.16% player advantage of the UG single deck game.
Later, all the UG sites changed the rules and wiped out the advantage. This forced me to turn to a shoe game with some decent penetration, and it turned out that UG offered better penetration in their 6-deck game than most sites. 50-80% it was said. It turned out it was 20-80%, but still, that should be possible to exploit, especially when you don�t care about the effort needed in playing lots of minimum bet hands between the advantageous situations.
The rules of the advantageous one-deck game were: Dealer stands on soft 17, double any two cards, double after split, resplit twice, late surrender vs. Dealer 10, receive only one card to split aces. The deck was shuffled after each round. A few casinos only allowed splitting 9-11. I played a few of these, without having realized this up front, but once I discovered that they practiced this rule, I just played enough to cash in the bonus. The rule of splitting only 9-11 was later adopted by all UG casinos in their single deck game, in effect wiping out the player advantage. Funnily, they also limited the bet spread in the single deck game to $1-5 and $10-50. Thus, it became impossible to bet, say, $6.
The rules of the 6-deck game were the same, except that it remained possible to double any two cards in the 6-deck game, even when they changed it in the single deck game.
The 6-deck game had a random shuffle point between 250 and 65 cards remaining. Unfortunately, the story had it that it would go at least 50% into the shoe before a shuffle would occur. This bit of misinformation cost me quite a bit on my first 4,000 rounds, as I would not start checking for the shuffle until 50% into the deck, thus missing quite a few shuffles and in effect miscounting.
4. The systems used
In the single deck game, there was no need for a counting system for betting purposes. For playing decisions, I could have used a counting system with a high playing efficiency, but since the Wizard of Odds offered a complete set of decision rules based on exact combinations of card-removal, I used this. I thus played perfect blackjack against the single deck game. According to the Wizard, this made my advantage 0.1618%.
In the six-deck game I used Wong�s halves for betting purposes and a ten-count for insurance decisions. I started betting $1 on all true counts below 1.0 and $6 on all counts above 1.0. My initial bankroll was $1,250. Later, when my bankroll had grown, I switched to playing $10 on all true counts above 1.0. After a long stretch of heavy losses, I cut back to playing $1-6 for a while before quitting.
For playing strategy I started out using Wong�s halves adjusted for aces. This is a system with a 67% playing efficiency, but I figured that I might as well play the best blackjack possible, since the computer could deal with any level of counting system difficulty. So I started looking around for high playing efficiency systems with multiple side counts. However, I never got around to implementing any of these. Instead, when I got a hold of Griffin�s Theory of Blackjack, I began using his linear decision model. This way, I truly benefited from the computer�s ability to remember each and every card dealt and to make exact computations to reach the perfect decision. The only deviation I made was for splitting decisions, where I stuck with Wong's halves for splitting 2-6 and 9 vs. 7, since Griffin�s tables were tailored for the no-double after split rule.
I don�t know the exact playing efficiency achieved, but I would say it was above 95%. In the end, it would make little difference, though, since the 6-deck game features very few situations where the finer strategy deviations come into play.
5. Statistics and expected results
I did not track a lot of statistics, but here are the frequency of occurrence of some ranges of halves true counts, based on 217,565 rounds in the 6-deck game:
Halves true count___________Frequency
Below �1.0________________24.03%
From �1.0 to 1.0 (<1.0)______53.13%
From 1.0 to 2.0____________11.64%
From 2.0 to 4.0_____________8.35%
Above 4.0 (>=4.0)___________2.84%
Strangely, counts below �1.0 were more frequent than counts above +1.0 (24.03% vs. 22.83%). I�m not sure if this is a statistically significant difference, or whether there is some logical explanation behind it. Or whether it might be a sign of a rigged game.
Here�s how I computed the expected win rate:
Off the top, the E(V) should be �0.35% in the shoe game. Then I needed to figure out the expected E(V) for the different true count ranges. I do not know how to take into account the perfect playing strategy and insurance decisions, but I ended up figuring on a 0.55% increase in E(V) per true count above 0, and 0.45% decrease in E(V) per true count below 0. Guessing a little about the distribution within the ranges above, I computed the expected return using a 1-6 spread betting $6 on any count above 1.0 thus:
True count range______Avg. Count____Advantage____Frequency____bet_____E(V)
Below �4.0___________-5.0_________-2.60%______3.0%________1_____-0.000780
From �4.0 to -3.0______-3.4_________-1.88%______2.8%________1_____-0.000526
From �3.0 to �2.0______-2.4_________-1.43%______5.9%________1_____-0.000844
From �2.0 to -1.0______-1.4_________-0.98%_____12.3%________1_____-0.001205
From �1.0 to 1.0 (<1.0)__0.0_________-0.35%_____53.1%________1_____-0.001859
From 1.0 to 2.0_________1.4__________0.42%_____11.6%________6_____0.002923
From 2.0 to 3.0_________2.4__________0.97%______5.7%________6_____0.003317
From 3.0 to 4.0_________3.4__________1.52%______2.7%________6_____0.002462
Above 4.0_____________5.0__________2.40%______2.9%________6_____0.004176
Total E(V) per hand = $0.0077
Playing 175 hands per hour, the expected hourly return should be $1.35. Betting $10 on all favorable counts, the E(V) per hand should be $0.0163, or $2.85 per hour. Not much, but I figured that it would amount to $57 every day playing 20 hours a day. In a 30-day month, that would amount to $1,700. And once I got my bankroll up, I could be making $9.6 per hour playing $10-50. Still, all the while I could be off to work, sleeping, or out enjoying the sun.
In the single deck game, the expected return was 0.1618%.
6. The results
142,760 hands played in the single-deck game yielded a net loss of 76 bets. I started betting 2 dollars, won quite a bit, and in a few weeks I was $1,000 up and playing $6 per hand. Then I started losing, and waited too long before reducing the bet size again. Soon after, I had lost money while still having won in terms of bets. Oh yes, I learned my lesson about overbetting this way. In the end, the 76 bet loss converted into a $756 loss.
The standard deviation for this number of hands is about 430 units. The result is 0.71 standard deviations below the expected win of 231 bets, so I wouldn�t say it is conclusive evidence of a rigged game or anything like that. In fact, when playing that many hands with an advantage of merely 0.16%, the result will be worse than I experienced about 25% of the time.
I played 217,565 hands in the six deck game. This is disregarding the first 4,309 hands where I was miscounting since I was missing the shuffle sometimes. Incidentally, I lost $410 in this period, so I was actually down to about $300 at this point, having won a few hundred on bonuses.
145,243 hands were played betting $1-6. These yielded a net win of $1,312. The expected result was $1,118, so this was actually a quite �normal� result.
72,322 hands were played betting $1-10. These yielded a net loss of $1,295. The expected result was a win of $1,179. Now, what are the chances of that poor a result over that many hands? Using MathProf�s formulas for computing standard deviation, I get:
Square of average bet per round: 0.2284*10^2 + 0.7716*1 = 23.6116
Variance per round using Wong�s variance for Atlantic City rules: 1.30*23.61 = 30.695
Variance of 72,322 rounds = 72,322*30.695 = 2,219,929
Standard deviation of 72,322 rounds = Sqrt(2,219,929) = $1490.
Since the result was $2,474 below expected, We�re talking 1.66 standard deviations below expected outcome. In a non-rigged game, chances of such a result or worse are 5%.
For all 217,565 hands played in the 6-deck game, the accumulated result was a net win of $18. The expected result was $2,279.
Square of average bet per round: 0.2284*10^2*72,322/217,565 + 0.2284*6^2*145,243/217,565 + 0.7716*1 = 13.853
Variance per round: 1.30*23.61 = 18.01
Variance of 217,565 rounds = 217,565*18.01 = 3,918,139
Standard deviation of 217,565 rounds = Sqrt(3,918,139) = $1979.
The result was $2,261 below expected, i.e. 1.14 standard deviations below. Chances of such a result or poorer in an honest game are 13%.
The grand total result was a loss of $738. To compute the expected result and standard deviation, I�ve looked at how many rounds I played betting how many dollars in the single deck game:
$2 69,387
$3 38,579
$4 6,840
$5 24,556
$6 3,398
The average bet per round was thus $2.98 and the expected result from the single deck game was $688. The overall expected result was thus $688+$1,179+$1,118 = $2,985, and the actual result was $3,723 below expected.
Square of average bet per round: 142,760/360,325*2.98^2 + 217,565/360,325*13.853 = 11.88
Variance per round: 1.30*11.88 = 15.44
Variance of 360,325 rounds = 360,325*15.44 = 5,563,214
Standard deviation of 360,325 rounds = Sqrt(5,563,214) = $2,359.
This means that the overall result of my 360,325 rounds of online blackjack was 1.58 standard deviations below expected. This kind of bad luck (or worse) occurs about 6% of the time when playing that many hands. Bad luck or a rigged game? I don�t know. But it just doesn�t seem worthwhile continuing.

