I have to read more about cactus kev method, so far I think is like multiplied all cards and looking the result in a table; Which sound neat, but I will have first to construct the table for 7 cards... I don't see much difference between that and making a table with Card1, Card2, Card3, Card4 ... Card7 - Hand. I know all about is faster to look for a integer than 7 separated pair of alfanumeric, I am ORACLE DBA and I see the difference in performance, but not in the method per se, am I wrong?
Also that doesn't help in the iteration part, because I will have to alter everything in order to implement cactus... I notice my way, even when far for perfect, is losing much of the time in the iteration itself, and not in the evaluation, I didn't see that when processing millions of hands, but when processing billions and trillions of hands... Only to register less than 1% ! Not worth it. I have to make a function that gives me a random hand in a range, and process only those thousands I want, not a complete iteration, only a loop of 10000 or so. In others words, true monte carlo.
I know you are right about cactus method being the best, but it requires I start almost from scratch. I think I am going to try this modification in the iteration process and see how it goes.
Mean while I have identified and implemented some points which made the bot even faster:
1) Implement LIFO (Last In First Out) in cards, so It finds the cards much faster.
2) Looking for the color and then look for the card. That way It would be max 17 searches, instead of max 52 searches.
3) Putting some other information in cashe.
4) Ordering the "number searching" so It finds quickly the amounts in the screen. Why search "0" first? when It would never start at 0. I ordered in a logic way: 321546789 first, and 0987... after (Most tourneys start with 3000 2000 1500 5000 10000 chips, and then appear the 9, 8, etc).
5) Moving some more file information into memory.
This helped a lot, specially first one. Everything related with imagesearch is time expensive. As you may see, I still am improving workflow events.
Right now my bot handles 5 to 7 tables just fine, I get to test it with 10 tables. Although It has trouble when multiple postflop activity in half of the tables, deemed pokerstove!
Something important I did, I don't know if I already told you this, Besides random delays when fewer tables are opened, in order to humanize the bot I included random pixel clicking in the Fold/Check/Bet/Max/Call button, and switching between clicking and sending the corresponding short cut. I know this is basic botting stuff, but I didn't have it in my program, and I think other people may fall into same mistake.
I love to improving my bot, and the final result is near fantastic
But I have a day job, a wife and a daughter, and balancing all this is exhausting. You see, my bot is not profiting enough for me to quit my job, hehehehehe One week it wins 2k, and the next two lose hundreds, and the next two it breaks even... In the long run It is still not producing enough to make me decide something so radical like quitting the job. But It generates way over much people win in my country with a 8 hour job ;P
My friends and I had a group which served to soft the bot fluctuations, and to program new functions but we thought different about the future and decided to split. Some thought the cash table bot is the way to go, others like me thought tourneys are already being lucrative, so we can multiplex even more this one. Also there was a question about stakes...
Thanks for your help,
PS: I am including information about time per function in the debug file; and I am using, beside A_TickCount, diff between dates with A_Now, but when:
v_Diff_Date := A_Now - v_Initial_Date
It treats them like numbers. I am trying with envsub without sucess. Have you done something like this?