Poker-AI.org
http://poker-ai.org/phpbb/

Determining action sequences with deduction
http://poker-ai.org/phpbb/viewtopic.php?f=26&t=2787
Page 1 of 1

Author:  golfguy37 [ Sun Jul 20, 2014 7:19 pm ]
Post subject:  Determining action sequences with deduction

Hi everybody,

This is my first post here. I have been working on a bot recently and I am able to parse the board for all the hole cards and community cards, the dealer button, and the stack sizes for all the players at the table.

I'd like to be able to take a screenshot of the window every once in a while (possibly on my turn - but then can't observe after I fold) and be able to update the action sequences for the hand using the stack sizes and deduction. Is this how you all did it, or is there and easier way? I realize that I could just take a screenshot every second or so that way the actions are always up to date, but then would it be possible to manage multiple tables at the same time? I'm afraid I might miss a step.

Author:  bpdummy666 [ Mon Jul 21, 2014 9:06 am ]
Post subject:  Re: Determining action sequences with deduction

golfguy37 wrote:
Hi everybody,

This is my first post here. I have been working on a bot recently and I am able to parse the board for all the hole cards and community cards, the dealer button, and the stack sizes for all the players at the table.

I'd like to be able to take a screenshot of the window every once in a while (possibly on my turn - but then can't observe after I fold) and be able to update the action sequences for the hand using the stack sizes and deduction. Is this how you all did it, or is there and easier way? I realize that I could just take a screenshot every second or so that way the actions are always up to date, but then would it be possible to manage multiple tables at the same time? I'm afraid I might miss a step.


Welcome, I think you are in the good way.

The first step is getting the table information and you already have it.

After that there are people who only use the information on their turn (with one screenshot is enough for them). I mean they get the actual information when the player has to decide what to do.
On the other hand there are people who use all the information that they can get, taking screenshots constantly. By this way they have more information about the table.

Which method you have to use depends on your AI and what information it needs.

To manage multiple tables at the same time you can use multithreading. You only have to execute your code in parallel for every table with one thread.

Author:  shalako [ Mon Jul 21, 2014 4:32 pm ]
Post subject:  Re: Determining action sequences with deduction

Yeah..I would just take the screenshot when its your turn to act. If you need observed info/data then just retrieve the HH file and parse it after that game is over or extract it from the game chat.

As far as multiple tables your are going to have to run threads as mentioned above or use an array in a thread which is what I do. I have two threads..one that runs the games and one that looks/opens new games. I suppose if your taking one big screenshot per table then running multiple threads is the answer. I am only taking a 1x1 pixel screenshot to look for active fold buttons so its overhead is very little. I can make a decision in about second so running in one thread works for me. Depending on how fast your computer is you might be able to do it this way as well.

Author:  golfguy37 [ Wed Jul 23, 2014 2:06 am ]
Post subject:  Re: Determining action sequences with deduction

Thanks for the replies I like the idea of taking 1 pixel screenshots I may have to try that.

For the threads, however, is it really possible to implement a thread per table scheme? I mean only one thread can control the mouse at a time so there would be some synchronization problems. I think I will manually manage the tables in a sequential manner. I may utilize my other cores for running computations though.

shaloko,

Do you parse and deduce the entire action sequence for the hand on your turn? Or do you just determine core information such as amount to call?

Also,
Do you guys persist all the hands that you play to a db or do you just throw them out after each hand and get them later from another source? If so what is the source?

Author:  shalako [ Wed Jul 23, 2014 2:48 am ]
Post subject:  Re: Determining action sequences with deduction

Quote:
Thanks for the replies I like the idea of taking 1 pixel screenshots I may have to try that.


Yeah its much quicker for things like that. You can also use for the button, number of players etc.

Quote:
For the threads, however, is it really possible to implement a thread per table scheme? I mean only one thread can control the mouse at a time so there would be some synchronization problems. I think I will manually manage the tables in a sequential manner. I may utilize my other cores for running computations though.


Use a "semaphore" when doing anything mouse or keyboard related so that only one thread can control those functions at a time.

shaloko,

Quote:
Do you parse and deduce the entire action sequence for the hand on your turn? Or do you just determine core information such as amount to call?


Not quite sure what you mean here.

Quote:
Also,
Do you guys persist all the hands that you play to a db or do you just throw them out after each hand and get them later from another source? If so what is the source?


Yeah your gonna want to have a db either by creating your own or using something like PokerTracker. Not only are you gonna need them for player modeling but also for finding leaks in your AI. I would also use any showdown information that you get after each game is over.

Author:  golfguy37 [ Thu Jul 24, 2014 3:13 am ]
Post subject:  Re: Determining action sequences with deduction

Quote:
Not quite sure what you mean here.


Nevermind I think I see what you meant. Basically if I fold out of the hand, I shouldn't keep parsing the board, but instead wait for the hand to end and then go fetch the hand history file. Is that right?

Quote:
Use a "semaphore" when doing anything mouse or keyboard related so that only one thread can control those functions at a time.


Thanks for the tip I wasn't aware that there was such a thing but it will definitely do the job.

Author:  shalako [ Thu Jul 24, 2014 5:43 am ]
Post subject:  Re: Determining action sequences with deduction

Quote:
Nevermind I think I see what you meant. Basically if I fold out of the hand, I shouldn't keep parsing the board, but instead wait for the hand to end and then go fetch the hand history file. Is that right?


Yes..that is right..just get any info you need from the HH file after that game is over or from the chat text.

Quote:
Thanks for the tip I wasn't aware that there was such a thing but it will definitely do the job.


sure..its hard to do anything with threads without them.

Author:  HontoNiBaka [ Sat Jul 26, 2014 4:55 pm ]
Post subject:  Re: Determining action sequences with deduction

Yes I did it like that. I only use the pot, stacks and the bets in front of the players, when it's my turn.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/