Where can I find definitions for IDs and ranges?
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    2

    Default Where can I find definitions for IDs and ranges?

    I'm looking for definitions for all the tables, prefixes, and ranges for the DB. I've searched through pgAdmin to find some SQL code that might give me hints but I've so far been unsuccessful.


    I would like to make a custom report for hole cards, but how do I determine the card and suit? Let's say I want to make two rows/ranges of Ax suited and Ax unsuited, lower than queens exclusive. (i.e. Jacks or lower) Is there an ID and range definitions page posted somewhere?


    I'm assuming it's something like this, but have no idea about the values. I would like to find a list/table for *Some Number* and *Some Name* in this example:

    FieldExpression="HOLECARDS.*Some Name*"...
    ...
    Range In="*Some Number*" ...


    Thanks and sorry if this has already been posted.
    Last edited by phil816; 03-25-2011 at 11:12 PM.

  2. #2
    Member
    Join Date
    Jul 2008
    Posts
    34

    Default

    Sadly, I have no idea how to use this kind of information in a report or custom stat, but I do have a pretty good grasp of the database design.

    For descriptions like AKs, 77, 93o, etc, look at the holecards table. The holecard_id column of that table is used in the holecardvalue_id column of playerhandscashkeycolumns and playerhandstourneykeycolumns tables.

    For the actual rank and suit of a player's hole cards using the holecard1int and holecard2int columns of playerhandscashkeycolumns or playerhandstourneykeycolumns, you need to use a little bit of math:
    Rank = (holecardxint-1) % 13. Ace is 0, Two is 1, and on up through the ranks to the King which is 12.
    Suit = (holecardxint-1)/13. Unfortunately, I don't remember the order of the suits. Basically, holecardints 1-13 are one suit, 14-26 are another, 27-39 a third, and 40-52 the last.
    This system of converting cards to integers is commonly used in the EV analysis libraries.

    Hopefully, that will get you started on the right path. Let me know if you have any further questions.

    -red

  3. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    2

    Default Thank you and slight follow up.

    Thanks for the timely and helpful response. After reading this, I noticed I can actually view my stored data in pgAdmin, so now with your description, it should be simply a matter of viewing my last few hands and then backwards solving the card values.

    You said you were unfamiliar with how to use the information, but you seem pretty familiar with the db. Do you know if pgAdmin has some kind of visual representation of DBs? I know in visual studio you can view DB dependencies through a generated graph...

    Also, I'm wondering if you know what edits to the db might break HEM. For example, let's say I wanted to add a column to playerhandcashkeycolumns that gave me some kind of arbitrary rating, like folding with pairs between pocket 2s and 6s. I should be able to add this column, with some simple SQL commands, then refer to it using my custom report, without it affecting any other functionality, correct?

    If you're not sure, that's fine, just making sure I don't do anything stupid.

  4. #4
    Senior Member
    Join Date
    Jan 2009
    Posts
    103

    Default

    As long as you don't alter or delete any exisiting columns, tables, sequences,indices, etc, you can add all of the columns and tables that your heart desires with no performance issues at all.

    One caveat is that unless you have a script that dynamically updates all new hands with this extra info, info from new hands will not be included in your custom reports or stats, but your sample size could go up if you're using something like TotalHands or VPIPHands etc. That is unless you add a NOT NULL constraint, in which case your stats and reports will become flawed until the info is properly updated.

    That's probably the most convoluted answer I've ever given, hopefully you can make sense of it.

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    34

    Default

    Quote Originally Posted by phil816 View Post
    Thanks for the timely and helpful response. After reading this, I noticed I can actually view my stored data in pgAdmin, so now with your description, it should be simply a matter of viewing my last few hands and then backwards solving the card values.

    You said you were unfamiliar with how to use the information, but you seem pretty familiar with the db. Do you know if pgAdmin has some kind of visual representation of DBs? I know in visual studio you can view DB dependencies through a generated graph...
    PostgreSQL does not include anything that would do this sort of thing. However, you might be able to find something on the internet. Just google around.

    Also, I'm wondering if you know what edits to the db might break HEM. For example, let's say I wanted to add a column to playerhandcashkeycolumns that gave me some kind of arbitrary rating, like folding with pairs between pocket 2s and 6s. I should be able to add this column, with some simple SQL commands, then refer to it using my custom report, without it affecting any other functionality, correct?

    If you're not sure, that's fine, just making sure I don't do anything stupid.
    This is really a question for the developers. Reports and graphs in HeM will still probably work without a hitch. However, depending on how the importer was programmed, there is a possiblity that you won't be able to import any new hands.

    If PCP Poker has had success adding columns, it might be worth a try. I will caution you when using NOT NULL columns, though. If you don't also include a default value for that column, you almost certainly WILL break HeM's importer.

    -red

Similar Threads

  1. stat definitions
    By enheda in forum Manager General
    Replies: 0
    Last Post: 08-09-2010, 06:17 PM
  2. Replies: 0
    Last Post: 03-17-2010, 03:51 PM
  3. Replies: 3
    Last Post: 07-05-2009, 04:10 PM
  4. New HUD definitions - documented?
    By danols in forum Manager General
    Replies: 3
    Last Post: 06-14-2009, 05:38 PM
  5. Need a little help with pop up definitions
    By Alcibadies in forum Manager General
    Replies: 4
    Last Post: 01-17-2009, 01:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •