Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PROGRAMMING: How do they calc the odds so fast?

  • 29-09-2007 12:51am
    #1
    Business & Finance Moderators, Entertainment Moderators Posts: 32,387 Mod ✭✭✭✭


    All the programs I have seen (like twodimes.net and PS etc) enumerate a very large number of boards very quickly. Obviously they are not using a brute force approch to this so there must be some engine/algorithm that can be used to determine odds.

    Anyone know anything about how this is achieved in code??

    DeV.


Comments

  • Closed Accounts Posts: 3,362 ✭✭✭Hitman Actual


    I'm pretty sure it can be brute force. If you use the "Enumerate All" option in PS, part of the answer is e.g. :

    "2,097,572,400 games 0.005 secs 419,514,480,000 games/sec"

    Using Monte Carlo simulation (which I know little about), it runs away until you stop it, giving e.g. :

    "4,346,584 games 10.172 secs 427,308 games/sec"

    However, if you pick loads of hands, the "Enumerate All" option doesn't work well, but "Monte Carlo" does. So obviously "Monte Carlo is used for more complicated analysis.


  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    Interesting topic: http://forumserver.twoplustwo.com/showflat.php?Cat=0&Board=software&Number=8513906&page=0&fpart=all

    pokenum.exe is good for use in programs

    download from here http://download.gna.org/pokersource/archives/poker-eval/windows/windows/xp/poker-eval/examples/

    and then access like pokenum.exe jd qd ah ac

    or via cmd prompt c:\pokenum.exe jd qd ah ac

    You have to parse the output which is annoying


  • Business & Finance Moderators, Entertainment Moderators Posts: 32,387 Mod ✭✭✭✭DeVore


    Nice, I'm just thinking it might be an interesting project to write something like PS but allow hand probabilities to be introduced. I have the pseudo code in my head but needed away to quickly evaluate a pair of headsup hands.

    DeV.


  • Registered Users, Registered Users 2 Posts: 200 ✭✭The_Daddy_H


    A monte carlo simulation of such things would be fairly easy to set up, and yield accurate results with little computational cost.


  • Business & Finance Moderators, Entertainment Moderators Posts: 32,387 Mod ✭✭✭✭DeVore


    Ideally since I am only thinking about headsup hands I could run the pokenum program with every combo and dump them into an SQL database and query that. But my real question was "how do they perform the enumeration of the boards so quickly". I mean, they arent using Monte Carlo approximation (at least not all of them are, PS has an option to turn that on or off) so, are they really bruteforcing the calcs or are there clever algorithmic ways of shortening permutations??

    DeV.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 5,083 ✭✭✭RoundTower


    there are some clever algorithms. For example Pokerstove (I think pokenum might be the back end) will figure if you have QJo up against A5, any board with the other 3 aces is a winner for the A5. I saw an article about this somewhere, but I can't remember where.


  • Registered Users, Registered Users 2 Posts: 5,083 ✭✭✭RoundTower


    pokenum is not the backend for pokerstove, it is for twodimes.

    pokerstove article that does not go into the specifics
    I think they have libraries and stuff


  • Closed Accounts Posts: 1,252 ✭✭✭The Al Lad


    They have a little monkey that works round the clock working out odds !!!:D


  • Closed Accounts Posts: 3,362 ✭✭✭Hitman Actual


    ocallagh wrote:
    Interesting topic: http://forumserver.twoplustwo.com/showflat.php?Cat=0&Board=software&Number=8513906&page=0&fpart=all

    pokenum.exe is good for use in programs

    download from here http://download.gna.org/pokersource/archives/poker-eval/windows/windows/xp/poker-eval/examples/

    and then access like pokenum.exe jd qd ah ac

    or via cmd prompt c:\pokenum.exe jd qd ah ac

    You have to parse the output which is annoying

    A question to all you software guys (and I know we have plenty on here): Would it be hard to write some sort of plug-in for a spreadsheet application? As in, say, you type in two opposing ranges into cells, and the spreadsheet app either calculates the equity itself, or calls another program (PS?) to do it.

    Apologies if this is slightly off topic.


  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    A question to all you software guys (and I know we have plenty on here): Would it be hard to write some sort of plug-in for a spreadsheet application? As in, say, you type in two opposing ranges into cells, and the spreadsheet app either calculates the equity itself, or calls another program (PS?) to do it.

    Apologies if this is slightly off topic.
    VBA allows you to create those plugins you are talking about. Should be easy enough.


  • Advertisement
Advertisement