Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Mon Nov 13, 2023 2:03 pm

All times are UTC




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Sep 28, 2013 8:36 am 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
proud2bBot wrote:
If you are starting over, I'd always use PT4 as you can get everything out, its quite easy and fast. Choosing PT3 just for the sake of the documentation is weird, as you can see the schema anyway and you'll have longer support for PT4 for sure...

Sounds like good advice, thanks.
It would be great if you wanted to share code for some PT4 querys so we have something to start with. :)


Top
 Profile  
 
PostPosted: Sat Sep 28, 2013 1:48 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
I generate all the SQL code programmatically. However, here's a query I'm using for getting hands that match certain criteria. I have written a filter framework where I can pass n filters to the DAO and each filter contains a restriction on the database e.g. to capture 3b pots only or hands that went to showdown etc. Each filter speficies a database condition and the whole filter string will replace the %FILTER% in the query. Even though the query only returns a handID, I guess the query might help anyway as it shows all tables that are possibly relevant for cash games:
Code:
SELECT   
   DISTINCT(cash_hand_summary.id_hand) as handId
FROM    cash_hand_player_statistics
JOIN    cash_hand_summary ON cash_hand_summary.id_hand = cash_hand_player_statistics.id_hand
JOIN    player ON cash_hand_player_statistics.id_player = player.id_player
JOIN    lookup_positions ON cash_hand_player_statistics.position = lookup_positions.position AND cash_hand_player_statistics.cnt_players = lookup_positions.cnt_players
JOIN    cash_limit ON cash_hand_summary.id_limit = cash_limit.id_limit
JOIN   lookup_actions as actions_p ON actions_p.id_action = cash_hand_player_statistics.id_action_p
JOIN   lookup_actions as actions_f ON actions_f.id_action = cash_hand_player_statistics.id_action_f
JOIN   lookup_actions as actions_t ON actions_t.id_action = cash_hand_player_statistics.id_action_t
JOIN   lookup_actions as actions_r ON actions_r.id_action = cash_hand_player_statistics.id_action_r
WHERE   
   TRUE
 %FILTER%


Top
 Profile  
 
PostPosted: Sun Sep 29, 2013 9:57 am 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
Thanks ibot and proud2bBot for the code you have shared.


Top
 Profile  
 
PostPosted: Mon Sep 30, 2013 12:53 pm 
Offline
Junior Member

Joined: Wed Sep 04, 2013 6:05 pm
Posts: 47
Hey Guyz,

If interested, following SQL request to get VPIP and PFR on PT4 :

Code:
SELECT count(*)::float /
   ((SELECT count(*)
    FROM cash_hand_player_statistics denominator
    WHERE denominator.id_player = 49)::float - (SELECT SUM(cc.cnt_walks)
    FROM cash_cache cc WHERE cc.id_player = 49)::float)
   as vpip
FROM cash_hand_player_statistics numerator
WHERE numerator.id_player = 49
and flg_vpip is true


PFR
SELECT count(*)::float /
((SELECT count(*)
    FROM cash_hand_player_statistics denominator
    WHERE denominator.id_player = 49)::float - (SELECT SUM(cc.cnt_walks)
    FROM cash_cache cc WHERE cc.id_player = 49)::float)
   as pfr
FROM cash_hand_player_statistics numerator
WHERE numerator.id_player = 49
and cnt_p_raise =1



Top
 Profile  
 
PostPosted: Tue May 27, 2014 11:23 am 
Offline
Junior Member

Joined: Sat Jun 29, 2013 7:52 am
Posts: 11
http://wpc.0997.edgecastcdn.net/000997/ ... uideV3.pdf


HM2 API seems to be finally out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group