New Stats

Any support related posts should go here.

New Stats

Postby ApeironD » Sat Nov 19, 2011 9:34 am

How can I construct the following stats??? (1) A running sum of all 13 card Types (2,3,4,5,....A) which occur on each flop. There would be 13 columns, one for each card type. And the "running sum" would be devided by the number of table hands having a flop. All cards absent from a flop would be refigured to account for an increase in the number of table flops and carried forward; (2) Kikewise, have a running sum of each card Suite (h, d, s, c) for each flop. There would be 4 columns, one for each suite. Again the running sum woulded be devided by the number of table hands having a flop. Suites that do not occur on a particular flop are refigured for the increase in table flops and carried forward. Finally, a column stat showing the running sum of table hands with flops. :idea:

P.S. Stats should be displayed to 2 decimal places.
ApeironD
 
Posts: 23
Joined: Tue Aug 31, 2010 12:30 am

Re: New Stats

Postby WhiteRider » Sat Nov 19, 2011 10:13 am

I assume that you're referring to PT3, rather that PT2-Stud? (This is the PT2-Stud section of the forum)

I'm not sure exactly what you're after..
Would this be in a report showing individual hands through a session?
It isn't possible to build "running sums" like it sounds like you want. You want to see some kind of average up to the point each hand was played - is that right?

If I've misunderstood, could you give us a quick example to illustrate the idea?
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: New Stats

Postby ApeironD » Sat Nov 19, 2011 10:57 am

Sorry, it is for PT3. And yes it would be in a report that could be refreshed as desired, during play, showing the past stats up to the last hand contained in the refreshed report . As for as sums go, PT3 keeps track of many "sums" such as # of hands, amount won, total number of all types of actions, etc. The intent of these suggested stats is to measure the goodness of the table shuffle. After ~100 hands each of the 13 card types will be close to or converging to ~0.2607 card/100 flops for each card type if a perfect RNG is used for the suffle. However, most PRNG's are not perfectly random and loose entrophy as time progresses resulting in skewed suffles. The suggested stats are easily computed in excell from exported existing PT3 report data. It would be nice if these stats could be added to say the Table session report. Note: It would not be necessary to divided by the number of table flops as simple card Type occurance counts would surfice.
ApeironD
 
Posts: 23
Joined: Tue Aug 31, 2010 12:30 am

Re: New Stats

Postby WhiteRider » Sat Nov 19, 2011 1:04 pm

Ah, that's much easier! :)
I thought you wanted to see different values for each line in a report showing individual hands.

Assuming you're playing holdem cash: these stats will need to be in the Holdem Cash Player Statistics section. (If you're playing tournaments then the database fields will need "tourney_" at the start, and the stats will be in Holdem Tournament Player Statistics.)

See the Tutorial: Custom Reports and Statistics for more information on building stats from expressions like those given below.

You can count the occurrences of cards using the database fields:

holdem_hand_player_detail.holecard_1 (your first hole card)
holdem_hand_player_detail.holecard_2 (your second hole card)

Full details of card values are available in this post, but the individual card values run from 1 being the 2 of clubs through to 52 being the ace of spades, like this:

2c=1 / 2d=14 / 2h=27 / 2s=40
3c=2 / 3d=15 ...
4c=3
...
Ac=13 / Ad=26 / Ah=39 / As=52

So to check for the first hole card being any 2 you can use this:

holdem_hand_player_detail.holecard_1 % 13 = 1

To count the number of times that your first hole card was a 2 you would create a column with an expression like this:

cnt_hc1_twos =
sum( if[ holdem_hand_player_detail.holecard_1 % 13 = 1, 1, 0 ] )

Note: aces are holecard_1 % 13 = 0, but that will also be true if the holecard value is 0, which it will be if the hole cards are unknown. For your own hands that should never happen, but if you want to make sure unknown cards aren't counted you could include a check for "holdem_hand_player_detail.holecard_1 > 0".

To count cards of the same suit just check for ranges of hole card numbers. Clubs are 1-13, Diamonds are 14-26, Hearts are 27-39 and Spades are 40-52.

So:

cnt_hc1_clubs =
sum( if[ holdem_hand_player_detail.holecard_1 >= 1 AND holdem_hand_player_detail.holecard_1 <=13, 1, 0 ] )

The above examples are for each holecard separately, but you can combine them (since I assume you want the overall rather than individual result for holecard 1 and 2) by adding two IF statements inside the SUM.

For example, this column expression counts the number of club cards dealt as either card:

cnt_cards_clubs =
sum( if[ holdem_hand_player_detail.holecard_1 >= 1 AND holdem_hand_player_detail.holecard_1 <=13, 1, 0 ] + if[ holdem_hand_player_detail.holecard_2 >= 1 AND holdem_hand_player_detail.holecard_2 <=13, 1, 0 ] )

Note that each IF statement is exactly the same as given earlier, except that the second one uses holecard_2.

Once you have a column for each item that you want to count you can build a stat to display it. The stat to display the number of club cards would just have a value expression of:

cnt_cards_clubs

Use a Format Expression of:
/%.0f
..to display a number with no decimal places.
Fill in the rest of the info in the stat, including Title and Width on the Format tab and you're good to go.
If you want to divide by the number of cards dealt you'll need another column like:

cnt_cards_dealt =
sum( if[ holdem_hand_player_detail.holecard_1 > 0, 1, 0 ] + if[ holdem_hand_player_detail.holecard_2 > 0, 1, 0 ] )

..and then your stat's value expression would be:

cnt_cards_clubs / cnt_cards_dealt

..with a Format Expression of:
/%.2f
..for 2 decimal places.

These stats can be included in any report showing player stats, but not session based reports as those do not have access to information about individual hands, which we use here.

EDIT: I should also point out that you will need many more than 100 hands before you start to see statistically relevant data for this sort of thing.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: New Stats

Postby ApeironD » Sat Nov 19, 2011 1:34 pm

That's super. Thank you very much. How would one do the exact same thing for the flop cards?
ApeironD
 
Posts: 23
Joined: Tue Aug 31, 2010 12:30 am

Re: New Stats

Postby WhiteRider » Sat Nov 19, 2011 4:00 pm

The board card database fields are also mentioned in the post I linked you to, but they don't stand out.

The database fields for those are:

holdem_hand_summary.card_1
...
holdem_hand_summary.card_5

..where 1 to 3 are the flop, 4 is the turn and 5 is the river.
Other than that the process is exactly the same.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: New Stats

Postby ApeironD » Sat Nov 19, 2011 8:20 pm

Yes, I over looked them. I suspect your right about the number of hands needed for practical results. In the DoD such sources as weather data or tunning to a star with a radio telescope are used to develop their PRNG seeds from the observed variance. It also depends on how frequent the PRNG is reseeded. As a PRNG runs it looses entrophy and results can become skewed. When we use probability techniques to compute odds that influence our play, we assume a near perfect shuffle. As I recall a "real" shuffle with perfect interleveing becomes near perfect (random) after 5+ such shuffles. It may be possible to "weigh" the traditional odds (based on a near perfect shuffle) using the actual PRNG Shuffle preformance as deterimined from known cards. My gut feeling is that it will require more hands than is practical for determination of stable weights. Also, if the site has "shufflers" that serve multiple tables then we would likely have more missing "values" (cards) than the technique could tolerate. Anyway it's just a shot in the dark. Probably a hair-brained project! Nevertheless, thank you very much for your kind and timely response to my questions.
ApeironD
 
Posts: 23
Joined: Tue Aug 31, 2010 12:30 am

Re: New Stats

Postby WhiteRider » Sun Nov 20, 2011 6:38 am

You're welcome.
Yes, I think it would take a very large amount of hands to get anything conclusive - I'm sure something will be written on the net somewhere about it! - but it's still interesting to satisfy yourself of this kind of thing.
WhiteRider
Moderator
 
Posts: 53961
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: New Stats

Postby tarix » Mon Nov 21, 2011 8:09 am

It's worth noting that the big, reputable poker sites don't using PRNGs. Their TRNGs have very long periods and are seeded with hardware entropy and after all of that the results are filtered to provide provable randomness at or above 3 standard deviations. It's possible they are slightly more accurate than that, but no one really tests them for a level above that.

PokerStars publishes the most information about this topic and using that information including documents published by Intel and their testing company you can get an idea of exactly how they've implemented their shuffler. If I recall correctly the PokerStars RNG was over-engineered well above the level of bits required to encompass all of the possible combinations of holdem.

If you are really interested in this sort of subject I highly recommend of articles published on random numbers as they apply to cryptography. It will give you a much better understanding about how long binary chains of randomness contribute to making an RNG mathematically random and how it affects the security. It also gives insights to why they must filter the data streams even when they come from hardware.

Finally it's worth noting that you can get surprisingly good results out of Microsoft's Cryptology API (PRNG) because they use various random operating system events to seed the entropy. (PokerStars does a similar thing by including the timing of user clicks as part of their entropy stream.)
tarix
Developer
 
Posts: 3760
Joined: Tue May 20, 2008 2:49 pm


Return to PTS Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron
highfalutin