Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Learn how I made a working PokerBot for Pokerstars


  • Please log in to reply
38 replies to this topic
skyd1v3r
  • Members
  • 73 posts
  • Last active: Apr 18 2010 11:42 AM
  • Joined: 18 Jun 2009
Got full access to the Pokertracker-database.
VPIP:= player_query(4,"VP$IP")
If VPIP > 30
       MsgBox, Player on seat 4 is loose.
It works without SQL-requests or DLL-calls, is realtime and blinding fast. I run about 3000 queries per second. Update: 10,000 queries in 250msJust in case anyone is willing to share ideas. Imagine a bot with the knowledge of sever thousand datamined hands of an opponent! (Did I mention that I succesfully datamine pokerstars?)
"If I attemp to steal the big blind, this specific opponent is going to fold in 79.3% of the cases."

Come on guys, once my bot is complete my offer to share code is void.

skyd1v3r
  • Members
  • 73 posts
  • Last active: Apr 18 2010 11:42 AM
  • Joined: 18 Jun 2009
Bot up and running, no more need to share any code.
Thanks for your thoughts anyway.

Follower
  • Guests
  • Last active:
  • Joined: --
Hi Matt,

How do we get in touch?

You don't left your MSN or email...

My bot is young and my AI is pretty different from yours, mine doesn't use any points scale, It tries to imitate human processing, using groups of hole cards (Sklansky for instance) and other factors... I am adding a random factor to be more unpredictable 20% of the times...

The SQL part to access PT3 database was pretty easy... But getting the input data was really hard. Why do you use pattern recognition for your position and the button? You could go to the history file to get that data... I understand your way is more accurate because of players getting out and in... But, isn't it more slow? How could you manage resizing? and multitable (well this I can imagine)? and diferent skins? With History files You don't need to worry about those last factors... And It really is easy and faster to program...

Pot odds is the only function that needs to access the pokerstars GUI, but I guess if I use the chat window I don't need to recognize the numbers... I did this part reading the pixels, but I don't like what I did, I really think there is a better way...

In the future I want to put multiple instances of my bots talking with each other, that way I could calculate more accurate the outs... I would know two more hole cards of the deck, which gives me a huge advantage.

I did something additional: I have a table statistics, that way I could know when to leave a table and enter another one... I also have a list of whales to look for when choosing a table. I really think that tables have to be carefully chosen...

I want to make a tournament version that considers more factors like Harrington M, etc.

Why did you use only VPIP? Don't you care about PR or AF factor in the AI module? You know all this info is available for query in PT3 database...

Another question: Did you try to use a calculatem pro interface to get a "easy already made" AI? Did it work? I couldn't do it because of the delay between windows and the multitable factor. Is there any command line input/output calculatem pro?

Datamine was really easy too. I have about 10000 observed hands per day per level. But I needed to close and re-enter PT3 every 30 hands... Have you found a better way? Eyy, may be we could share databases.

My main database is so slow (Billions of hands)... It is too much, I have to cut it every month into a new one with a postgrep script keeping just the last 5000 hands per player...

I also have ways to find out who are bots and who aren't... It is really usefull, for instance, when I have a bot in a flop/turn heads-up I could go all-in knowing the pot odds is going to make the villain bot to fold! May be I have also marked your bot, who knows... lol

I think I left a lot of info in this post, and honestly I am feeling like releasing a lot more, may be a baby bot for beginners... I was surprised when I saw in my PT3 reports that my income have been focusing more and more in (coming from) other poker bots... I guess lately my little bot is becoming a "bot-catching".

This bot has been A LOT of work, and each time I have an idea I feel like "It is enough!", So much work... Don't you agree?

I think you made a great piece of software, and I also want to create something good...

I would love your feedback.

skyd1v3r
  • Members
  • 73 posts
  • Last active: Apr 18 2010 11:42 AM
  • Joined: 18 Jun 2009
Hello,

thanks for your excellent ideas.

How do we get in touch? You don't left your MSN or email...
Indeed, as I like the pm-function here. Yet, MSN is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->

My bot is young and my AI is pretty different from yours, mine doesn't use any points scale, It tries to imitate human processing, using groups of hole cards (Sklansky for instance) and other factors...

Actually those scoring parts were written before I had a stable monte-carlo-simulation. As In/Output finally works like a charm, I recently started to rewrite that part of the AI. The idea is one function per situation, with default situations. Let me explain:

Say we are preflop, and it´s your turn to take action.
IF you are smallblind AND there are no bets so long, STEAL_BIGBLIND() starts. That function evaluates the risk and EV of an attempt to steal BB. Input used are the faced-steal and defended-blind stats of the bigblind out of the SQL, the value of the own pockets out of monte carlo, and some more. As nash-equilibrial stealing frequency is somewhere by 30%, I could use a random part here - yet I take the value of my pockets as "random", therefore stealing with better cards and folding with lesser.
ELSE, if you are smallblind and there are prev. bets, DEF_SMALLBLIND() starts, evaluating the worth of defending the smallblind, AND all the stuff above,
If none of my special functions are called (say you are in an early position with no chance to steal anything), then it´s a simple list lookup for the value of the pockets.

I am adding a random factor to be more unpredictable 20% of the times...

I have found a lot of people trying to get the monte-carlo-simulaion precis to the third decimal, just to add some random value. :) I stop my monte carlo so it has no more than+/- 2% accuracy. That´s random enough. :) People don´t know what funtion fires in what situation...ntherefore action seams random.
Yet this will be reevaluated on a frequent base.

The SQL part to access PT3 database was pretty easy...
I use for every player their actual values plus the AVERAGE of the whole db multiplied by 50 hands. Again, let me explain:
My DB shows after sever ten thousands of players a VPIP of 57 (stupid microlimiters :) ) That´s a good point to start from.
PLAYER A has vpip of 20, 2000 hands. (2000*20+50*57) / 2050 = 20,9% VPIP
PLAYER B has vpip of 90, 70 hands. (70*90+50*57)/130=70,4%
Hereby I get useable values considering both the players specifica and the unreliability of stats with small amopunts of data.

But I come to struggle when I try to create those averages not of all and every player, but only with those players with more than 100 hands recorded...

But getting the input data was really hard. Why do you use pattern recognition for your position and the button? You could go to the history file to get that data... I understand your way is more accurate because of players getting out and in... But, isn't it more slow? How could you manage resizing? and multitable (well this I can imagine)? and diferent skins? With History files You don't need to worry about those last factors... And It really is easy and faster to program...

Searching a specific spot for the dealer button only takes some ms. Doing so with 6 spots is about 10 ms. That´s perfectly fine. The dealerbutton is localized at the beginning of a hand way before it´s my turn to act, so there are plenty of seconds to do this stuff. As most of my input is based upon screenscraping, I do not see the need to search throu logs.
Resizing and skins changes are no problem: I simply do neither.
As my bot is not ment to be used by guys not understanding the code, I do not need to try to make it universal. No option dialogs. No helpfile. Just code.

Pot odds is the only function that needs to access the pokerstars GUI, but I guess if I use the chat window I don't need to recognize the numbers... I did this part reading the pixels, but I don't like what I did, I really think there is a better way...

I consider the chat dialog useless. I use the pot-part at the top of the table. And I search whole digits, not single pixel. There are 10 digits - make a screenshot of each of them.


In the future I want to put multiple instances of my bots talking with each other, that way I could calculate more accurate the outs... I would know two more hole cards of the deck, which gives me a huge advantage.


While collusion is conidered cheating even by botmakers, it will sure give you an advantage. On the downside, collusiuon-detection is far stronger than bot-detection. This way you could highlight your winning bot on their screens and hereby cut your income.

I don´t care how much or little my bot is winning. as long as it is above break even, I can run in on more tables or more hours...

Yet, if you want them to communicate, be sure they sit on different IPs and have no datastream connecting each other. Something like ICQ or MSN might be a good way.

I did something additional: I have a table statistics, that way I could know when to leave a table and enter another one... I also have a list of whales to look for when choosing a table. I really think that tables have to be carefully chosen...
That´s the SQL-part again.
Just query all players before taking a seat, and score them based upon vpip, AF and PFR. I play at no table with a score less than 500 points. A single dumbass fish scores 400, by the way. Well, a single fish will render the table almost profitable. :)

I want to make a tournament version that considers more factors like Harrington M, etc.
I belive that limited cash-game is the most maths-based game in holdem, and therefore the one most suiteable for bots. I have no script so far that even comes close to anything like "that guy might have a pair of K, considering the way he acts." Maybe I should invent Intuition(). Right now I work on WalkOnTheWater(). ;)

Why did you use only VPIP? Don't you care about PR or AF factor in the AI module? You know all this info is available for query in PT3 database...
I use about 15 stats so far. Not everything I do is represented in this thread.

Another question: Did you try to use a calculatem pro interface to get a "easy already made" AI? Did it work? I couldn't do it because of the delay between windows and the multitable factor. Is there any command line input/output calculatem pro?
Sorry, no idea. On pokerai.org ant other on-topic threads they stated that only 15% of the bots are winning on the long therm. After reading throu a lot of posts, I realised the simple reason: Only about 15% of guys running a bot understand what they run. The other 85% write a simple input-output-script and use some out-of-the-box AI with little to no ways of changing parts of the logic.

I made the whole thing from the scretch, and so far it proves to be the way to go. hacking into the middle of my code and adding some lines to implement a new stat or new formula for a specific situation is more valuable that all those boxed AIs together.



Datamine was really easy too. I have about 10000 observed hands per day per level. But I needed to close and re-enter PT3 every 30 hands... Have you found a better way? Eyy, may be we could share databases.


I can datamine unlimited tables at once, with no time limit and unattended. I will share the solution for your database of micro-limit at stars. :)

My main database is so slow (Billions of hands)... It is too much, I have to cut it every month into a new one with a postgrep script keeping just the last 5000 hands per player...

Would love that kind of trouble :)

I also have ways to find out who are bots and who aren't... It is really usefull, for instance, when I have a bot in a flop/turn heads-up I could go all-in knowing the pot odds is going to make the villain bot to fold! May be I have also marked your bot, who knows... lol


Don´t belive that hase more accuracy than 30 or 40 %. Sure theye are tells, indeed. yet as long as someone has a far negative BB/100 I don´t really care. And most bot´s have some bluffing, so you could fail... well, the idea is damn nice anyway

This bot has been A LOT of work, and each time I have an idea I feel like "It is enough!", So much work... Don't you agree?

Well, spending 2 hours a day for something that gains an income wort far more than 50 hours a month is always a good deal.
Yet, my bot is only some weeks old, and not yet completed. It works, it wins, and yet my whiteboard is full of tasks to make it stronger...
It is thanks to the simplicity of AHK that I was able to make the whole input-part in a few days. With C++ you need a month for the same part.

vlad
  • Guests
  • Last active:
  • Joined: --
This is a very interesting post.
I am considering writing a bot myself and have just finished reading "How I built a working online poker bot"

I realize 2 things after reading your post:
- reading input from memory using DLL injection is not going to be as simple with the new version of Poker Star, if at all possible. So I'll go for screen scraping
- it will be much easier to create the bot in AHK than in C#/C++ (I was thinking about AutoIt3 too, but I suppose I'll try AHK first). And if needed, call external programs written in C++
- I wonder how you do your datamining. I can see tools out there, I wonder how good they are at avoiding detection. I'll look into that later

For now, I have one question for you:
How do you deal with Poker Star CAPTCHA questions ?
In theory, I suppose it might be possible to detect them and send them to your mobile ?
I suppose I'll just ignore them for starters

Thanks, Vlad

bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013
Hi,
 
You surely don't remember me. I am a fellow AHK programmer who also made a Bot.
 
I was thinking on the only problem I have with my bots (Yes, I have made more than one): They are deadly SLOW !!! Mostly in the Monte-Carlo analysis.
 
When I first wrote you:
 
Follower Posted 28 July 2009 - 12:47 AM
 
I was so amateur, I had so many errors and issues, yet I had (and have) I winning bot in small stakes NL Hold'em; but I didn't told you that It wins so little...
 
As I said, I accomplished my goal of making others bots, a 5-card draw, omaha, and finally a bot for Tourneys; This particularly last one made me pride, and gave me a lot of money, I think It is because it is in tourneys where bots have an edge, hours of discipline are only possible for machines! Besides, It makes possible for me taking control of some final tables per day, after the bot made all the hard work during long hours, I can relax and make deals for hundreds, sometimes thousands of dollars.
 
My bot emails me when entering the final table of a tournament, depending of the tourney, Sit and Go's are entirely played for him, but huge MTT's are so tasty... I'd rather play those final tables myself. I also implemented time based actions, he auto inscribe himself keeping N number of tables always opened, but only between the most lucrative hours. He also emails me a summary report at the end of the session.
 
I forgot about all the bots but the one for tourneys (as you can see), and started to improving it. At first It can handle up to 16 tables at once, then 12, 10, 6, and now It barely handle 4 tables ! That’s because I constantly upgrade him, It is more smart, that's not doubt about it, but so fuc$ing slow.
 
I included Stealing, Floating, Check Raising, Bubbling, Squeezing, and basically everything you could imagine, using PT4, of course. It is really smart.
 
I was center in improving the performance, and I cleared unnecessary information from the debug, I moved all configuration and detected information from files to memory (arrays), and so others workflow improvements. It helped, but the one thing that I couldn’t improve was the Monte Carlo analysis: I use PokerStove, just that simple.
 
At first I kept it opened and interfaced it via SEND command, then I contacted the creators and purchased a command line version of it: It wouldn't help, crap!
 
I know you have a AHK based solution, how much time It takes to analyze a flop? Poker Stove takes about little more than 1 second with all I/O operations included.
 
Could you share that specific component?
 
You said You wanted my PT4 database, I have TB !!! Yes TB of hands. At some point I stopped to collect hands.
 
You talked about my collusion functionality, the pokerstars collusion algorithms only works for Cash and Single table tourneys, not MTT's ! Just ask Stars Support. So, It is working without problem, when I have a bot "friend" at my table they share cards. It is nice, but not that much of an edge as you might think, I rarely have 4 bots at the same table.
 
You asked me how I detected other bots, easy, they are usually the ones with thousands of hands in PT4, also they have a well-defined hand range, a multitabling factor >= 4, a low VP, no chat ability. They could be real persons, but if they played as PT4 shows, for me they are also like bots ! I didn't lie, in PT4 report my bot beated hard those poor bots, my bot read that login list, and after that my bot plays in "against bot" mode ! hehehehehe That list is made from a PT4 report and an after processing I make.
 
Having those TB of hands doesn't help as you might think, PT4 dies when using all the DB's. PT3 not even processed them ! So, as I said, I use just the hands the bot generates, which are a lot! I Don't need more.
 
Instead of sending my DB (I might if you want), I think It will be better to explain how I got them: AHK, I made a program that open Stars and load PT4, after 30 hands close and reopen, so the restriction is "cracked", I did tell you this procedure. I used to leave an old machine doing this procedure all day with an alternative account.
 
If you want I will send you the code. It really is nothing special; The bot is the really treasure, and you know that, you have yours.
 
I just want the AHK component that would replace Poker Stove. It has to accept a range for other players cards, just as Stove does.
 
Other slow functionality is the image detector; Cards, Pot, Stack, Call amount, active players, etc. If you have a way to read that from table attributes I am interested, I do this by imagesearch, just like you. I used recursive calls for the pot, stack, amounts in general; It is faster and really nit.
 
I forgot to say, my bot has a “comment functionality”, in three languages, depending of the country of the login he is using. It was easy, except for the part It looks for the last hand in the Hand History file and sends congratulations to the pot winner ! It also grabs when wins a pot. I have to put a random factor to do it only X% of the time, At first it was really annoying for others players, hehehehehehe. This functionality is so funny, I have different modes, and comments, depending of hour, players of my table, and so on. Sometime I discover long conversations, people keep with my bot !!! hehehehehe The Trick is to choose the right comments, using the info on the HH file.
 
I think you could understand how my bot is so heavy, It has everything idea I and my friends have had.
 
I love AHK, but I now I think C++ would be a better choice, now it is no going back: So much code in there. It has been 4 years programming, since our last contact.
 
Thanks,
Follower
 


nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012

Did you use SetBatchlines,-1?

If it's just the analasys you can use MCode (Compiled C-Code in AHK).


Visit the new forum ahkscript.org.

http://ahkscript.org


bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013

Hi,

 
nnnik, thanks for posting; And no, I am currently not using that setup. I am going to test it and see how much It improves the bot speed. I will tell you how that go.
 
I have to say: I finally make a Postflop Analyzer !!!!
 
BUT. I am facing a dilemma because you know I am using Poker Stove (http://poker-stove.soft32.com/) to analyze postflop situations, and it takes a lot of time: Opening, imputing, calculating, outputting  etc. So I have made this native AHK solution, which determines probabilities for each combination of a villain range, It works, because It shows same output than PokerStove, but It takes 8 min. !!!!! Versus 1 seg Stove takes, 8 segs if I include all steps I have to do to use Stove. Even Monte Carlo cannot reduce those 8 min. to a couple of seconds.
 
How can I improve that performance? I am not using anything external, not HotKeys, anything, not even disk access, only string manipulation in a loop.
 
I am debugging, and I don't know if I should consider using files instead of string variables, It may be those substr and instr which makes that overload...
 
Finally I think It may be another way: I may generate a database with those thousand of combination and access directly the one I need. I may take days of processing (building the table), but It may be worth.
 
What do you think?
 
Nobody want to share a Postflop analyzer code? I am going to post the main function of mine...
 

Thanks for your opinion.


bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013
Here is my main function.
 
I know It currently only works in flop analysis for 2 players, and It hasn't Monte Carlo implemented; But I am not going to do that until this function is under 1 min:
 
Get_Sucess_Postflop(p_hole_card1,p_suit_hole_card1,p_hole_card2,p_suit_hole_card2,p_flop_Card1,p_flop_Suit1,p_flop_Card2,p_flop_Suit2,p_flop_Card3,p_flop_Suit3,p_Players) {
v_Cartas := "Ah"
v_Deck := ""
v_Deck_01 := ""
v_Deck_02 := ""
v_Carta1 := ""
v_Carta2 := ""
v_Best_Hand := ""
v_Hold_01 := ""
v_Hold_01_Card1 := ""
v_Hold_01_Suit1 := ""
v_Hold_01_Card2 := ""
v_Hold_01_Suit2 := ""
v_Hold_02 := ""
v_Belong := 0
v_Erro := 0
v_Tie := 0
v_Win_Hero := 0
v_Win_01 := 0
v_out := 0
v_Cards = %p_hole_card1%%p_suit_hole_card1%%p_hole_card2%%p_suit_hole_card2%%p_flop_Card1%%p_flop_Suit1%%p_flop_Card2%%p_flop_Suit2%%p_flop_Card3%%p_flop_Suit3%
Loop, parse, v_Cartas, %A_Tab%
if (instr(v_Cards,A_LoopField) = 0)
v_Deck = %v_Deck%%A_Tab%%A_LoopField%
 
v_Deck_01 := v_Deck
v_Deck_02 := v_Deck
Loop, parse, v_Deck_01, %A_Tab%
{
v_Carta1 := A_LoopField
StringReplace, v_Deck_02, v_Deck_02, %v_Carta1%%A_Tab%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Carta1%,   
Loop, parse, v_Deck_02, %A_Tab%
{
v_Carta2 := A_LoopField
v_Belong := Get_Hand_Belong_Range(substr(v_Carta1,1,1),substr(v_Carta1,2,1),substr(v_Carta2,1,1),substr(v_Carta2,2,1))
if (v_Belong = 1)
v_Hold_01 = %v_Hold_01%%A_Tab%%v_Carta1%%v_Carta2%
}
}
 
v_Deck_02 := v_Deck
Loop, parse, v_Hold_01, %A_Tab%
{
if A_LoopField
{
v_Hold_01_Card1 := substr(A_LoopField,1,1)
v_Hold_01_Suit1 := substr(A_LoopField,2,1)
v_Hold_01_Card2 := substr(A_LoopField,3,1)
v_Hold_01_Suit2 := substr(A_LoopField,4,1)
StringReplace, v_Deck_01, v_Deck_01, %v_Hold_01_Card1%%v_Hold_01_Suit1%%A_Tab%,   
StringReplace, v_Deck_01, v_Deck_01, %v_Hold_01_Card1%%v_Hold_01_Suit1%,   
StringReplace, v_Deck_01, v_Deck_01, %v_Hold_01_Card2%%v_Hold_01_Suit2%%A_Tab%,   
StringReplace, v_Deck_01, v_Deck_01, %v_Hold_01_Card2%%v_Hold_01_Suit2%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Hold_01_Card1%%v_Hold_01_Suit1%%A_Tab%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Hold_01_Card1%%v_Hold_01_Suit1%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Hold_01_Card2%%v_Hold_01_Suit2%%A_Tab%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Hold_01_Card2%%v_Hold_01_Suit2%,   
Loop, parse, v_Deck_01, %A_Tab%
{
if A_LoopField
{
v_Carta1 := A_LoopField
StringReplace, v_Deck_02, v_Deck_02, %v_Carta1%%A_Tab%,   
StringReplace, v_Deck_02, v_Deck_02, %v_Carta1%,   
Loop, parse, v_Deck_02, %A_Tab%
{
if A_LoopField
{
v_Carta2 := A_LoopField
v_Best_Hand := Get_Best_Hand(p_hole_card1,p_suit_hole_card1,p_hole_card2,p_suit_hole_card2,v_Hold_01_Card1,v_Hold_01_Suit1,v_Hold_01_Card2,v_Hold_01_Suit2,"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",p_flop_Card1,p_flop_Suit1,p_flop_Card2,p_flop_Suit2,p_flop_Card3,p_flop_Suit3,substr(v_Carta1,1,1),substr(v_Carta1,2,1),substr(v_Carta2,1,1),substr(v_Carta2,2,1))
if (v_Best_Hand = "(1)")
v_Win_Hero := v_Win_Hero + 1
else if (v_Best_Hand = "(2)")
v_Win_01 := v_Win_01 + 1
else if (v_Best_Hand = "(1)(2)")
v_Tie := v_Tie + 1
}
}
}
}
v_Deck_01 := v_Deck
v_Deck_02 := v_Deck
}
}
 
v_out := round(((v_Win_Hero+(v_Tie/2))/(v_Win_Hero+v_Win_01+v_Tie))*100,1)
 
return v_out
}


bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013

Hi nnnik,

 

That setting helped, It lower between 0.5 seg. to 1 seg. each hand processed. That was nice! Thanks. The problem is still there: Right know My bot is taking 5 seg. a preflop hand, and 11 seg a post flop hand. It is still high.

 

About my postflop analyzer: Your setting helped as well. Now It takes 5 min. It saved 3 hole min. Thanks again. Still, 5 min. is a long time for only one hand preflop with one villain...

 

Is there a table with following fields:

Hole Hero

3 Card flop

Hole Villain 1

...

Hole Villain 9

Hero % Sucess

???

 

If so, I could loaded into a database, group by those hands into a smaller table, and modified my analyzer to just query a line in that table !!!! Would be less than a second a postflop "analysis" !!!

 

What do you think?

 

Thanks



bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013

Hi,

 

Right now I have this settings in my AHK Bot:

 

SetBatchlines,-1
SetMouseDelay, -1
SetKeyDelay, -1
SetTitleMatchMode 3
SendMode Input
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
DetectHiddenText, On
Process, priority, , Realtime
#WinActivateForce
#Persistent
#SingleInstance
#NoEnv
 

Some of them were not present before and they helped the performance. Now a preflop hand is treated in a bit more of 4 seg.  My post flop hand is a bit more of 10 seg. ! I think now my biggest concern is that specific focus point: Postflop treatment, I have to integrate a native analyzer, I have to get my analyzer working properly, even with a giant table in the data base...

 

Any thoughts?

 

Thanks.



nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012

What evaluater do you use?

http://www.codingthe...luator-roundup/


Visit the new forum ahkscript.org.

http://ahkscript.org


bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013

That's the point nnnik, I made one !

 

Mine may not be the best out there, but it is pretty neat, I tune that evaluator the best I could, cutting double evaluations (AsJs=JsAs), stopping when I already know player A has the best hand, etc.

 

My evaluator has same output than PokerStove, till 3º decimal, but Stove does in 1 sec, and mine in 4 min !!!

 

Don't worry, I applied Monte Carlo anyway, with unexpected good results:

 

v_hit := 0
random, v_hit, 0, 1000
if ((v_hit >= 510) and (v_hit <= (515 + v_adjust)))
{
 

Just that easy! I apply this for every combination villain may have, so It equally distributes the samples...

 

At first I used 10%, then 5%, finally 1,5% is just fine. Now It takes 3 seconds and vary in 0,5% from Stove, for example: Stove 66% Mine 65,5%. Excellent.

 

That v_adjust variable is another idea I implemented: It depends of number of tables, so if I have only one table It can go as far as 2,5%, but when 10 or more tables It samples only 1,1% !!! And still pretty accurate.

 

Now I am finishing with the turn card and the N players. When I have the turn card, the sample may go as far as 35%.

 

Thanks for everything. That setting improved a lot the performance of the bot in general, although caused some bugs I am solving... It doesn't matter, I rather solve those bugs and have a faster bot.

 

Thanks you.

 

PS: If somebody want to know how I did some of the parts of my bot, just ask. I may share general ideas; After all, my bot have won a lot from other bots out there hehehehe ;P



nnnik
  • Members
  • 1625 posts
  • Last active: Jan 24 2019 02:19 PM
  • Joined: 28 Jul 2012

I'll port your function to MCode.

It might take some time though.

 

Also I thought about making an evaluator similar to the Kaktus Kev evaluator but for 7 Card Poker Games.

But the Information is way higher than in an 5 Card game.

I couldn't make an easy thing. Mine would result in an look up table of 224 GB in total.


Visit the new forum ahkscript.org.

http://ahkscript.org


bot
  • Members
  • 12 posts
  • Last active: Oct 21 2013 09:52 AM
  • Joined: 10 Sep 2013

Hi nnnik,

 

The function I post is just the main one, there are a lot of sub functions I didn't post, which would identified and compare hands at the river.

 

On the other hand, My function is a "Enumerate All" evaluator, which is fine with 2 or 3 players, or only the river missing; But now I realized 4 or more players in a hand make my function not usable.

 

The problem is I am using an "Enumerate All" with a false Monte Carlo, because the random makes the sample I need (And equally distributed, which is fine), but It has to iterate all options. It works fine with 3 and 4 players, but more than that It loses a lot of time iterating without any evaluation...

 

I am so disappointed. I thought I had it.

 

Now I think I only have 2 solutions:

1) Locate or create a combination table with all millions of entries. Make a cashe table and query it. Not so much an "evaluator"...

2) Implement real Monte Carlo, with a function that gives a random combination of cards that fulfill the requirements, and limit those evaluations to X (like 10000).

 

I may have a problem if the function of point 2) takes time proportionally with number of players, in generating the random cards; In fact, same problem I have now.

 

I am so disappointed. Right now I think I only achieved one thing:

If players <= 4

use MyEvaluator

else

use Poker Stove

 

I really wanted to quit pokerstove from my bot for good.

 

Any thoughts?