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

10-18-2016 , 03:19 PM
No matter what I do, it always crashes. It has only 2,3k players and still crashes.

How do I fix it?
Script to analyze population tendency on HEM Quote
10-18-2016 , 04:21 PM
Quote:
Originally Posted by Baraky
No matter what I do, it always crashes. It has only 2,3k players and still crashes.

How do I fix it?
I got it. It's the method in page 2 or 3 of this thread, for HM2. Thanks.
Script to analyze population tendency on HEM Quote
12-08-2016 , 03:07 AM
What am I looking for in pga? Theres nothing in there that is related to my hem2 database?
Script to analyze population tendency on HEM Quote
02-14-2017 , 12:34 PM
Anyone got time to help me with this through skype?
Script to analyze population tendency on HEM Quote
02-17-2017 , 07:03 PM
Hi,

I followed the instructions and it seems to work fine with HEM2 (10150 players).

Then I realized a few players are not included in the global alias.
I did it again and again, and the same Villains remain out of the global alias.
A friend of mine did a few SQL queries and told me that my Global alias included only 9041 players so more than 1.000 are missing.

Is tere any explanation about this?
How can I include all the field?
Script to analyze population tendency on HEM Quote
06-16-2017 , 02:39 PM
hi, somebody can tell me how to create an alias with less than 5000 players in hm2 please? i mean what enter in the query 1 in postgres and what enter in the 2nd? thanks
Script to analyze population tendency on HEM Quote
08-03-2017 , 08:25 PM
I think this just broke my hem2.....
Script to analyze population tendency on HEM Quote
08-25-2017 , 12:00 PM
So I did exactly what you said for hm2. Every went off without a hitch. No errors, nothing. When I open hem2 though and go to player up top, I have no new aliases or player names. Is it possible I missed something? Also will I be able to view the hud stats for the global alias? I have a ton of custom stats in notecaddy that would help tremendously to get pop. Tend. Thanks for any help!
Script to analyze population tendency on HEM Quote
06-22-2018 , 07:04 PM
Can this be done for HM3 somehow?
Script to analyze population tendency on HEM Quote
06-23-2018 , 11:30 AM
I'm not too familiar with it, but I believe HM3 doesn't use a real database so in that case no.
Script to analyze population tendency on HEM Quote
07-10-2018 , 07:52 AM
Hey, i read the whole thread, but couldnt find a working answer.

Did all the coding in pgadmin, no errors. Global Alias with alle players is created in HM2, i can see it, but when i click on it so select it, HM just crashes.

Tried everything but i cannot make it work. Its a huge database.

Anyone here made it work for big samplesize of players?

I have a ssd, i5, 16gb ram etc... so not bad, but still it crashes everytime
Script to analyze population tendency on HEM Quote
07-10-2018 , 10:24 AM
Can you change to other players or manually created aliases? If you have NoteCaddy Premium and create an alias with color ranges can you select that alias in the reports? Have you tried creating a smaller test database and doing the pgadmin alias steps again to see if it works in a smaller database?

If you want to send a download link to your \HM2Logs files to me via PM here or a support ticket on the hm.com site I can take a look and see if there is anything obvious. Chances are something you did in pgadmin corrupted the alias or the database.
Script to analyze population tendency on HEM Quote
08-14-2018 , 08:57 PM
Quote:
Originally Posted by Wisher
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.
Where exactly do we enter this extra data?

I'm using HM2 so this is what it would look normally...

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
;

Which part would we add the hands requirement? I have 216k player DB and need to cut this down significantly so that my HM2 doesnt crash.

Thanks!
Script to analyze population tendency on HEM Quote
08-28-2018 , 04:55 PM
Will pay $ for someone to walk me through the process of backing up postgreSQL and create a population alias.
Please have successfully done this before.

PM me.
Script to analyze population tendency on HEM Quote
10-02-2018 , 05:39 AM
I think I got this to work for HM2 after reading the instructions above. Hallelujah!

Anyhow, this may be a dumb question, but how exactly are you reviewing this data in HM2 to evaluate general population read-less tendencies? I'm mean specifically in the software, are you looking at the Opponents > Player Analysis screen? Are you running reports for specific scenarios and looking at the hole card grid?
Script to analyze population tendency on HEM Quote
11-11-2018 , 12:31 PM
Just tried this and now every time I go to click on Select Player in HEM it just crashes :/ any ideas?
Script to analyze population tendency on HEM Quote
11-15-2018 , 07:06 AM
Has anyone compared there results from their global alias with the opponents>summaries tab on hm2. They show very different results and not sure what to make of this? Cbet turn/river with the global alias is close to 50% for example. While on opponents > summaries that number is much lower closer to around 30%. Same for river cbet, and fold to turn and river cbets.
Script to analyze population tendency on HEM Quote
11-18-2018 , 06:07 AM
This is so noob. Do you guys even code?
Script to analyze population tendency on HEM Quote
12-19-2018 , 07:32 AM
hi, everybody. I did sereval Alias in holdem manager 3 to analyse the tendencies of differents king of vilains.I did it manually in HM3 and with PGadmin3 with the code posted if this forum to exclume me (hero) and to create an unknown alias with the rest of the players. Some of them contains sometimes more of 500 vilains. But they aren't arranged in alphabetical order in HM3 so it's very difficult to find easily each player if i want to change the alias for a particular player.
- Somebody here know how to fix it please?
Script to analyze population tendency on HEM Quote
12-19-2018 , 09:25 AM
Quote:
Originally Posted by NORMAN86
hi, everybody. I did sereval Alias in holdem manager 3 to analyse the tendencies of differents king of vilains.I did it manually in HM3 and with PGadmin3 with the code posted if this forum to exclume me (hero) and to create an unknown alias with the rest of the players. Some of them contains sometimes more of 500 vilains. But they aren't arranged in alphabetical order in HM3 so it's very difficult to find easily each player if i want to change the alias for a particular player.
- Somebody here know how to fix it please?
HM3 does not use PostgreSQL or PGAdmin. It uses a SQLite database.

The Select Player menu lists hero and alias names at the top by default and they are sorted by total number of hands. You can click any column to sort them in a different order or use the search field in the upper right corner to find them quickly. Previously selected alias/hero names will show up in the drop-down menu when you first click the button to change players.
Script to analyze population tendency on HEM Quote
12-19-2018 , 11:29 AM
sorry i'm using HM2 not HM3.
So do you want to know if it's possible on HM2?
Script to analyze population tendency on HEM Quote
12-19-2018 , 12:07 PM
In HM2 you have to click to sort the select player menu by name or cash/tourney columns or use the search field.
Script to analyze population tendency on HEM Quote
12-19-2018 , 03:02 PM
i know but i'm talking about the "player site names" column
for exemple for my alias named "FISH" , i have 500 players inside. It seems they are sorted at random so if i want to take off one of them of the FISH alias list, it's very difficult to find it. so i would like to know how HM2 sort the players puted in this column and if it's possible to sort it by alphabetical order?
Script to analyze population tendency on HEM Quote
12-19-2018 , 03:56 PM
Oh, I misunderstood your question. It is not possible to sort the Edit Aliases list. I don't know enough about this script to know if it is possible to have it create the alias in alphabetic order.
Script to analyze population tendency on HEM Quote
01-06-2019 , 08:29 AM
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.
Hey I go to do with this tut, and I think I do correctly, but - in this global alis it also include me(yes I create alias for Hero, name 'Hero') - so I delete myself from this alias but - counts of hands still be same, why? Or I tried delete some players, but counts of all hands in this global alias, still be same, what is wrong?
Script to analyze population tendency on HEM Quote

      
m