Open Side Menu Go to the Top
Register
Script to analyze population tendency on HEM Script to analyze population tendency on HEM

09-04-2012 , 04:53 AM
Works only in hm1, but i think hem2 can take use of the gloabal alias better.
Script to analyze population tendency on HEM Quote
09-04-2012 , 05:05 AM
Quote:
Originally Posted by mrbambocha
Works only in hm1, but i think hem2 can take use of the gloabal alias better.
Maybe genher can help you, he uses HEM2 and aliases without problems.
Questions: do you have different databases for HEM1/HEM2? Have you tried to dump/restore also HEM2 database?
Also, HEM2 databases are slightly different from HEM1, so the procedure to create an alias is different.
Script to analyze population tendency on HEM Quote
09-04-2012 , 09:55 PM
Well I don't know
I have created a new database first, vacuum and reindexed it then just followed the process above to the letter and it works fine in HM2.

obv queries are a bit slow cause the data is huge but otherwise works fine
Script to analyze population tendency on HEM Quote
12-28-2012 , 11:15 AM
Do you guys have any idea of how many players we can fit in into one alias?
Script to analyze population tendency on HEM Quote
12-28-2012 , 12:21 PM
Quote:
Originally Posted by mrbambocha
Do you guys have any idea of how many players we can fit in into one alias?
Have not found a limit yet.
Depends on what you consider as "can fit".
From a DB perspective - no worries to have tables with more than a million rows.
However, not sure how HEM1/2 will handle those.
Guessing it's a 32 bit piece of software it may have an issue with an array of more than 4,294,967,295 values.
In terms of it being useful - depends on your computer config a lot.
Script to analyze population tendency on HEM Quote
12-28-2012 , 02:02 PM
Ok so it should be any problem with a DB between 10.000-50.000 players?

Im running the HEM2 pop alias on a 64-bit Core i5 2,4GHz laptop with 4GB ram, and a standard HDD with 13.000 villains but I just gets stuck and crashes every time I run it. Ive tested with 3000 players and that works fine.
Script to analyze population tendency on HEM Quote
12-28-2012 , 04:52 PM
Questiong for later use when Ive figuared out what the problem for the above is.

What steps/codes do I need to take if I have four heros?
Script to analyze population tendency on HEM Quote
03-04-2013 , 12:14 AM
I have not tried any of this yet. Question, say I want to analyze my entire database's call in BB % when I open shove the button first hand in a 300 chip super turbo, is this possible? I don't need an explanation (for now) on how to do it if it is possible, I just want to know if its possible. I will read the thread over later. But could I analyze my entire DB this specifically? I am using HM1
Script to analyze population tendency on HEM Quote
03-05-2013 , 04:39 PM
yes it is
Script to analyze population tendency on HEM Quote
04-22-2013 , 11:07 AM
Hi,

I use HM2 and did the process that tigerjack89 explains, but i can't make it to work.

I do all the things in pgAdmin. The problem is when i'm trying to open the Aliases on HM2.



When i try to select the Population, the HM2 stays a bit more slow, but do nothing.

This already happen to anyone?

Now, if i let it open a bit, after trying to change to Population and failed, this message appears:



Thanks (Sorry about my english)

Last edited by Hipo; 04-22-2013 at 11:15 AM.
Script to analyze population tendency on HEM Quote
04-22-2013 , 02:53 PM
Quote:
Originally Posted by Hipo
Hi,

I use HM2 and did the process that tigerjack89 explains, but i can't make it to work.

I do all the things in pgAdmin. The problem is when i'm trying to open the Aliases on HM2.



When i try to select the Population, the HM2 stays a bit more slow, but do nothing.

This already happen to anyone?

Now, if i let it open a bit, after trying to change to Population and failed, this message appears:



Thanks (Sorry about my english)
how many players have you got in your DB?
Script to analyze population tendency on HEM Quote
04-22-2013 , 03:38 PM
Quote:
how many players have you got in your DB?
In that DB just about 1K. Can't understand why HM2 can't manage it.

Thanks
Script to analyze population tendency on HEM Quote
04-22-2013 , 04:19 PM
dunno...should be working.
Script to analyze population tendency on HEM Quote
04-23-2013 , 01:50 PM
Already fixed it. Just had to limit the results to less than 1K.

Could you tell me what tab do you use to analyse the results? The Reports, or Active Session?

Thank You
Script to analyze population tendency on HEM Quote
04-23-2013 , 04:12 PM
I limit mine to 14000 players and it works. You can use anything you like to look at the results. Any tab should work exactly as if there was only one player. be a bit patient thou because obv there is a lot of data to process it takes a few min for inquiries to work
Script to analyze population tendency on HEM Quote
05-09-2013 , 03:01 AM
Bump.

A question is it possible to somehow filter the players for number of hands? For example I only want players I played 30 hands or less with in the alias.
Script to analyze population tendency on HEM Quote
05-09-2013 , 05:59 AM
Quote:
Originally Posted by NiSash1337
Bump.

A question is it possible to somehow filter the players for number of hands? For example I only want players I played 30 hands or less with in the alias.
Yes. In HEM, unlike in PT4, there is a column in the players table which notes the number of tourney and number of cash game hands the opponent has played.
So you can just extend the WHERE clause of the query to have "AND tourney_hands > 30".
Note: Above is sample extension, not sure if I recall the column name exactly.

tl;dl; Yes. It is possible.
Script to analyze population tendency on HEM Quote
05-09-2013 , 07:41 AM
Cool thank you!
Script to analyze population tendency on HEM Quote
11-30-2013 , 10:09 PM
Quote:
Originally Posted by tigerjack89
A brief summary of the things to do to create an alias of all players.


0. Before make any changes in your database, make sure you have a backup.
To create a backup of your database, you have to open your pgadmin by Start>All programs>Postgresql X.X> pgadmin. Then connect to "PostgreSQL" and insert your user and password if requested and right click on your database.
After that, you can choice the "Backup" option and select the name and folder of your backup file. Make sure that at the end of the process it returns the 0 exit code (means no error).

To restore the database, the correct procedure is to create a new database by HEM, then open pgadmin III, right click on the created database and then choice "Restore". At this point, you have to select the file containing the database backup and click ok. Again, make sure there are no errors at the end of the process.


1. After the backup, first of all you have to create an alias for your nicknames. It's simple to do that on HEM: in HEM1, for example, click on Options>Player Aliases, then click on Add alias, choice a name for it (ie Hero) and then add to it all your nicknames clicking on Add Player. I don't use HEM2, but I assume the process is the same.


2. Open your pgadmin by clicking on Start> All Programs> PostgreSQL X.X (for me it's 9.0) and click on pgadmin. Once opened, expand Server and double-click on PostgreSQL X.X (localhost: yyyy). If required, enter the password. At this point you have to expand Databases and click on your database of interest (for me it's SNG HU).


3. Then you have to open the query tools by Tools> Query tools. When the new window opens, make sure you are using the correct database checking the window title (for me it's Query - SNG HU on ...). Then insert the codes listed below. For every code, you have to run it by clicking on Query>Execute (or just press F5). If you have to insert a new code, open a new query window by clicking File>New window (or just press CTRL+N)



At this point the things changes if you are using HEM1 (a) or HEM2 (b).
4.Run this query. It create the new alias 'Global alias' and return its id; note the number, it will serve you in a minute.

a)
Code:
INSERT INTO players (site_id, playername, cashhands, tourneyhands, playertype_id)
VALUES (-1, 'Global alias', 0, 0, 0)
RETURNING player_id;
b)
Code:
INSERT INTO players (playername, pokersite_id, cashhands, tourneyhands, optimizationstatus, icon)
VALUES ('Global alias', -1, 0, 0, 0, 0)
RETURNING player_id;

5. Assume that the number returned by the previous query is 12345.
Then populate the alias with this code. You have to replace "12345" with the number returned by the previous query and "Hero" with the alias name choosed for your nicknames in step 1 (not your nickname!!! ).

a)
Code:
INSERT INTO aliases 
SELECT 12345, p1.player_id
FROM players p1
WHERE p1.player_id NOT IN
(
	SELECT a1.player_id
	FROM aliases a1
	WHERE a1.aliasplayer_id = 12345
	-- to exclude players yet inserted
)
AND p1.player_id NOT IN
(	
	SELECT a2.player_id
	FROM players p2 JOIN aliases a2 ON p2.player_id = a2.aliasplayer_id
	WHERE p2.site_id = -1 and p2.playername = 'Hero'
	-- to exclude hero nicknames from the insert	
)
AND p1.site_id <> -1
-- to exclude other aliases
;
b)
Code:
INSERT INTO aliases 
SELECT 12345, p1.player_id
FROM players p1
WHERE p1.player_id NOT IN
(
	SELECT a1.player_id
	FROM aliases a1
	WHERE a1.aliasplayer_id = 12345
	-- to exclude players yet inserted
)
AND p1.player_id NOT IN
(	
	SELECT a2.player_id
	FROM players p2 JOIN aliases a2 ON p2.player_id = a2.aliasplayer_id
	WHERE p2.pokersite_id = -1 and p2.playername = 'Hero'
	-- to exclude hero nicknames from the insert	
)
AND p1.pokersite_id <> -1
-- to exclude other aliases
;

6. If your database has more than 10 000 players, the first time you run the script you have to separate the players in different groups. At the end of code in step 5 (before the last semicolon) insert this code and run it
Code:
-- ...all the previous code above...
AND p1.player_id < 5000;
Then, as above, insert at the end of the code in step 5 this code and run it
Code:
-- ...all the previous code above...
AND p1.player_id >= 5000 AND p1.player_id < 10000;
Continue until you inserted the whole players.

For the next times you have to execute only code in step 5.


7. Optimize your database. To do it right-click on your database by pgadmin (for me it's SNG HU) and:
a) click on Maintenance, select VACUUM, check FULL and ANALYZE and click OK. When it completes, click on Done.
b) Select REINDEX and click OK; again, at the end click on Done.


8. Now you can close pgadmin and look at your alias on HEM. If you had it opened restart it and ... enjoy!!


NB: I'm sorry for my bad English. Some terms can be different on your pgadmin because I don't use an English version.
Any help with the work on the Global Alias is appreciated.
I'm having a major problem accessing pgAdmin III. It is requesting a password which I do not have. Does anyone know how I can move forward? I've read the online documentation and I can't find a password in my files. I tried every password I've ever used and nothing works. Any ideas?
Script to analyze population tendency on HEM Quote
11-30-2013 , 10:19 PM
Quote:
Originally Posted by slapUpappy
I'm having a major problem accessing pgAdmin III. It is requesting a password which I do not have. Does anyone know how I can move forward? I've read the online documentation and I can't find a password in my files. I tried every password I've ever used and nothing works. Any ideas?
PT3's default name/password is - postgres/dbpass
HM's default name/password is - postgres/postgrespass
You might also want to try svcPASS83

If that doesnt help:

1. Go to C:\Program Files\PostgreSQL\8.x\data, move the the pg_hba file to your Desktop and open it with notepad.
2. Scroll to the bottom and change all md5 to trust. Save and close the file
3. Move the file back to the data folder
4. Restart the PostgreSQL service: Control Panel -> Administrative Tools -> Services

HM/PGAdmin will accept any password now.

http://faq.holdemmanager.com/questio...8PostgreSQL%29
Script to analyze population tendency on HEM Quote
11-30-2013 , 10:50 PM
Quote:
Originally Posted by fozzy71
PT3's default name/password is - postgres/dbpass
HM's default name/password is - postgres/postgrespass
You might also want to try svcPASS83

If that doesnt help:

1. Go to C:\Program Files\PostgreSQL\8.x\data, move the the pg_hba file to your Desktop and open it with notepad.
2. Scroll to the bottom and change all md5 to trust. Save and close the file
3. Move the file back to the data folder
4. Restart the PostgreSQL service: Control Panel -> Administrative Tools -> Services

HM/PGAdmin will accept any password now.

http://faq.holdemmanager.com/questio...8PostgreSQL%29
Fozzy, you're a genius. Thanks.
Script to analyze population tendency on HEM Quote
11-30-2013 , 11:10 PM
Quote:
Originally Posted by slapUpappy
Fozzy, you're a genius. Thanks.
The basics I can help with but I have never tried using this script so if you have problems with the actual script then one of the other guys that are smarter than me will need to help.
Script to analyze population tendency on HEM Quote
04-18-2014 , 10:13 AM
Did anyone managed to do something like this for PT4? Can't get HEM2 to work with alias and HEM1 filters not working good enough.
Script to analyze population tendency on HEM Quote
07-18-2014 , 03:03 AM
hi
I tried to run script but it crash HM2. What would be the code to select only players that have >100 hands ? I tried to paste AND tourney_hands > 100 and it returns a error message "tourney hands doesn't exist"
thanks for help
Script to analyze population tendency on HEM Quote
08-29-2014 , 10:18 PM
Hey guys.

Is it not possible to see the pop tendencies just by creating a PlayerAlias (in Edit Aliases) and selecting all the players we want, one by one?
Script to analyze population tendency on HEM Quote

      
m