Poker Predictor: Matlab Version

December 9, 2009 by Luigi Giaccari 
Filed under: Games, Probability, Statistics 
19 Comments
VN:F [1.8.1_1037]
Rating: +2 (from 2 votes)
VN:F [1.8.1_1037]
Rating: 10.0/10 (6 votes cast)

The finest poker brains on your side!

POker Predictor Restyling

Go to main post

What is Texas Hold’em Poker:

  • 2+5 cards each player
  • 52 total number of cards
  • 1326 starting hand configurations
  • 207025 distinct head-to-head match ups
  • 1712304 possible boards
  • 690900 hands configurations with a single opponent
  • over 6.22 e26 with 9 opponents
  • ……………..

All of them are in Poker Predictor: a Texas Hold’ em Probability and Odds Calculator.

Poker predictor currently supports  only Texas Hold\'em. Which poker version would you like to see on next release?











What can Poker Predictor Do:

Poker Predictor is a Matlab tool to calculate poker games probabilities from whatever cards configuration. Probability are computed with random cards permutation, they are not the exact ones but the high simulations numbers ensure the error to be less than 1%. Thanks to his strong computational engine, It can simulate 100′000 10 players Texas hold’em games in a matters of 0.3 seconds, so it is actually a real time tool, very useful for on line games, especially with high level players. It is possible to choose both players and opponents cards.

Although a little rough in the graphics (I am not a software developer, neither a programmer, just an engineer with poker passion) Poker predictor is a powerful tool, I am myself using it. Here there is graphical explanation:

PokerPredictor4

Collaborators Wanted:

I’d like to compile Poker predictor on different platforms. If you want to join the project your help will be greatly appreciated. I need people with the following requirements:

  • Different platform than than Win32, with Matlab installed.
  • Capable of building an external Matlab application.

Briefly I need to build an external Matlab application (MCR compiler included), I ‘ll give you all required files, if you are interested contact me at giaccariluigi@msn.com.

Extensions:

Maybe you need something different, look at this extensions or propose something yourself! Need a :

  • different languages
  • different cards design/colors
  • different poker games
  • poker tables
  • others functionalities
  • explanations on something unclear Propose !!!!!!!!!! your request may sounds very interesting, send everything you want on my e-mail.

Download Poker Predictor for free:

Matlab users instructions:

  • Download here the basic package. 
  • Download the handranks file and unzip it (it was too big for Matlab Central)
    Download HandRanks
  • Compile C++ files using TestMexFiles.m, or
    download
    precompiled files for Win32
    Download Precompiled Poker Predictor Win 32
    or download precompiled files for Linux32
    Download Precompiled Poker Predictor linux
  • Run PokerPredictor.m
  • Win a lot of money!
  • Donate parts of your earnings!  :-D

You don’t have Matlab? Get the standalone version HERE

Win32 download

Download Poker Predictor  Version v1.1

This work is free thanks to users gratitude. If you find it useful please consider making a donation. Help me developing  future versions.


No need to tell you good luck if you have poker predictor on your side !

Go to main post

VN:F [1.8.1_1037]
Rating: 10.0/10 (6 votes cast)
VN:F [1.8.1_1037]
Rating: +2 (from 2 votes)
Poker Predictor: Matlab Version10.0106

Popularity: 59% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Related Posts

Comments

19 Comments on Poker Predictor: Matlab Version

  1. NLC on Fri, 11th Dec 2009 08:31
  2. Simply the best!

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  3. Rocko Chen on Sat, 12th Dec 2009 00:00
  4. I get the following error when I hit “continue” on the startup menu, on Matlab 7.8.0.347 (R2009a)


    ??? Undefined function or variable ‘BuildTable’.

    Error in ==> PokerPredictor at 53
    TablePtr=BuildTable();%load the look up table;

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    You don’t have the following binary files:

    -BuildTable
    -GameSimulation
    -DeleteTable

    You can get them compiling the c++ included in the basic package or you can download precompiled files for Win32 :
    download precompiled files for Win32

    if you are not comfortable with MEX-files and you have Windows system.

    Unfortunately I don’t have Precompiled for MAC or Linux.

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Rocko Chen Reply:

    Just wanted to say thank you very much for making this available.

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  5. DOn on Sat, 12th Dec 2009 05:29
  6. Hi, I installed the common user package but unable to find to where the files have been installed!

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    You don’t to know where the files have been installed.
    In the folder where you unzipped the package there is an executable:

    Run.exe

    Click it and the work is done!

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  7. Henry on Sat, 12th Dec 2009 13:50
  8. hello luigi, this is an excellent tool! always wanted to try playing with a genius tool like this by my side.

    i do have one question. what formula did you use to determine max bet/pot? did you use the kelly criterion?

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  9. Henry on Sat, 12th Dec 2009 14:11
  10. actually luigi. i did some calculations and see that you are not using the kelly criterion. I’d like to talk to you more about this through email. please drop me a line at henry.bee@gmail.com

    thanks!

    Henry

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    HI Henry, thanks for your interesting comment.

    Actually ti seems to me I made a little confusion about the english word “odd”.

    This how data are computed, sorry if this not the technical terminology, not an expert of the field:

    gain=win+tie/numtie

    odd=1/gain (the italian “quota”)

    in Italy we use to call “quota” the money bookmakers give you for a bet. For example if you have 50% of winning chance, the honest “quota” is 2. You bet 1 they pay 2.

    odd is really intended as:

    odd=(1-gain) /gain

    so for 50% winning chance you get odd=1.

    For the maxbet /pot ratio, I use this one:
    maxbet=(gain)/(1-gain)

    which is actually the inverse of the odd, what a mess!. Give me some time to look for some translation work and I will be able to tell you more.

    The odd used in kelly’s formula need to know how much you gain if you win: you need to know the history of the game (folds and bets). There shold be a real time link with the pokerroom, but this not the case.

    Please give me your opinion.

    Luigi

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Henry Reply:

    you did not make a mistake regarding odds. please do not change your calculations (although the spelling is “odds”, not “odd”)! the italian “quota” is the same definition as “gambling odds” in english.

    for example, a payout of $2 for every $1 bet is an odds of 2:1. This is what’s used in poker as well. you are also right that there is another definition called the probability definition of odds. (1-p) / p is the “odds against”. and the inverse, p / (1-p) is the “odds in favour”. BUT the probability definition is NOT used in gambling and poker. =)

    f = edge/odds
    = EV / payout
    = (p*payout-[(1-p)*losses])/payout
    = (p*odds/(1-p*odds))/odds
    = (p*(1+odds)-1)/odds
    • f is fraction of bankroll to bet
    • p is probability of winning
    o in poker this is changed to probability of winning + tying
    o
    • odds here refers to gambling definition of odds
    o i.e. a 2:1 odds refers to $2 payout for $1 bet on a win
    • EV is the expected value.

    Example
    Assume p=50%, odds=2.
    Then according to the Kelly criterion the player should bet 25% of his or her bankroll, where bankroll is the player’s current wealth and does not include any money in the pot (future wealth).

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    Thank you for the advise,

    I am currently very busy but in the next release you will have your new tool.

    Regards

    Luigi

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)
  11. Horst Borst on Tue, 15th Dec 2009 19:53
  12. Hi,

    I have an error while compiling the cpp files:
    There’s probably something wrong on memset in line 50.
    Unfortunately the error message is in german:

    BuildTable.cpp: In function »void mexFunction(int, mxArray**, int)«:
    BuildTable.cpp:50: Fehler: »memset« wurde in diesem Gültigkeitsbereich nicht definiert

    I have run Matlab 7.7. on Ubuntu 9.04 gcc 4.3.3.

    Best regards,
    Horst

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    I am sorry but I don’t have a linux system so I can not look for the error.

    Just one thing, if I am not wrong gcc should be a C compiler not a c++ one.

    I hope someone is able to compile linux files and send them to me. I will share those files avoiding this complicate compiling operation.

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    antoine Reply:

    same here… Any solution? I’ll look for one otherwise, but would be nice not to have to… :)

    Cheers and big up for what looks like a pretty awesome tool.

    Antoine

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  13. jose on Mon, 28th Dec 2009 15:12
  14. Only an engineer could come up with a such user friendly and effective concept:)
    Congrats

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  15. antoine on Wed, 6th Jan 2010 16:41
  16. I keep getting invalid mex file or Mex file entry point is missing… Any suggestions? Please, make this work on mac and linux. I don’t know enough of C to translate to matlab etc, but maybe someone could do that and see if performance is still good?

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  17. Guille on Fri, 26th Feb 2010 20:16
  18. Hello Luigi,
    the link to the handranks file is broken, and I cannot run the program without it (I get an error when executing the function in BuildTable.mexw32). Could you please re-post it?

    Regards,
    Guille

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  19. Guille on Fri, 26th Feb 2010 20:21
  20. Hello Luigi,
    I just found that I could get the handranks.dat file from the stand-alone version in PokerPredictor_v1.0.zip

    Regards,
    Guille

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]


    Luigi Giaccari Reply:

    Thank you for the broken link report,

    I just fixed it!

    UA:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


Include MATLAB code in your comment by doing the following:

<pre lang="MATLAB">

%insert code here

</pre>