Page 5 of 5

Re: id_x_hand_strength

PostPosted: Thu May 08, 2014 4:23 pm
by pasita
Document to self (and anyone interested):

cash_hand_player_statistics.holecard_1%13=LEAST(cash_hand_summary.card_1%13,cash_hand_summary.card_2%13,cash_hand_summary.card_3%13,cash_hand_summary.card_4%13,cash_hand_summary.card_5%13)
OR
cash_hand_player_statistics.holecard_2%13=LEAST(cash_hand_summary.card_1%13,cash_hand_summary.card_2%13,cash_hand_summary.card_3%13,cash_hand_summary.card_4%13,cash_hand_summary.card_5%13)

plus the quick filters for one pair.

Somehow I get an offset of a couple of hands when adding that to player report, compared to running the generated query in pgadmin, also player report gives one less hand that hand report... but close enough for cigar, I guess.

Re: id_x_hand_strength

PostPosted: Thu May 08, 2014 7:59 pm
by BillGatesIII
Maybe it's off because card_x % 13 = 0 = Ace.

Re: id_x_hand_strength

PostPosted: Thu May 08, 2014 8:51 pm
by pasita
I was getting only bottom pairs for my tests, but I had some extra filters involved, i.e. "lower pair" on the quick filters, which removed the Aces... yeah, the code above does give paired Aces only when A is on board. Need to fix that. Still can't figure out why it gives different numbers running the report and then running the generated SQL query from the log. When I run a similar Hand report, the generated query does give the same number of hands when run on pgAdmin.

Need to sleep on this, I guess.

Re: id_x_hand_strength

PostPosted: Fri May 09, 2014 7:05 am
by kraada
To make aces high, use (card_x + 12) % 13.

highfalutin