Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Heads Up SNG and Spin and Gos Discussion of heads up Sit & Go and Spin and Go poker games. Sponsored by HUSNG.com, the leading heads up poker video site.

Reply
 
Thread Tools Display Modes
Old 06-25-2012, 09:00 AM   #51
genher
veteran
 
genher's Avatar
 
Join Date: May 2007
Location: Melbourne Australia
Posts: 2,931
Re: Script to analyze population tendency on HEM

@kasparovski what are you running HEM or HM2?
genher is offline   Reply With Quote
Old 06-25-2012, 12:07 PM   #52
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

Making Database backup you guys mean just export hands or other method?
noskill1 is offline   Reply With Quote
Old 06-25-2012, 12:22 PM   #53
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,295
Re: Script to analyze population tendency on HEM

hand export will do, as in you'll be able to recreate a database - but it's super slow. I'd use pg_dump + pg_restore, I think they're made easily accessible available in the pgadmin interface. won't lose any data and fast. worth reading about them. I think the hem/pt might have similar tools available too, not sure.
_dave_ is offline   Reply With Quote
Old 06-25-2012, 12:50 PM   #54
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by _dave_ View Post
hand export will do, as in you'll be able to recreate a database - but it's super slow. I'd use pg_dump + pg_restore, I think they're made easily accessible available in the pgadmin interface. won't lose any data and fast. worth reading about them. I think the hem/pt might have similar tools available too, not sure.
Im total green in these.

Could you tell me what I can find info how work with this?
noskill1 is offline   Reply With Quote
Old 06-25-2012, 01:32 PM   #55
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by noskill1 View Post
Im total green in these.

Could you tell me what I can find info how work with this?
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, iirc 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.
tigerjack89 is offline   Reply With Quote
Old 06-25-2012, 01:42 PM   #56
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by kasparovski View Post
lol, well, i re-read op and luckily i already had an alias with all my sn so no problem with that, how do i limit the number of players?

"The following error occurred when running this report: ERROR: 54001: stack depth limit exceeded"

? i can only see the result, not the reports, pf cards or hands.
If you are running HEM1, you have to run the script in the post #11. At the end of that, just before the last ";", you have to insert the code
Code:
AND p1.player_id < 4000;
This code insert the frst 4000 players.

Then you have to insert other 4000 players. Instead of the previous code, running the same query of post #11 inserting
Code:
AND p1.player_id >= 4000 AND p1.player_id < 8000
And continue until the end of your players.
tigerjack89 is offline   Reply With Quote
Old 06-25-2012, 05:57 PM   #57
kasparovski
journeyman
 
kasparovski's Avatar
 
Join Date: Feb 2008
Location: senses yo
Posts: 348
Re: Script to analyze population tendency on HEM

yes hm1. tyvm, will try it later.
kasparovski is offline   Reply With Quote
Old 06-27-2012, 03:12 PM   #58
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

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.
tigerjack89 is offline   Reply With Quote
Old 06-27-2012, 03:39 PM   #59
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

This is awesome, will be much helpful with some pictrues step by step.

I don't get 5 and 6 step

I made in HM1 Alias names 'Population'.

Open Query, made copy/paste "a) Code" , and what next?

Still don't get it what I have to do with this "12345" and 'Hero'. Im not sure what you mean. Even don't know where exactly paste it.

You are doing great job, its really awesome. Please help me with that. Thank you
noskill1 is offline   Reply With Quote
Old 06-27-2012, 07:27 PM   #60
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by noskill1 View Post
This is awesome, will be much helpful with some pictrues step by step.

I don't get 5 and 6 step

I made in HM1 Alias names 'Population'.
you don't have to made an alias as 'Population' by HEM, but by pgadmin. With the query in 4. you create an alias called 'Global alias', that is the same.
By HEM you have to create an alias with your nicknames on different skins; I named it 'Hero'.

Quote:
Open Query, made copy/paste "a) Code" , and what next?
Press F5 and run the code

Quote:
Still don't get it what I have to do with this "12345" and 'Hero'. Im not sure what you mean. Even don't know where exactly paste it.
When you execute the first query (by pressing F5), it returns a number. In the second query just replace 12345 with the number you obtained.
'Hero', as said above, it's the alias for your nicknames.

If you have other questions, post it
tigerjack89 is offline   Reply With Quote
Old 06-27-2012, 07:31 PM   #61
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

About PT4, it's difficult to create a 'Global alias'.
But Benjamin opens a 3d in the support forum, and maybe things can change if others support the request
Here the link
https://www.pokertracker.com/forums/...209259#p209259
tigerjack89 is offline   Reply With Quote
Old 06-27-2012, 08:00 PM   #62
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

THANK YOU!!!!!!
noskill1 is offline   Reply With Quote
Old 06-28-2012, 08:38 AM   #63
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

Hey Buddy again.

I figure out I made mistake last time I did it, cuz I didn't replace "Hero" with Aliast with my nickname.

I decide I will again open pgadmin and made it again what I did before, but will replace "Hero" by Alias name now.

I made all this and open Holdem manage, choose "Preflop Cards" filter, and:




Edit: Ok I read it few pages before and everything working now! Thank you

Last edited by noskill1; 06-28-2012 at 08:54 AM.
noskill1 is offline   Reply With Quote
Old 06-28-2012, 09:54 PM   #64
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

I see its only working for "Preflop Cards" options.

I was trying to see how opening % at 25BB deep population tendency is, and when I click "reports" I do not see any hand.

Anyone have same trouble?
noskill1 is offline   Reply With Quote
Old 06-28-2012, 11:21 PM   #65
genher
veteran
 
genher's Avatar
 
Join Date: May 2007
Location: Melbourne Australia
Posts: 2,931
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by noskill1 View Post
I see its only working for "Preflop Cards" options.

I was trying to see how opening % at 25BB deep population tendency is, and when I click "reports" I do not see any hand.

Anyone have same trouble?
works w everything for me. (i am on HM2)
genher is offline   Reply With Quote
Old 06-29-2012, 08:14 AM   #66
noskill1
newbie
 
Join Date: Nov 2011
Posts: 18
Re: Script to analyze population tendency on HEM

How would you move from HM1 to HM2 by most faster method?
noskill1 is offline   Reply With Quote
Old 08-14-2012, 06:34 PM   #67
mrbambocha
adept
 
mrbambocha's Avatar
 
Join Date: Sep 2009
Posts: 1,089
Re: Script to analyze population tendency on HEM

I cant get it to work properly in HEM2.
Either I get a really small sample or it crashes.
Any idea of what it could be?

And its really laggy overall though I have a good computer.
mrbambocha is offline   Reply With Quote
Old 08-31-2012, 03:20 PM   #68
Siriusz
journeyman
 
Siriusz's Avatar
 
Join Date: Jul 2011
Posts: 379
Re: Script to analyze population tendency on HEM

I get the same error message as noskill1 when I try to access the Reports or Preflop Cards tab. I did all the steps mentioned on tigerjack89's post.

I've got about 37k players on my database and I kept repeating step 5 until I got to
"AND p1.player_id >= 35000 AND p1.player_id < 40000;"

Any light here? Hem 1 btw

Thanks
Siriusz is offline   Reply With Quote
Old 08-31-2012, 03:50 PM   #69
ImCommitted
newbie
 
ImCommitted's Avatar
 
Join Date: May 2012
Posts: 41
Re: Script to analyze population tendency on HEM

Nice! ty
ImCommitted is offline   Reply With Quote
Old 09-01-2012, 12:48 AM   #70
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

Well, I think there is some limits in the memory postgresql can use.
A solution coul be to try to run HEM as administrator.

If it doesn't work, try to take a look at this, especially in the sections regarding HEM and postgresql; it is for postgresql 8.x, but I think it works also for 9.x
tigerjack89 is offline   Reply With Quote
Old 09-01-2012, 02:41 AM   #71
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,295
Re: Script to analyze population tendency on HEM

yeah there has to be an edit to postgresql.conf that bumps up the number of aliases allowed, good thinking!
_dave_ is offline   Reply With Quote
Old 09-02-2012, 07:46 PM   #72
SretiCentV
Pooh-Bah
 
SretiCentV's Avatar
 
Join Date: Oct 2006
Location: In the rear with the gear
Posts: 3,694
Re: Script to analyze population tendency on HEM

Sorry for the spam if not appropriate but my beta software creates an alias in HEM/HM2 for different player types (user defined if desired) without having to do the hard work in sql



The software is currently free and will remain so for the foreseeable future

SretiCentV is offline   Reply With Quote
Old 09-02-2012, 07:59 PM   #73
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

looks cool!! I think a lot of people will appreciate this software!
When I have more free time, I'll test it
tigerjack89 is offline   Reply With Quote
Old 09-04-2012, 03:44 AM   #74
mrbambocha
adept
 
mrbambocha's Avatar
 
Join Date: Sep 2009
Posts: 1,089
Re: Script to analyze population tendency on HEM

Tried the speed tweaks.
http://faq.holdemmanager.com/questio...6+Speed+Tweaks

Damn HEM1 is superfast now. Everything loads instantly.
The dump/restore is really good aswell, better then vacum/reindex i think.
HEM2 and PT4 is still slow as usuall, even thought they run on SQL x64-bit.


Also tweak windows abit in the registry and turned of unnessecary services that windows auto-start. Computer is lightening fast now. Never had a computer this fast before I dont even have time to react.

In fact, it also increased the speed of how fast I can register to tournaments!!

Anyone nows why HEM2 is so F* slow? Takes ages to do anything.
And PT4 allocates all my computer memory after about 2hours (4GB).
mrbambocha is offline   Reply With Quote
Old 09-04-2012, 04:38 AM   #75
tigerjack89
grinder
 
tigerjack89's Avatar
 
Join Date: Jun 2010
Posts: 460
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by mrbambocha View Post
Tried the speed tweaks.
http://faq.holdemmanager.com/questio...6+Speed+Tweaks

Damn HEM1 is superfast now. Everything loads instantly.
The dump/restore is really good aswell, better then vacum/reindex i think.
HEM2 and PT4 is still slow as usuall, even thought they run on SQL x64-bit.


Also tweak windows abit in the registry and turned of unnessecary services that windows auto-start. Computer is lightening fast now. Never had a computer this fast before I dont even have time to react.

In fact, it also increased the speed of how fast I can register to tournaments!!

Anyone nows why HEM2 is so F* slow? Takes ages to do anything.
And PT4 allocates all my computer memory after about 2hours (4GB).
So, the problem with alias is solved??
Never used HEM2 before, so I can't help you.
Anyway, to increase also Windows speed, take a look at this
http://www.ocztechnologyforum.com/fo...mp-Utilities-*
tigerjack89 is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 10:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2008-2010, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online