PDA

View Full Version : The Cygnus Project: Playerhandscashkeycolumns Table



Cygnus
11-13-2008, 01:50 PM
The Cygnus Project: Playerhandscashkeycolumns Table

Playerhandscashkeycolumns

pokerhand_id int4
playerhand_id int4
handtimestamp timestamp
gametype_id int4
player_id int4
numberofplayers int2
positiontype_id int2
holecard1int int2
holecard2int int2
holecardvalue_id int2
rakeamount int4
netamountwon int4
streetwentallin int2
didvpip bool
didpfr bool
preflopaction_id int2
firstpreflopactiontype_id int2
maxstreetseen int2
totalflopbets int2
totalflopcalls int2
totalturnbets int2
totalturncalls int2
totalriverbets int2
totalrivercalls int2
preflopplayeractiontype_id int2
flopcbetpossible bool
flopcbetmade bool
flopfacingcbet bool
flopfoldedtocbet bool
flopplayeractiontype_id int2
turncbetpossible bool
turncbetmade bool
turnfacingcbet bool
turnfoldedtocbet bool
turnplayeractiontype_id int2
rivercbetpossible bool
rivercbetmade bool
riverfacingcbet bool
riverfoldedtocbet bool
riverplayeractiontype_id int2


Playerhandscashkeycolumns looks to be the mothership of the tables. It has a record per player per hand.

Some columns are fairly obvious (holecard1), others are not. I'm hoping through discussion here we can figure them out.


One thing that interests me is that there is a flop, turn, and river version of this table
playerhandsflop
playerhandsturn
playerhandsriver

Someone might wonder, where is the preflop table? Well, I think this *is* the preflop table (Playerhandscashkeycolumns). If you notice, it's this table that has the preflopaction_id in it.

Cygnus

Rvg72
11-13-2008, 09:50 PM
There is also a playerhandsmisc table for cash and tourney which has other stats. The reason we have multiple tables is for performance. For example, HM will only join the "misc" table when it needs to - same with all other tables. This greatly improves performance on large db's.

Roy

Cygnus
11-17-2008, 09:47 PM
I'm having trouble determining the difference between the columns

preflopplayeractiontype_id
firstpreflopactiontype_id


preflopplayeractiontype_id seems to be the direct sequence of what a player did preflop, similar to flopplayeractiontype_id.

But I can't figure out the second one. Help?

My task is to identify hands where there was 1 preflop raiser (doesn't have to be hero), and exactly 1 caller, and the preflop raiser bet on the flop. Here's my query so far.

select f.*
from playerhandsflop f join playerhandscashkeycolumns k on f.playerhand_id = k.playerhand_id
join pokerhands h on h.pokerhand_id = k.pokerhand_id where
flopcbetmade = 1 and
numberofplayerssawflop = 2 and
numberofplayerssawturn = 0 and
flopplayeractiontype_id = 44

(actiontype_id of 44 = B)

My problem is flopcbetmade. It's including hands where there was a raising war preflop and the player_id in question was the last to put in a raise.

So now I'm trying to see if I can incorporate preflopplayeractiontype_id and/or firstpreflopactiontype_id to narrow my hands down to just 1 raiser and 1 caller preflop.

Cygnus

Cygnus
11-18-2008, 12:04 AM
Another question about

preflopplayeractiontype_id
firstpreflopactiontype_id

They don't appear to match with the actiontypes table. In the hand below, hogbuckdm has

preflopplayeractiontype_id = 4 XCCC ??
firstpreflopactiontype_id = 3 XCCF ??

Is there a special preflop actiontype table I'm not aware of?

Cygnus


"***** Hand History for Game 3139765807 *****
$50 NL Texas Hold'em - Saturday, December 03, 20:13:29 EDT 2005
Table Table 64729 (Real Money)
Seat 2 is the button
Total number of players : 10
Seat 1: frazze79 ( $48.30 )
Seat 10: Hero ( $62.75 )
Seat 5: BigTex56 ( $54.26 )
Seat 2: rigrigkosk ( $52.12 )
Seat 4: hogbuckdm ( $34.75 )
Seat 9: WJH23 ( $25 )
Seat 7: saat0014 ( $44.50 )
Seat 6: gregblick ( $49.25 )
Seat 8: webbertime ( $49 )
Seat 3: TGstyle ( $9.50 )
TGstyle posts small blind [$0.25].
hogbuckdm posts big blind [$0.50].
** Dealing down cards **
Dealt to Hero [ Ah Jc ]
BigTex56 calls [$0.50].
gregblick folds.
saat0014 folds.
webbertime folds.
WJH23 raises [$2.50].
Hero folds.
frazze79 folds.
rigrigkosk calls [$2.50].
TGstyle folds.
hogbuckdm raises [$5.50].
BigTex56 calls [$5.50].
WJH23 folds.
rigrigkosk folds.
>You have options at Table 65237 Table!.
** Dealing Flop ** [ Ac, 6h, Kd ]
hogbuckdm bets [$2].
BigTex56 folds.
hogbuckdm does not show cards.
hogbuckdm wins $18.40
Game #3139769320 starts.

Rvg72
11-19-2008, 06:30 PM
I'm having trouble determining the difference between the columns

preflopplayeractiontype_id
firstpreflopactiontype_id


preflopplayeractiontype_id seems to be the direct sequence of what a player did preflop, similar to flopplayeractiontype_id.

But I can't figure out the second one. Help?

My task is to identify hands where there was 1 preflop raiser (doesn't have to be hero), and exactly 1 caller, and the preflop raiser bet on the flop. Here's my query so far.

select f.*
from playerhandsflop f join playerhandscashkeycolumns k on f.playerhand_id = k.playerhand_id
join pokerhands h on h.pokerhand_id = k.pokerhand_id where
flopcbetmade = 1 and
numberofplayerssawflop = 2 and
numberofplayerssawturn = 0 and
flopplayeractiontype_id = 44

(actiontype_id of 44 = B)

My problem is flopcbetmade. It's including hands where there was a raising war preflop and the player_id in question was the last to put in a raise.

So now I'm trying to see if I can incorporate preflopplayeractiontype_id and/or firstpreflopactiontype_id to narrow my hands down to just 1 raiser and 1 caller preflop.

Cygnus

You could use the preflopactiontype_id of "R" which would be a single raise and no follow up action on that street.

Roy

Rvg72
11-19-2008, 06:36 PM
PreflopAction_ID = action facing this player preflop

0 = unopened
1 = 1 limper
2 = 2+ limpers
3 = 1 Raiser no Callers
4 = 1 Raiser 1+ Callers
5 = 2+ Raisers
-1 = Folded to Big Blind

FirstPreflopActionType_ID = the first action the player takes preflop

3 = Raise
2 = Call
1 = Checked
0 = Fold

PreflopPlayerActionType_ID = the action value of all his actions on that street

Roy

Cygnus
11-19-2008, 07:33 PM
You could use the preflopactiontype_id of "R" which would be a single raise and no follow up action on that street.

Roy

Perfect! Just what I was looking for in both your posts.

However, I think you had a typo above.

Instead of *preflopactiontype_id of "R"* I think you meant to say

PreflopPlayerActionType of "R"

as there is no column preflopactiontype_id I'm aware of.

Thanks,
Cygnus