Open Side Menu Go to the Top
Register
Help - Using PT4 to analyse population tendencies Help - Using PT4 to analyse population tendencies

06-08-2012 , 10:22 AM
I am trying to work out how to use PT4 to analyse the general population tendencies of opponents at the micro's. Has anyone used PT to do this sort of thing before? Ideally I will then use this information to create a read-less strategy for the micro's (similar to Chadders' strategy for the $60's from the HT pack, although obviously not as good coz I am a fish ), which I know sounds like a lot of work but will probably teach me a lot of things about how to adjust to opponents so may be worthwhile.

I have worked out how to get the population stats in a report (thanks to Kraada in the PT4 forums), however the report is limited to giving an output like 3bet = 15%, with no range to give it meaning. I don't think I can get hand ranges into the holdem hand range visualiser without creating an alias for all villains. For it to be accurate the alias should only include hyper heads up opponents from whatever buyin level I am currently playing or interested in analysing. Obviously in 6 months when I'm playing at a higher stake (hopefully) I would have to re-create the alias...lots of time...f'ing around...

Has anyone had experience with using PT (3, or 4 beta, or even HEM) to do this sort of analysis on the tendencies of multiple villains? I know there was an app for HEM 1 called holdem vision which looks like it does this sort of thing, but I can't find anything similar for PT.


Thanks if anyone can help me here. Below is some stuff I have learned which hopefully helps some of you:


PT4 users if you would like to see the average stats for the population of villains...
- View Stats -> My reports (also make sure you're in Tournament mode (the 'T' next to the '$')
- Click 'New Report'
- Select 'Player Report'
- Click 'Next'
- Select 'Position'
- Click 'Finish'
- On the left click 'filters' -> add new expression filter
- enter player.player_name != 'your_player_name' - replace 'your_player_name' with your player name (duh) with the single quotes included
- click 'save' then 'OK'

Make sure you save the report so you can open it easily afterwards. You can then add stats to the report such as VPIP to see the vpip of the average population in and out of position. At the 3.50 level on stars, I have a population VPIP of about 71% and 50% IP and OOP respectively. Also remember you can apply quick filters (bottom left of screen) for HUSNG reg/turbo/hyper etc which will have an effect on the results.

If you would like to see how the average population reacts to decreasing effective stacks, perhaps some of the custom stats in my post in the PT4 Port of Awesome Hud thread would be of use. It shouldn't be very hard to work out how to create your own stats from this.

Some links:

My PT4 forum post creating my first custom stat (raising donk bets):
https://www.pokertracker.com/forums/...p?f=58&t=40889

PT3 Database Schema (PT4 not released yet):
https://www.pokertracker.com/guides/...-documentation
Note that you need to replace any reference to "tourney_holdem_hand_..." with "tourney_hand_..." in PT4

My custom stats and hud edit for Awesome Hud (with thanks to quux and anyone else mentioned in the original post)
http://forumserver.twoplustwo.com/sh...9&postcount=35
Help - Using PT4 to analyse population tendencies Quote
06-08-2012 , 02:21 PM
yes, make an alias for all the players. then you get access to any of the tools. Easy way to only have appropriate players is to make a new database and only import your $3.50 hyper hand histories.
Help - Using PT4 to analyse population tendencies Quote
06-09-2012 , 09:56 PM
benjamin I did everything as you said and report is not working - I dont get any results at all. what could possibly went wrong? my filter expresion looks like that:

player.player_name != 'omnomnom11'


and dave how can I quickly make an alias for ALL the player?
Help - Using PT4 to analyse population tendencies Quote
06-09-2012 , 10:24 PM
no idea sorry, most likely will have to write an sql command for it I think.
Help - Using PT4 to analyse population tendencies Quote
06-09-2012 , 10:29 PM
There's a box in the filter that you have to uncheck, sorry I forgot to mention it - it took me ages to work out.

It's called "filter on active player", and it's in the expression filters dialog.
Help - Using PT4 to analyse population tendencies Quote
06-10-2012 , 07:53 AM
thanks, now its working
Help - Using PT4 to analyse population tendencies Quote
06-10-2012 , 07:58 AM
ty sir
Help - Using PT4 to analyse population tendencies Quote
06-10-2012 , 10:27 AM
Yeah hopefully there'll be more fun stuff to come...but we'll see
Help - Using PT4 to analyse population tendencies Quote
06-11-2012 , 07:09 PM
I have been also playing with this last few days. The other way to get population stats is to make report -> all players report with the same filter to exclude yourself. The advantage is that you can see all the players individually.

If you export report you can also calculate standard deviation (SD) of a given stat in Excel/openoffice.
I wanted to weight stats with low sample size with population tendencies (Bayesian Estimation, coffeeyay's article on husng.com). So, if you have mean values and SDs, you can easily build custom Bayesian-corrected stats by including the alpha and beta described there and use them on your HUD. (So you get readless stats there and/or corrected low sample size stats)

just duplicate and modify the stat Att To Steal for example:

original: (cnt_steal_att / cnt_steal_opp) * 100

modified: (cnt_steal_att + A) / (cnt_steal_opp +A+B ) * 100

where A and B will be the calculated alpha and beta values.

(just make sure if you use coffeyay's formula to divide percent stats and SD with 100 first - so you will use 0.65 instead of 65% for example)
Help - Using PT4 to analyse population tendencies Quote
06-11-2012 , 09:48 PM
That is very cool, I'll have to add that stat. ty.
Help - Using PT4 to analyse population tendencies Quote
06-18-2012 , 09:56 PM
Quote:
Originally Posted by _dave_
no idea sorry, most likely will have to write an sql command for it I think.
well, in these 2 hours i work on this and i think i have the query. It seems to work, but tomorrow after a good sleep i'll say you more.

EDIT: I'm sorry, I use this script for HEM, just too tired :S. I think it can work for PT4 too with some modifies.

gl

Last edited by tigerjack89; 06-18-2012 at 10:03 PM.
Help - Using PT4 to analyse population tendencies Quote
07-15-2012 , 04:31 AM
It Works!!!

Very special thanks to _dave_ who sorted this out for me. I am not much goodness with das computermachines talky language

So how to do it:
  • backup your database!
  • in PT4 you need to export all of your HUSNG hands to hand history files. This is because it is difficult to filter the SQL command for HUSNG only and it won't work if there are hands with >2 players at the table. You can do this in Database -> export hands -> advanced -> tournament, and select HU tourney's
  • create a new DB in PT4. Database ->Database management -> new. Name it something nice, like "all villains" or "general population". when working with data later, if it doesn't look right you may have the wrong database active
  • make the new database active in database management
  • import your exported hands into the new database, you now have a HUSNG only db!

Now, to create an alias for all villains in SQL:
  • open up PostgreSQL admin (pgadmin III in start menu)
  • doubleclick PostgreSQL DB... on left to open it up
  • click on your new db and click +
  • + schemas
  • + public
  • + tables
  • left click player -> view data -> view all rows
  • scroll to the bottom and note the last player name and the number in the id_player column (2nd from left, not the number in bold)
  • go back to the main pgadmin III screen and click the "execute arbitrary SQL queries" button (SQL note with pencil graphic)
  • enter this code:
Code:
UPDATE tourney_hand_summary SET id_winner = 1446 WHERE id_winner != 1 AND id_winner != 0 AND id_winner != -1;
UPDATE tourney_hand_player_statistics SET id_player = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1;
UPDATE tourney_hand_player_combinations SET id_player = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1;
UPDATE tourney_summary SET id_winner = 1446 WHERE id_winner != 1 AND id_winner != 0 AND id_winner != -1;
UPDATE tourney_results SET id_player = 1446 WHERE id_player_real != 1 AND id_player_real != 0 AND id_player_real != -1;
UPDATE player SET id_player_alias = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1;
  • replace all "1446" with the last player_id number from the player table. This will set your player alias as the last player in your DB
  • click "execute query" (green arrow)
  • you should not have any errors down the bottom
  • now it should be done. Open up PT4 and make sure your new db is the active one. It will usually default to your normal database.
  • under the player drop down menu, select "choose new player" and type in the last player name in the player_id table from earlier.
  • that should be it, look at the holdem heatmap and start messing around with filters to see what the average villain does!

Enjoy

Dave will hopefully have a look at this and check for any errors, I think I've got it right though.
Help - Using PT4 to analyse population tendencies Quote
07-15-2012 , 05:10 AM
Nice, thanks for the work (BtD and _dave_).
Help - Using PT4 to analyse population tendencies Quote
07-16-2012 , 06:39 AM
Maybe a mod can change the title of this thread to indicate that we have a solution and "help" is no longer required
Help - Using PT4 to analyse population tendencies Quote
07-16-2012 , 12:58 PM
one question benjamin.
The copied database have to be constantly updated? How?
Help - Using PT4 to analyse population tendencies Quote
07-17-2012 , 07:47 AM
You'll have to recreate the population db every time you want to update the stats in it. It's a pain but I think this is the only way at the moment.
Really not much is going to change for the population day-to-day so you're better off just updating it once you move up stakes and have enough hands to get an idea about the new population tendencies of your average villain.
Help - Using PT4 to analyse population tendencies Quote
08-27-2012 , 07:24 PM
Quote:
ERROR: duplicate key value violates unique constraint "tourney_hand_player_statistics_primary_key"

********** Error **********

ERROR: duplicate key value violates unique constraint "tourney_hand_player_statistics_primary_key"
SQL state: 23505
Get this error, any idea of what it can be?
Help - Using PT4 to analyse population tendencies Quote
08-27-2012 , 09:52 PM
it means you've got more than HU hands in your DB. need to be only HU hands, or it tries to merge together two villains taking different actions in the same hand.
Help - Using PT4 to analyse population tendencies Quote
08-28-2012 , 05:48 AM
Thanks dave!

I have no idea with actual coding stuff
Help - Using PT4 to analyse population tendencies Quote
08-28-2012 , 10:43 PM
After export, re-import i get this:

Quote:
********** Error **********

ERROR: duplicate key value violates unique constraint "tourney_hand_player_statistics_primary_key"
SQL state: 23505
Detail: Key (id_player, id_hand)=(13291, 459951) already exists.
Help - Using PT4 to analyse population tendencies Quote
08-28-2012 , 11:24 PM
have you got observed hands, or hands under another SN?

The above error cannot happen if the it's only you playing HU hands against various villains in the database. The code changes the id_player for all villains to the same number, it's attempting to do that twice for hand id 459951 for some reason. And failing, since the combination of player + hand must be unique.
Help - Using PT4 to analyse population tendencies Quote
09-06-2012 , 01:20 AM
Any Idea of how to separate my two accounts?
Help - Using PT4 to analyse population tendencies Quote
09-07-2012 , 12:22 AM
You should be able to export hands only from different sites

Database -> Export hands -> Advanced -> Tournament

Is this what you mean?
Help - Using PT4 to analyse population tendencies Quote
09-07-2012 , 07:32 AM
Nah, have an old account on stars, so theres 2 heros on stars and need to make one alias.
Help - Using PT4 to analyse population tendencies Quote
09-07-2012 , 09:12 PM
I think Dave is the person to ask here, however you may just be able to add an extra argument in the code, such as...

Code:
UPDATE tourney_hand_summary SET id_winner = 1446 WHERE id_winner != 1 AND id_winner != 0 AND id_winner != -1 AND id_winner != X;
UPDATE tourney_hand_player_statistics SET id_player = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1 AND id_player != X;
UPDATE tourney_hand_player_combinations SET id_player = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1 AND id_player != X;
UPDATE tourney_summary SET id_winner = 1446 WHERE id_winner != 1 AND id_winner != 0 AND id_winner != -1 AND id_winner != X;
UPDATE tourney_results SET id_player = 1446 WHERE id_player_real != 1 AND id_player_real != 0 AND id_player_real != -1 AND id_player_real != X;
UPDATE player SET id_player_alias = 1446 WHERE id_player != 1 AND id_player != 0 AND id_player != -1 AND id_player != X;
Where X is the player number of your second account in...

Quote:
+ schemas
+ public
+ tables
left click player -> view data -> view all rows
I'm not sure if this will work or help. I think _dave_ is the best person to ask about this as he did all the SQL code stuff. Also from memory player number 1 is my active player (i.e. my PS username). It may be different in your database.
Help - Using PT4 to analyse population tendencies Quote

      
m