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 11-26-2014, 10:29 AM   #101
kochpat
stranger
 
Join Date: Feb 2012
Posts: 11
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by nunoricardovaz View Post
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?
it will yield the same results... but with <1000 players it is very time consuming! Before I have discovered this thread I tried your way by programming an automatization script with "WinAutomator". It wasnt very stable though
kochpat is offline   Reply With Quote
Old 11-26-2014, 10:34 AM   #102
kochpat
stranger
 
Join Date: Feb 2012
Posts: 11
Re: Script to analyze population tendency on HEM

Thanks so much to everybody who has contributed to this thread! It worked quite well for me!

I would like to do an alias with only a certain player group (e.g. regular players - based on VPIP/PFR)! Can anybody help me with that? I'd really appreciate it!
kochpat is offline   Reply With Quote
Old 08-15-2015, 11:17 AM   #103
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

Hey, I think its very important/fastest to add to alias only player where his hand > x... for some stats which you want to get

I am not sure, but if you want for example average % open by position (for example steal on SB), then you need add villians only which player more than 1000hands. If you add <1000hands or all players then it will be very inaccurate result. (?)

Please can anyone, post code of query with this function? Thanks a lot.
Davson is offline   Reply With Quote
Old 08-15-2015, 01:35 PM   #104
uczniak
grinder
 
Join Date: Sep 2008
Location: London, UK
Posts: 582
Re: Script to analyze population tendency on HEM

On the contrary, your method would be inaccurate cause the alias created this way would be skewed towards regs. Including players with even 1 hand will not be inaccurate, as we will not be looking at their individual stats, but at an aggregate.

Hope this helps
uczniak is offline   Reply With Quote
Old 08-15-2015, 02:16 PM   #105
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

I see, but how then HEM do average/some calculation
lets say I have in alias 10 player, every have about 100 hands and their steals from SB are:
0, 80, 57, 25, 100, 40, 70, 0, 10, 33
and I want stat sb steal

Could you tell me please, how then HEM count it? If it would be be just average with this numbers, then it wouldnt be good, even if I have 1000 players with 100hands. I cant imagine how other can count it, maybe with "modus" but I dont know

Last edited by Davson; 08-15-2015 at 02:25 PM.
Davson is offline   Reply With Quote
Old 08-15-2015, 02:25 PM   #106
uczniak
grinder
 
Join Date: Sep 2008
Location: London, UK
Posts: 582
Re: Script to analyze population tendency on HEM

Why isn't it good for you?
uczniak is offline   Reply With Quote
Old 08-15-2015, 04:01 PM   #107
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

because if I will do average of values which are much variable, then I cant get reliable result.
You know
100hand: 0, 80, 57, 25, 100, 40, 70, 0, 10, 33
1000hand: 30, 45, 40, 26, 38, 34, 50, 54, 32, 44
... do average on this...
Davson is offline   Reply With Quote
Old 08-15-2015, 04:12 PM   #108
denysalin
enthusiast
 
Join Date: Nov 2014
Location: just below EV
Posts: 68
Re: Script to analyze population tendency on HEM

because when you analyze the population tendencies your goal is to see what people in general do. Imagine you have 100 people that have 100% steal from sb and 100 people that have 0% steal from sb . In average is 50%, but it's far from being even a decent estimation.
Instead, if you have 200 people that have 75%+-5% steal from sb .. this is a better estimation. Sure the things are more complicated and we should analyze the standard deviation , 6 sigma and so on ..but I'm no expert in maths and I stop here
denysalin is offline   Reply With Quote
Old 08-15-2015, 06:29 PM   #109
uczniak
grinder
 
Join Date: Sep 2008
Location: London, UK
Posts: 582
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by Davson View Post
because if I will do average of values which are much variable, then I cant get reliable result.
You know
100hand: 0, 80, 57, 25, 100, 40, 70, 0, 10, 33
1000hand: 30, 45, 40, 26, 38, 34, 50, 54, 32, 44
... do average on this...
This is untrue.
uczniak is offline   Reply With Quote
Old 08-15-2015, 06:38 PM   #110
uczniak
grinder
 
Join Date: Sep 2008
Location: London, UK
Posts: 582
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by denysalin View Post
because when you analyze the population tendencies your goal is to see what people in general do. Imagine you have 100 people that have 100% steal from sb and 100 people that have 0% steal from sb . In average is 50%, but it's far from being even a decent estimation.
Instead, if you have 200 people that have 75%+-5% steal from sb .. this is a better estimation. Sure the things are more complicated and we should analyze the standard deviation , 6 sigma and so on ..but I'm no expert in maths and I stop here
With regard to putting people on ranges, it's better to look at cards that eventually go to showdown, keeping in mind the bias caused by that.

However with many stats you are only interested in frequencies. E.g. change the "steal from sb" in your example to "fold to steal" and if I have no reads (i. e. way of guessing whether a given player is the 0% orthe 100%) all that I am interested in is how often my steal will work. Which is 50%.

Otherwise in many cases where we want to use population tendencies it will be even better to look only at the small sample villains. This is because, when we are facing an unknown player, he is way more likely to be a recreational than a reg (assuming we are a reg in the games ourselves).

So in short, you're both wrong
uczniak is offline   Reply With Quote
Old 08-16-2015, 03:33 AM   #111
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

Quote:
Otherwise in many cases where we want to use population tendencies it will be even better to look only at the small sample villains. This is because, when we are facing an unknown player, he is way more likely to be a recreational than a reg (assuming we are a reg in the games ourselves).
Thats good point, but still you dont know, or do not tell me, how/why HEM would count it/why count right on small sample size
Davson is offline   Reply With Quote
Old 08-16-2015, 03:44 AM   #112
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,278
Re: Script to analyze population tendency on HEM

The sample size of the aliased players isn't relevant. it works the same as one player with an aggregate sample of everybody in the alias. a single player with a single hand won't throw the data off with a 100% value, since they are only one opportunity also.
_dave_ is offline   Reply With Quote
Old 08-16-2015, 06:41 PM   #113
balls'n'all
journeyman
 
Join Date: Jan 2009
Posts: 231
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by kochpat View Post
Thanks so much to everybody who has contributed to this thread! It worked quite well for me!

I would like to do an alias with only a certain player group (e.g. regular players - based on VPIP/PFR)! Can anybody help me with that? I'd really appreciate it!
Does anyone know if this is possible ? I would like to create an alias for opponents with vpip< 15, vpip 15 -18 etc.
balls'n'all is online now   Reply With Quote
Old 09-21-2015, 10:41 AM   #114
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

Hi, I want analyze only for example TAGS, I have about 100nicknames of TAgs, its possible to create query with function add to alias people by nicknames? (so I just will copy nicks to query...). I can pay for it some smaller amount. PM me thanks
Davson is offline   Reply With Quote
Old 09-21-2015, 10:52 AM   #115
kochpat
stranger
 
Join Date: Feb 2012
Posts: 11
Re: Script to analyze population tendency on HEM

I have automized the process of adding nicknames with WinAutomation! Worked fine for over 10000 players.

Hope that helps.
kochpat is offline   Reply With Quote
Old 09-21-2015, 11:12 AM   #116
Davson
journeyman
 
Join Date: Mar 2014
Posts: 327
Re: Script to analyze population tendency on HEM

I see, so it just recorded process what you did manually?, I cant imagine how it works, it mast still works quite slowly probably, only you can go away from keyboard and keep it work no? Could you please describe the manually process? If I want do manually or record it to macro, I will probably check the nickname, go to hem > add players to nick name -> pressing his first letter in nick and add it (so I cant imagine how you did it..)
Davson is offline   Reply With Quote
Old 11-17-2015, 11:19 AM   #117
SuddenlyGood2
adept
 
SuddenlyGood2's Avatar
 
Join Date: Aug 2014
Location: London
Posts: 899
Re: Script to analyze population tendency on HEM

Hi I tried to use this, but only read the start of the thread before executing any commands. So I used the original instructions (create the alias in HM2 and then run the two queries in PGPadmin).

It seemed to work. I exited HM2. Restarted.

now whenever I go to select the player from the player list hm2 crashes.

I tried database maintenance and ran a 'standard' vacuum and reindex, it's still crashing...

so I went to aliases, and deleted the alias,

and now when I go to select players from player list it works fine again
SuddenlyGood2 is offline   Reply With Quote
Old 11-22-2015, 02:26 PM   #118
yami
newbie
 
Join Date: Apr 2015
Posts: 34
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by tigerjack89 View Post
A brief summary of the things to do to create an alias of all players.
Any idea how to do this but without Hero nick in this alias?
Obvious i could do that manually in HM2 - but HM2 does not search for player right when i press frist letter it does not find this nick.

Ok - now it works also for me did not check correclt this point:
"select VACUUM, check FULL and ANALYZE and click OK. " ~!

What i did:

1. did Back-up of the database.
2. made Alias new -> with my nick only Share.Pho.to | This photo set was shared via Share.Pho.to
3. closed HM2
4. opened SQL PG admin
5. opened Database the same name as above
6. made
Code:
INSERT INTO players (playername, pokersite_id, cashhands, tourneyhands, optimizationstatus, icon)
VALUES ('Global alias', -1, 0, 0, 0, 0)
RETURNING player_id;
this returned number:
12537

7.
did:
Code:
INSERT INTO aliases 
SELECT 12537, 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
;
result on another try with number 12538 - this time:
http://i.imgur.com/Zw1bz7p.png - 7125 rows
http://i.imgur.com/GHad926.png - but i do not see output here, is that normal?

8.
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.
http://i.imgur.com/SD1OP8h.png
b) Select REINDEX and click OK; again, at the end click on Done.
http://i.imgur.com/GZhVslV.png

did that closed PG admin,
opened HM2, and what i saw was
globalAliases with nicks.


and "ALL" has one nick, my nick

Last edited by yami; 11-22-2015 at 02:51 PM.
yami is offline   Reply With Quote
Old 11-24-2015, 02:41 PM   #119
yami
newbie
 
Join Date: Apr 2015
Posts: 34
Re: Script to analyze population tendency on HEM

Hey, i created global alias for all players and discard from them Hero, so i can think of populacy tendency checking:
Hold'em Hole Cards count

1.
How i created this allias?
like in the post above and
i deleted Hero manually in HM2 from the list.

2.
What's the problem?

When i have 3 way game, and discarder hero, then hero of the note becames one of the opponents(one of two).
I do not see any duplicated note.

So when i made search:
Hero BTN, AI pre-flop->true
i Find AKs that BTN had -> then i searched again for this hand, but
in this situation SB had JJ - and raised AI.

What i did:
Share.Pho.to | This photo set was shared via Share.Pho.to

but as you can see for this note HM2 still counts BTN with AKs, and additionaily show AKs on the Hold'em Hole Cards count when i;m 100% sure that SB here had JJ :/


Can you help me with that matter so
Hold'em Hole Cards - can work fine ?
yami is offline   Reply With Quote
Old 12-08-2015, 05:35 PM   #120
yami
newbie
 
Join Date: Apr 2015
Posts: 34
Re: Script to analyze population tendency on HEM

When i add many players like ~~25k HM2 crashes, is there a method to increase the size before HM2 crashes ??

and yes - i was using this:

[spoiler]
AND p1.player_id >= 5000 AND p1.player_id < 10000;
[/spoiler]

many times..
yami is offline   Reply With Quote
Old 04-25-2016, 03:38 AM   #121
Casher23
centurion
 
Casher23's Avatar
 
Join Date: Jan 2008
Location: SPECTRE
Posts: 150
Re: Script to analyze population tendency on HEM

Hi Guys,

as here are many experts regarding the PostgreSQL Databse, I ask in this thread. Does anyone of you know, how I can access the opponents table of HEM2? I don´t know how it is named and can´t find it...

Thank you
best regards
Casher23 is offline   Reply With Quote
Old 06-06-2016, 12:45 PM   #122
bettinglife
journeyman
 
Join Date: Nov 2011
Location: Portugal
Posts: 243
Re: Script to analyze population tendency on HEM

I was trying to do this on PT4, but it seems that that HM2 is the only one that will work for non heads up hands.
Could you guys tell me if it's possible to create a alias, weather it's automatic ( thru sql code '' or manually by adding each player, if it's possible to create an alias to analyze the population tendencies for >3 handed? and analyze the showdown hole card range?

thank you so much in advance!
bettinglife is offline   Reply With Quote
Old 07-04-2016, 01:57 PM   #123
Baraky
newbie
 
Join Date: May 2011
Posts: 38
Re: Script to analyze population tendency on HEM

How do I delete this alias through postgres? It bugged my HM2, probably because I have too many hands. Please help, because if I have to reinstall postgress because of this, it's going to be a huge problem.

-> Edit: Just deleted the whole database through postgres. Worked.

Last edited by Baraky; 07-04-2016 at 02:24 PM.
Baraky is offline   Reply With Quote
Old 08-09-2016, 10:31 PM   #124
Falcore
newbie
 
Join Date: Oct 2015
Posts: 20
Re: Script to analyze population tendency on HEM

Quote:
Originally Posted by tigerjack89 View Post
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 guys, I followed Tigerjack89's instructions above and performed a test with a small database consisting of around 7000 players, and the instructions worked. When I created a full database consisting of around 14000 players, I ran it again, this time using step 6 (for databases consisting of more than 10000 players) and I got this error message:

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

I thought it was because I had misunderstood some aspect of the additional instruction, and created a new DB of around 9800 players to keep me under 10000 players so I wouldn't have to use the instructions detailed in step 6, but surprisingly when I followed the steps again with this sub-10000 player DB, I'm still getting the same error. Anybody have any idea what the problem is and how I can fix it?
Falcore is offline   Reply With Quote
Old 10-04-2016, 11:57 AM   #125
Baruka
centurion
 
Join Date: Dec 2012
Posts: 113
Re: Script to analyze population tendency on HEM

Worked fine for me. But as some previous poster said, is it possible to discard Hero's nickname from the players?
Baruka 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 06:20 PM.


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