custom stats board texture straight or flush possible

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

custom stats board texture straight or flush possible

Postby daniguru » Tue Mar 26, 2013 2:04 pm

hi,is it possible to tell if the board does or does not contain a straight or flushpossible for flop turn and river? something like board on flop 2 of same suits turn 3 of same suits etc...maybe via cash_hand_summary.card ??

i just want to code in relation if the board was safe or dangerous.

many thanks for your help

daniel
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: custom stats board texture straight or flush possible

Postby kraada » Wed Mar 27, 2013 7:59 am

This is very complicated to do by hand in PT3. There are filters for it in PT4 by default, but I'm not sure if all of the permutations will work in custom stats due to the complexity involved (especially in "straight possible").
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: custom stats board texture straight or flush possible

Postby daniguru » Wed Mar 27, 2013 8:05 am

OK I SEE many thanks kraada. ;)
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: custom stats board texture straight or flush possible

Postby daniguru » Mon Apr 01, 2013 9:27 pm

kraada what about something like 2 cards missing to fill a straight? like board 2 4 6 ....also not possible to code? :(
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: custom stats board texture straight or flush possible

Postby kraada » Tue Apr 02, 2013 10:34 am

It requires a lot of coding to test for that kind of case. Each card value is stored in holdem_hand_summary in the values card_1 through card_5. Each is a number from 1 to 52 - 1 is the 2c, 2 is the 3c, 3 is the 4c and so on all the way up. So you can get the rank of the card by card_x % 13 - aces will be 0, 2s will be 1, 3s will be 2 and so on. You can then compare these numbers together but it's going to take quite a bit of work to test for exactly that situation (remember, aces can be high or low).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: custom stats board texture straight or flush possible

Postby daniguru » Wed Apr 03, 2013 4:30 am

ok many thanks kraada. may you allow me a last quesion? a code like this i also see is

"SELECT COUNT(*) as result \
FROM holdem_hand_player_detail as D, player as P \
WHERE P.id_player=D.id_player AND \
P.player_name like '%SCREENNAME%' AND \
P.id_site=%SITEID%",

is this the code that gets written into postgres? cause i am used to see only code structure like
sum( if[holdem_hand_player_statistics.flg_p_limp, 1, 0] )

just wanted to know if i also can use both for coding stats?

many thanks :)
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am

Re: custom stats board texture straight or flush possible

Postby kraada » Wed Apr 03, 2013 7:59 am

If you want to see the actual SQL that's generated from the custom stat queries you can find them in our log files. We use the abstractions that we do because it makes it easier - most people do not have the sophistication necessary to write full queries. You can find our log file by turning logging on in PT3 (Configure -> Options -> Logging Enabled) and the file you want to look at is in C:\Program Files (x86)\PokerTracker 3\ - it's called PokerTracker.log and every query we send to PostgreSQL is logged there.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: custom stats board texture straight or flush possible

Postby daniguru » Wed Apr 03, 2013 10:46 am

ah very cool did not know that, so many many thanks kraada :)

daniel
daniguru
 
Posts: 69
Joined: Mon Aug 11, 2008 10:20 am


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 5 guests

cron
highfalutin