Posts Tagged poker bot

Poker Tools

As a bot builder the different kinds of Poker Tools has always fascinated me. There are perhaps 10 different poker tools on the market today and 5 of them actual poker statistics software. Poker statistics is one of the most complex parts of poker but you can make a lot out of your and others hand histories if you apply a scientific method to it. Lets take a look at one of the most basic, but very useful, areas to apply some statistics skills. When you play with someone a lot you will instinctivly know if he is a loose or a tight player. You will know that this guy will call you a lot and you will know if he folds if you bet hard on the flop and he didn’t hit. Playing online though this can get tricky because you play so many different players.

By keeping track of your hands and building a database you will actually get a library of your played hands and if you can only filter and sort it in the right way and fast then you have a massive advantage on your opponent. For example, by just calculating how big percent of the hands your opponent calls preflop will tell you wether he is a loose or tight player, it’s not harder than that as statisticly he should call a certain amount of hands over time. Him being loose does not of course that he is a bad player, there are lots of very good players that do play loose. It is still a piece of information you have that he doesn’t (as long as he isn’t using the tool himself). It doesn’t stop there either, if you measure how big percent of his hands he folds after the flop you can see if he is weak or tough post flop. If you know your opponent is weak post flop, placing a bigger bet to get him to fold might be a good idea or if you hit a quad maybe you need to slowplay him.

There are of course a lot of more useful info on your opponents that you can get from a high quality poker tool but it doesn’t even stop there. By looking at your own game in retrospect you can learn things about yourself, maybe you are a tight and passive player and to be honest even though being careful is good that is a combination that will never win you any real money.

There is even more to it than that, what if a tool could tell you which table you should play. You want to find a table with lots of fish and no sharks. Well, todays tools keep track of this too.

If you aren’t using a tool today, you definately should, that is my advice for today.

Inspiration: Poker Tools

Leave a Comment

For the love of the game

I’m getting a lot of reactions to this blog, obviously people have strong feelings about poker bots. This is of course understandable but the most common point taken in these reactions is that we should not build bots “for the love of the game”. People are claiming that we are destroying poker. I disagree and coulnd’t disagree more. We are building a poker bot for the love of the game. If you claim that poker bots are destroying the game you obvously don’t play that well. A bot, at least of this quality, will never beat a good human player, it will only beat really bad players. If the bot does something it’s to teach the fundamentals of poker, if you can’t outsmart a machine maybe you’re just not cut out for poker. The bot plays only on statistics, it bluffs like a 6 year old and it can never learn to read you, it’s just a machine. Maybe in the future we might build a smarter AI but so far it’s nothing more than a beefed up calculator.

The challenge of building a bot is something you take on because you love the game of poker, it’s not a small task and it demands that you learn to do things by rules instead of by instinct, this is really hard and it has certainly made me a better poker player. Understanding the basics in poker is something most players actually skip to go directly to the fancy stuff and this is why a bot can still win. If you had just bothered to learn pot odds, outs and some basic statistics you would have beaten the bot every time, but you didn’t did you? How can you claim your love for the game to be bigger than ours when you didn’t even bother to learn the basics.

Leave a Comment

Bot for Backgammon

As bots have always been one of my interests I have been taking a few looks at other games where botting should be possible. One game that I took an extra look at is Backgammon. There are a few differences between backgammon and poker that makes a backgammon bot a lot easier to build than a poker bot. If you have followed this blog you will have noticed our struggle with the poker bot and it felt quite relaxing thinking about a backgammon bot.

The main reason backgammon is more suitable for botting is that the game is more or less deterministic. All variables are known except the dice that adds the little randomness there is. The thing with backgammon is that there is a right way of playing it. You can’t be smarter or better, the best you can do is playing the game right and hope that your opponent makes mistakes or that the dice are on your side. There is an optimal move in every given situation. If there hadn’t been dice involved it would have been the same game as tic tac toe, if you play it correctly noone can win.

This makes it perfect for a bot, a bot will never make mistakes. As long as the bot has the correct algorithm or,  as in the scenario I considered have all the situations in the database and knows how to handle them, it will play an optimal game.

After a lot of thinking about this I realized that it is so easy that there has to be one out on the net already. A few minutes of Google Jockeing and I found it. It’s names Snowie and even does cooperation with some gaming companies offering backgammon. Well, it was an interesting day thinking about it at least.

Leave a Comment

Increasing interest for poker bots

As you might be aware I have blogged a lot bout our Poker Bot Project. I decided to do a little searching on the net to see if it would actually be possible to sell our poker bot in the end and it looks like there is actually a lot of interest. After taking a look at Google trends and comparing the interest for poker bots compared to poker in general the bots are (of course smaller though) increasing during the summer compared to poker. A lot of articles about poker bots have been written the last few months and one of my favourites (because it is not very argumentative but sticking to facts) is Poker Bots myth or reality.

If you are interested too I’d like to show you the Poker Bot article series:

  • The Poker Bot
  • Gathering data for the poker bot
  • Post-flop
  • Cheating Party Poker
  • Why we wanted a SNG poker bot
  • Poker Bot Strategy
  • More rooms for the bot

Leave a Comment

More rooms for the bot

The seventh article about our Poker bot.

One of the big things when you want to avoid detection is not playing to long. Even if the bot can play 65 hours with interupts it’s not a good idea. This is a rookie mistake when it comes to botting and the poker rooms Do keep track of this. The problem for most poker bots is that since they don’t make much money they need to grind a lot. Solving this is not rocket science though.

Tactics for solving the “long grind”-problem.

Let the bot connect and disconnect on it’s own. If the bot logs on, sits down at a few tables for 4 hours before it disconnects automaticly it doesn’t look weird. It’s a problem that you can’t keep the account alive more than that becasue it will lessen your profit but it’s a must.

Let several bots play at the same room. The bot can run several accounts simultaneous without problem, the problem here is to have several accounts. You need more than 1 identity for this but it’s fairly easy. It’s important to keep track of what proxies you use for it too. Don’t want to use spammy ones so the best is to set up your own.

The smartest way is to expand in more poker networks. Let the bot play at several networks, with one proxy and 2 identities you can play 14 accounts as once if the bot can handle 7 networks. We had more identities than that and more servers to use but we still wanted to expand it.

Which poker networks do we select?

We decided we wanted to hit Ongame Network and Microgaming because they were already familiar to me. Ongame have among others, Betsson, Pokerroom and Pokerloco. Microgaming have among others Unibet, Doyles Room and Betway, all of the mentioned rooms where I have played or actively play.

The problem here is that Ongame Network banned Rakeback but there are sites there that can offer pretty decent bonuses anyway so we thought it a good choice.

Upgrade of the bot this time:

The bot now connects to 3 poker rooms with 1 or 2 accounts on each, it will play for 2-6 hours (you can set this number or let it be random). It makes 1 or 2 five minute breaks (they are a bit random long but aprox 5 min) each session and then it disconnects to rest til the next day.

Comments (10)

Poker bot strategy

The sixth article about our Poker bot.

When we had decided we wanted to expand the bot to be able to play cash games as well it felt like we had to build a complete poker tracker as well. After a while we decided that this was not necessary, most players don’t use a tracker and if the bot can play just a little better than average it’s enough for now. We realized that this kind of functionality wasn’t only a whole software in it self, it was also already out there, there is nothing that says that the bot can’t use existing poker tracker software just as a real player.

The poker bot strategy – step one

We had already set it up to rank starting hands properly, what we did now was slow it down a bit. It’s not realistic to go about a cash game as aggressively as a short handed SNG. We set it up to play a lot more tight and we built a new position calculation function allowing it for a bit more aggressive play in position. With this setup it would play only the top 11 hands and limp in on all small pairs.

Post flop strategy

We tuned the bot down a bit after the flop too, it had been way to willing to spend money in the first version. A much more modestly playing bot is needed for cash games and our bot was pulling some insane stunts with his stack of chips.

The problem now was that if there was player at the table bulldozing the bot would have a hard time (now that the bot was not the bulldozer). A normal player can always make a stand with a good hand and double up against opponents like that but the bot had a hard time. The first thing we had to do was make the bot realize when he’s being bulldozed. This is not the easiest as it meant we actually had to keep track of the opponents after all, not in a complete poker tracker way but a little. Eric managed to come up with a neat little script that just checked for amount of big blinds lost to the same person. Easy but functional.

Now that our little poker bot knows that he is being bulldozed, how should he handle it. We came up with a few options to start with:

  • He can leave the table
  • If he gets AA he can slowplay the bulldozer and trick a lot of money of him (this could be extended to other high pairs as well but as the bot is not very good at reading people, I mean that he can’t, it was a bit dangerous)
  • Leave it to the limp-trip strategy to deal with the bulldozer, the bot had already an implemented strategy of limping with small pairs for hitting trips. This might be enough to handle the situation.

In the end we chose to use the two last methods as having a loose player like that on the table can give you a lot of money.

The next article:

More Rooms for the Bot

One of the big things when you want to avoid detection is not playing to long. Even if the bot can play 65 hours with interupts it’s not a good idea. This is a rookie mistake when it comes to botting and the poker rooms Do keep track of this.

Continue Reading…

Leave a Comment

Why we wanted a SNG poker bot

The fifth article about Poker bots.

I think it’s time to give you the reasons for wanting to build a poker bot that playes sit and go tournaments. The thing is that we weren’t sure we could make a good enough player out of our bot. We are had a feeling that we didn’t know enough of the theory in poker strategy. Being a good poker player doesn’t automaticly mean that you are good at the theory (this goes both ways of course). When it comes to small tournaments though there is a stupid as strategy that we could easily reproduce in a bot. Go all in almost all the time, it’s not at all as stupid as it sounds, there is a pretty decent chance of winning if it is a shorthanded sng. We thought that we could start with a bot like that and if it was even to poor at that we could always let it play freerolls. Think about it a bot that plays exetremely agressive in all the freerolls on the net… His chances are a bit better than a bad player and he what he does is that he forces the play towards the lottery side. It’s extremely hard to play good against a player like that.

At this point however it changed, we got support of a really talented poker player/programmer that had previously built a well known poker software. A poker odds calculator if you wish. Here we decided to change the bot in to being a Cash game poker pot.

The next article is a bout how we started setting up the strategy of the bots play.

Poker bot strategy

We had already set it up to rank starting hands properly, what we did now was slow it down a bit. It’s not realistic to go about a cash game as aggressively as a short handed SNG.

Continue Reading…

Comments (1)

Cheating the poker room (Bot vs Party Poker)

The fourth article about Poker bots.

Setting up the bot so that it would be invisible to poker rooms (Party Poker in particular) was a task we knew we were well prepared for. Cheating in games is something universal, it works the same everywhere no matter if it’s online poker, counterstrike or World of Warcraft.
As most poker rooms consider bots cheating, you need to outsmart them. Well, it’s not really true, poker rooms don’t care at all about bots but they know their players do. So the poker rooms try to show their players that they care about botting and consider it cheating. They search enough for bots so that their players will believe you can’t bot. They don’t find bots genereally because finding one will make it obvious to the players that you can bot. This works the same in all kinds of online games…

Technical highlights

One of the properties of the bot that’s really important is the response time. By just setting a more or less random responsetime the detection is made a lot harder. It’s true a lot of bot builders don’t think about it.

Another one is play time. Don’t let the bot play for 65 hours in a row. Set it so that it logs off after a few hours, logging back in on another account, from another IP a bit later. Up time is important for the bot, the better up time the more money it makes but you need to make sure they can’t see that it’s playing constantly.

Betting amounts is important, don’t let the bot bet the same amount all the time, both players and the poker room will find this strange. Just add a little randomness to it. Not to much though, don’t want the bot to keep betting .00345 cents and crap like that.

Don’t always play the same amount of tables at the same stakes. If you have several bots running at the same time you need them to be a bit different. Can look pretty moronic when 10 bots play at the same tables.

Let the bot take breaks, people need to eat and so should bots.

And finally the toughest (and most important) property that a bot needs to have. We are still not certain this is necessary for Party Poker but we did it anyway to stay safe. It needs to be mutating. There are lots of files in the bot and some poker rooms have a very intrusive cheat detection. Don’t let it be obvious to someone searching your computer that you are a cheater. It’s not very hard to make filenames change and stuff like that.

Continue Reading…

Comments (2)

The data gathering and the poker player

This is the second article about the Poker Bot

Gathering the poker data

Eric and I started working with the two most interesting parts at this moment. Gathering the data and setting up a poker playing algoritm. After a lot of research on the poker networks we decided to go with Partypoker for primarily two reasons. We thought we could build a functioning data gathering unit for Party without to much trouble and there are lots and lots of players on Partypoker which would make it easier for the bot to stay under the radar.

The problem with gathering the data is that the client doesn’t really hand it out in any comprehensible way (for a computer that is, it is fairly easy for a person to read the output). What we needed to do was getting the information from the screen and into our bot. This is not really hard if you know how to do but it can be a bit slow if you do it badly. In online poker though it is not a problem because the need for speed is very limited compared to a first person shooter for example.

We have previously built a bot for a first person shooter and the first step there was of a similar type. We wanted the gun to automaticly fire at the exact time it was aiming at an enemy. It was a shotgun so it had a very big punch but a long reload time this is why you couldn’t afford to miss. What we did then was check the pixel where the gun was always aiming 50 times a second. Every time it changed color enough the gun would fire. Simple and effective it worked like a clock. In the poker bot though we needed something else, speed wasn’t really the thing but it needed to gather the images and understand them.

Getting the images was relatively easy, we chose to get them from the graphic memory. This is a very common method and I’m not going to discuss it much more then this. What you do is you make your bot read the graphics memory on your graphics card and look for the “screen” before it is published on your screen. Getting a snapshot out of there is rather simple and we decided to do 4 of those every second (you really don’t need that many but we wanted to be completely safe in case something was missed, it can happen sometimes that parts of the screen don’t get drawn).

What we needed out of the pictures was the numbers. We needed to know how much was in the pot, how much everyone bet, what our position was and most important what cards there were. For the digits and cards it was pretty easy. We got screenshots of all possible cards and digits and just let the bot compare them. Well, it was easy in theory but it took us a long while. One thing that made it a lot easier was when we turned on 4 colors for the cards. Can’t imagine we didn’t do it directly. The problem with this approach is that it is easy for the poker room to change their locations and look of the digits but we agreed that it was eqaully simple for us to update the pattern recognition then.

Playing the cards, the first steps

Getting started with the poker player part of the bot was harder, this is after all te unique part of the poker bot. The data gathering was all stuff that we had done in previous ventures. What we decided to do first was setting when to play a starting hand. We decided that it should always play KQ suited and better and then randomly play hands down to QJ off. We set a decreasing possibility for the bot to play the hands the lower they got with only 10% chance that the bot would play QJ off. This might seem like a stupid way of doing it and that we should consider position instead but it is a decent method and it looks more like an ordinary amateur if someone decides to snoop and it’s extremely easy to code and we felt that doing progress until we had a functioning beta was the most important.

When I say that we decided what hands the bot would play I’m a bit generous with the word play because even if the bot decided to play he didn’t know how to make bets yet. One of the ideas we had in the beginning was that it should play sit’n’go-tournaments. This might seem a bit weird but I’ll explain it later. For this reason we wanted the bot to be aggressive. We did it the easy way just as with deciding if it was going to bet. Here is an example, Preflop, with a hand the bot chose to play it will bet like this:

No previous raise:

  • 50% call
  • 20% raise with 3 times big blind
  • 20% raise with 2 times big blind
  • 10% raise with one big blind

With a previous raise:

  • 30% Fold ( we decided to do this choice here rather than in the do i bet algo)
  • 30% call
  • 30% all in (does it seem weird? It will get clear later on when you see the bot more clearly)
  • 10% Raise with as much as the previous player had raised.

Next article in the series: Post Flop – hell for bots

Deciding what to do post flop is dangerous grounds for a bot, this is where most of the better players beat the worse. IF you win the game after the flop only luck can save the worse player on turn and river. The thing with the bot is that we don’t build it to be a good player, we are building a surviving player and that is something totally different.

Continue reading…

Comments (1)

Poker bot, how we built one

A poker bot is a dream for a lot of people. A lot of other people say that it is impossible to build a poker bot and they are really wrong. It is possible to build bots for almost anything, they just get a bit more complex if the enviroment they are active in gets complex. A bot playing chess is fairly simple to build as the enviroment is very simply. The options in chess are not that many even if the game is complex for a human. As it is deterministic as well a bot (deep blue) can also beat the best humans at it, this was achieved long ago. Acting in the real world will demand a much more complex bot even just to handle very simple tasks. The amount of factors that show up once you leave the simulation (in this case the computer version of chess) is like an avalanche. When it comes to building bots, in opposite to humans, it is much harder to build one that manages to move the pieces properly and understands when it is its turn than it is to build one that is great at chess. There are examples of bots out in the real world too though. One is the automatic system for targeting aircrafts that is common on naval ships, the gunner just has to agree to fire for the cannons to aim and shoot down the aircrafts. Modern jetfighters have the same properties but on an even higher level, built in systems compensate for when the pilot maneuvers to fast and autopilot isn’t really anyting new is it? Depending on what you want your bot to achieve it can be impossible (or at least very hard) to build one today but playing poker decently (not good) is definately not harder than being a fighterpilot in combat.

The goal of the poker bot

To be able to build a successful bot we needed to set up a number of characteristics. Defining exactly what is needed is extremely important as it easily gets out of hand when you start doing the programming later. Here are the targets we came up with in the first iteration:

The bot must be hard to detect for the poker rooms
We decided that impossible to detect was to much to ask for and it wasn’t really necessary. It would only take time from the more pressing developement.

The bot must be hard to detect for poker players
This is similar to the above but as we knew since before that players can see stuff the operator can’t and operaters see stuff players don’t we wanted to be clear about it.

The bot must be able to retrive data from at least one poker network
The gathering of data is one of the tough parts of a poker bot as the poker rooms actively try to prevent this kind of datagathering.

The bot must be able to play without loss of money
By playing an even game the bot would still be making money, we figured, as the bonuses and rakeback would do for profit. The whole idea with bots is that they can play endlessly and paralell in a way humans can never. There is nothing stopping you from having 10 or even 100 bots once it works. Small profits can turn in to big profits if you just scale it up.

The team, the strategy and the scrum

Equipped with these for goals we started setting up a team for buildling the poker bot. We were already 2 on the team, me an engineer/poker player and Eric with a PhD in automation (which is exactly what you need for being really, really good at building bots). We managed to gather 2 more programmers putting in a few hours every day and Mike who had already built a (bad) poker bot. As 3 of our programmers could work only nights Eric and I needed to adjust our schedules a bit but it didn’t really change anything else, we were prepared that the progress would be slow, we were in no position to hire full time programmers. We knew from the start that we needed to do most of the programming ourselves.

I’m not sure how much you know about programming in a team, most people that do programming on their spare time don’t. The thing is that when the team grows so does the problems. 1 programmer programming will get the most out of his potential, it might even work with 2 but when it starts increasing beyond that the interference from the other programmers start becoming a problem. My experience is that the maximum amount of programmers you can have in a team is 7. After that you start decreasing the progress by adding another programmer. On bigger projects you have to split them up so that you don’t get more than 7 programmers in a team. You can’t have a software with 200 people working on it, split it up. We were 5 but we still needed a method and the method we chose to work with is Scrum. Let’s not dig any deeper than saying that we used scrum before and it’s a good method. If you want more about scrum please refer to Wikipedia on Scrum.

The next article in this series will follow:

The two first steps, the data gathering and the poker player

Eric and I started working with the two most interesting parts at this moment. Gathering the data and setting up a poker playing algoritm. After a lot of research on the poker networks we decided to go with Partypoker for primarily two reasons. We thought we could build a functioning data gathering unit for Party without to much trouble and there are lots and lots of players on Partypoker which would make it easier for the bot to stay under the radar.

»Continue Reading

—-

Index of the poker bot articles

Other articles on Poker Bots

Comments (1)