Programming a Poker Bot
Hey I was wondering how programming a poker bot for an online poker game would be accomplished.
The poker game I am trying to make a bot for uses a client side program that connects to the poker server. Everything you do is through that client side program including playing the actual poker games.
At first Im not too worried about the details of the strategy the bot would play. I'm looking more for details about how to gather info on what cards I have in my hand and what cards come up on the flop, which players folded etc. general game play.
I really have no clue how to gather info from the program, such as what cards are in my hand and what cards show up on the flop. How do you find out the variable names for each card and gather that information for use with my program? Any help or helpful links would be very much appreciated. Thanks a bunch guys.
Each downloadable poker client will likely handle those things differently… there is no "magic" variable for it, or there would be pokerbots all over the place. You could try sniffing the traffic coming into and leaving the client (over the port it operates on), then piecing together the information going each way. It will be a lot of work, though…
You could try image recognition on the client. If you're always sitting at the bottom of the table, for example, you can tell it to look in the same spot for your two cards. Likewise, the flop would always be in the same place. You could maximize the window to make it more effective.
spyware wrote: I'm not going to help a cheater. Meh… he'll get found out and prosecuted for a violation of terms.
Zephyr_Pure wrote: Each downloadable poker client will likely handle those things differently… there is no "magic" variable for it, or there would be pokerbots all over the place. You could try sniffing the traffic coming into and leaving the client (over the port it operates on), then piecing together the information going each way. It will be a lot of work, though…
You could try image recognition on the client. If you're always sitting at the bottom of the table, for example, you can tell it to look in the same spot for your two cards. Likewise, the flop would always be in the same place. You could maximize the window to make it more effective.
[quote]spyware wrote: I'm not going to help a cheater. Meh… he'll get found out and prosecuted for a violation of terms.[/quote]
Thanks for input, Ill try that out.
I believe the company has to many users to worry about someone using a bot with a shitty strategy to cheat people out of their play chips. Oh and btw I dont believe this company has any room to talk when it comes to cheating… I believe the headline was "*Company Name *Cheating Scandal Blown Wide Open"
Terms are terms and cheating is cheating… If you're cheating with play money, they can imply that you're intending to hone it for use with real money. The company's questionable practice does not negate the legally-binding nature of the terms. Argue it as much as you like, but ignoring those facts would be naive. Also, I'm sure their bot detection techniques extend into play money tables for exactly those reasons. Exercise caution.
Zephyr_Pure wrote: Terms are terms and cheating is cheating… If you're cheating with play money, they can imply that you're intending to hone it for use with real money. The company's questionable practice does not negate the legally-binding nature of the terms. Argue it as much as you like, but ignoring those facts would be naive. Also, I'm sure their bot detection techniques extend into play money tables for exactly those reasons. Exercise caution.
I understand what your saying. Honestly it is more of an educational project. I like to have projects to work on and I believe this would be a fun one to attempt. I know what you mean, it does not matter what the hell they did, if you break the rules you agreed to your subject to prosecution.
I did find a pretty cool bot called WinHoldem. It is a starter bot that needs c/c++ programming to actually program it to do what you want. But its set up to work with multiple on;line casino's. Has a programmable AI which is sweet. I think its free unless you want a license… gonna check it out now.
fallingmidget wrote: well it depends on your morals. some people believe cheating is justified if the recipient did something bad before. The argument wasn't about whether it was "justified" or not… We were talking about the legal aspect of it. Anyways, just warning you to investigate that before experimenting. Glad you found a solid example to work with, OP.
Ok I found, what looks like, a pretty good tutorial on just this. So for any future readers of this thread who are also interested checkout "How I Built a Working Poker Bot" http://www.codingthewheel.com/archives/how-i-built-a-working-poker-bot There are about 7 parts to it, and looks like a very decent tutorial for what it takes to accomplish this written by a guy who has built one himself, includes code snippets etc.
I made a poker bot once, but i never intended it to substitute my play, i made it because i love poker, and i like coding, so i wanted to make 1…
As for getting information like what cards i ha and how many players and pot n such i did a very very lazy and simple thing….
Grabbed little pics of the screen to compare…. i just always had my pokerstars window open in the far top left of the screen, it worked fine :)
I really used it as more of an odds calculator, but it did have the ability to auto call/raise/fold depending on the relevant factors… :)
Ill have a little root around for it, no promises tho, made it a good number of years ago.
This was made in the very 1st programming language i ever found, DBP or darkbasic pro, a language for making games :) Very simple language, but a great introduction into how coding works, and has the power to create amazing multiplayer online games… so cant be that bad ;)
I might try and remake another using a more conventional language. :)