Wednesday, 7 November 2012

Evolving Blackjack Card Counting Strategies

I have decided that I would have a look into researching the evolution of blackjack card counting strategies.
Following a quick Google search I found a couple of interesting papers on this topic.  The first was “The Evolution of Blackjack Strategies” by Kendall and Smith,2003.  In this work they look to evolve an optimum blackjack strategy without using card counting.  Kendall and Smith state the house advantage over the player based on a series of known strategies, these have been reproduced here:
Thorpe’s Basic Strategy – 0.5%
Mimic the dealer – 5.7%
Never bust – 6.0% (est)
Typical casino player – 2.0% to 15%

I found it extremely interesting that a strategy has already been developed that doesn’t involve card counting that gives the house such a small edge, i.e. that developed by Thorpe.
The second paper was “Who’s Counting?  Real-Time Blackjack Monitoring for Card Counting Detection” by Zutis and Hoey, 2009.  This paper doesn’t aim to evolve a card counting strategy, rather it attempts to highlight players that may be using card counting to swing the edge in their favour.  Zutis and Hoey state that “70-90% of the edge developed by a player is applied by changing the size of the bet as the count fluctuates, whereas the remaining 10-30% of the advantage goes towards the ability to alter game decisions which, therefore, lead to a higher proficiency.”
My aim is to develop a series of card counting strategies and compare them in terms of profitability and simplicity.  For example, if a system is very simple, but you break even, then it is not really worth doing.  However, if the system allows you a massive advantage, but it is not humanly possible to carry it out, again, it is no use.
Since the majority of the edge developed by the player through card counting is via fluctuating bet size and that Thorpe’s Basic Strategy provided the house with the smallest advantage I decided to implement a basic game of blackjack and implement Thorpe’s strategy using card counting to influence bet amounts.  The basic game consisted of the normal game, minus the option of split and double down and all aces are counted as 11.  Each game cost $10 to play and the player started with $1000.  The fitness of each player was based on the number of hands played until the player went bust.  After 500 generations I found that my average number of hands played was very similar to that if I had just used Thorpe’s Basic Strategy without card counting (around 1,600 hands), whereas on occasion the maximum number experienced in a generation topped 10,000 hands.  I decided that my fitness function needs more work and that I should probably look to rate fitness based on average and variance of the return.  In this way I can reward good play instead of potentially rewarding lucky players that won through high risks.
That’s all for now.
Paul

Monday, 27 August 2012

The Texan's performance so far

After a few weeks the Texan has been doing quite well.  Having played 123 games the Texan has won 74 games.  I'm fairly happy about that.  More won than lost. 

There are a few things that I have learned as part of making this poker player.  The main one is that you need to think about the inputs to an artificial neural network.  You may provide information that is required for the game, but you need to consider how easily it would be possible to evolve a network to interpret the inputs in the correct way.  Could you pass in the information in a different form which would make evolution easier?

I am also thinking about potential new projects.  I could expand on poker and make the Texan even better, or could move on to other areas, like Blackjack, Roulette or other casino games.  Or obviously I could go back to Desert Rat.  I have neglected it a bit due to having to work on the Texan and maybe I should look at that again.  I am not sure at the moment, I might give it a few days and have a good think.

Friday, 10 August 2012

The Texan after 2 weeks

Ok, so Beat The Texan has been a Facebook app for two weeks now (http://apps.facebook.com/beatthetexan/ if you want the link).  So far I have to admit I haven't had the number of plays that I had expected, however, something is better than nothing.

I have included 4 different Texans in the game that are selected to play at random every a new game is started.  Overall The Texans have played 45 games and won 25.  Three of the Texans have a win rate of approximately 50-50 with the final Texan at around 70-30 to the Texan.

I am pretty happy with these results and it goes some way to showing that it is possible to evolve competitive poker players.  Admittedly, they aren't great players, but they are competitive.

Sunday, 29 July 2012

Beat The Texan is now on Facebook

The Texan has been in training and is finally ready to take on Facebook.  Think you can beat him?  Find out here: http://www.facebook.com/BeatTheTexanCommunity

Monday, 16 July 2012

Beat The Texan - Game website now up

The website dedicated purely to the game Beat The Texan is now up and running.  It can be found at www.paulspokerproject.co.uk/BeatTheTexan.  The same two AI poker players are on there and are pretty successful having won 22 of the 40 games played so far.

Friday, 6 July 2012

Beat The Texan - Mailing list available

There is now a mailing list so that you can get notification about what is happening with Beat The Texan and any info on new versions sent straight to your email.
You can sign up by filling out the form on: www.paulspokerproject.co.uk

Sunday, 24 June 2012

Beat The Texan's improved UI

The user interface for Beat The Texan has been improved so that everything is now driven by button clicks rather than a combination of button clicks and text boxes.  I feel it is more slick now and it "feels" nicer to play.

I have also made some improvements to the interface so it is now clearer how much money has been bet.

That link again is:
www.paulspokerproject.co.uk/testgame/test.html

New screenshot:
So far The Texan has won half of the games he has played.  So that AI seems to be developing nicely.

Tests are being carried out all the time to generate better poker AI for The Texan.  As soon as the improvements are available, I will post here to let you know about it.

Thursday, 7 June 2012

Beat The Texan - Beta 1 version available

I am pleased to announce that the first beta version of Beat The Texan is finally available.

It can be found at: www.paulspokerproject.co.uk/testgame/test.html.  In this beta version The Texan plays one of two evolved poker strategies.  In subsequent versions I hope to add even more different evolved strategies.

If you have any questions about this version, please contact me at: paul@paulspokerproject.co.uk.

In the next month or so I plan to develop the Beat The Texan official site which should be available prior to Beat The Texan's Facebook release.

Saturday, 26 May 2012

Beat The Texan - Minor UI changes and progress info

Hi

I realized it has been a while since I last posted so I thought I would put up some info about how I have been getting on.

Here is the latest screen shot from Beat The Texan:


The text is now white making it more visible and the your best hand is displayed under your cards.  I have a fairly poor single pair and went on to lose to The Texan's flush (it turned out he wasn't bluffing).

The Texan has been progressing well and hopefully will be available to play online by early to mid-July.  An enhanced version will be made for Android at some point after that.

The project website www.paulspokerproject.co.uk has been updated and now has details of some of the books/papers I have read that have influenced the development of The Texan.

If you have any questions about The Texan feel free to contact me at paul@paulspokerproject.co.uk.