Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Sat Oct 20, 2018 10:52 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Aug 20, 2017 10:53 am 
Offline
Junior Member

Joined: Mon Aug 08, 2016 9:37 pm
Posts: 13
Hi guys. Part of the algorithm I'm developing requires to calculate various measures associated with the handstrenght for each single hand possible given the board. Ideally, I would like to tackle the problem with a monte-carlo simulation. I'm planning to code a wrapper in cython for poker-eval, becouse i'm less familiar in C++ than Python and i need to interface it to the rest of my app in Tensorflow python.
Any advice? This should be a good starting point https://pypi.python.org/pypi/eval7/0.1.2 .


Top
 Profile  
 
PostPosted: Wed Aug 23, 2017 10:04 am 
Offline
Site Admin
User avatar

Joined: Sun Feb 24, 2013 9:39 pm
Posts: 528
I'm an amateur at C++ and poker-source really made my head hurt when I looked at it. I reckon the twoplustwo evaluator is faster and using it is dead simple. (assuming you don't have memory limitations and you are looking for 7 card holdem evaluator)


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 9:06 pm 
Offline
New Member

Joined: Tue Aug 29, 2017 8:44 pm
Posts: 1
I use this calculator: https://github.com/ktseng/holdem_calc/b ... /README.md
Its a Monte Carlo simulation for python, with some minor adjustments you can make work in python 3+. Take in consideration that on if you give a board, it calculate the exact probability even if you specify you don't want the exact calculation. If you want to run a simulation you have to delete "if given_board is not None" from run_simulation() in holdem_calc.py


Top
 Profile  
 
PostPosted: Wed Aug 30, 2017 10:04 pm 
Offline
Junior Member

Joined: Mon Aug 08, 2016 9:37 pm
Posts: 13
Thanks spears and ProfundMadman for your suggestions. The handstrength simulator is the last part that I do not understand well how to do it of my project, for this I would like to solve it fairly quickly though not in the best way. I have difficulty working with a c ++ project, while one in pure python is too slow.


In conclusion, I think I have to rewrite my poker hand evaluator directly in tensorflow. I'm working on google cloud, so the ram and cpu limits are given by those that I can reasonably afford. What do you think is the most appropriate algorithm?
I'm thinking this:

- Batch, build the kevin's rule rank hash table for all 7 cards hands ( 133784560 hand ranks, every saved as a 4 byte integer so only 0,5 GB, maybe i've made a mistake seems too small). 64 cpu may cost 0.10-0.20$/hour, tips for parallelize this process?

- Online, for every hand simulate for N times a random opponent hand and a random board and update the win total of the hand through a table lookup. Here I can parallelize over the simulation (or over the hands).

-Return the win totals array / N.

I plan to make the batch script building the hash table in cython (reusing the code of the project in my first post) and then to use it in a pure tensorflow python API app.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group