Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2005, 04:20 PM
DavidC DavidC is offline
Senior Member
 
Join Date: Aug 2004
Location: Ontario, Canada
Posts: 292
Default PT Help please

I'd love to know the raked hand % on 4-handed and 5-handed games at 2/4 full ring games.

I've used the ring game stats filter thing to filter out only hands with between 4 & 4 players, but when I go into the summary tab, the hands aren't filtered and I can only get aggregate stats, which I don't want.

If anyone knows how to do this, I'd appreciate advice! [img]/images/graemlins/smile.gif[/img]

--Dave.
Reply With Quote
  #2  
Old 09-03-2005, 07:38 PM
_dave_ _dave_ is offline
Junior Member
 
Join Date: Feb 2005
Location: UK
Posts: 17
Default Re: PT Help please

Hi DavidC,

I thought this was quite an interesting subject, mainly I have been thinking about doing something like this sort of analysis with interest in locating the best limit for clearing bonuses that have raked hand requirements. Never got round to it though, until now.

You will need to know the database name you wish to query, use Poker Tracker "File -> Maintain Database Names" to find this name. In my code below, ptrack8 is my database name.

Copy & Paste the following code into windows notepad, and save in the same folder as your poker tracker database. Usually this is "C:\Program Files\Poker Tracker V2". Save file as "rakedhands.js" - name not important, .js extension required. This is Windows JScript code.

You can alter the min/max players, the limit, and the minimum rake required to count as a raked hand also.

Enjoy,

Dave.

<font class="small">Code:</font><hr /><pre>
///// change settings here /////

var minrake = 0.01;
var minplayers = 4;
var maxplayers = 5;
var level = '$2/$4';
var ptdb = 'ptrack8';

////////////////////////////////

var db = new ActiveXObject("ADODB.Recordset");
var cstring = "Driver={Microsoft Access Driver (*.mdb)};DBQ="+ptdb+".mdb";

var sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players &gt;= " + minplayers
+ " AND game.number_of_players &lt;= " + maxplayers
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"

db.Open(sql, cstring, 1, 3);
var totalhands = db(0)+0;
db.Close();

var sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players &gt;= " + minplayers
+ " AND game.number_of_players &lt;= " + maxplayers
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"

db.Open(sql, cstring, 1, 3);
var rakedhands = db(0)+0;
db.Close();

var pcnt = Math.round(rakedhands / totalhands * 10000)/100;

WScript.Echo("Number of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%");



</pre><hr />
Reply With Quote
  #3  
Old 09-04-2005, 02:01 AM
DavidC DavidC is offline
Senior Member
 
Join Date: Aug 2004
Location: Ontario, Canada
Posts: 292
Default Re: PT Help please

Awesome!

Thank you very much for your help.

I'll post my results for 2/4 in a bit.
Reply With Quote
  #4  
Old 09-15-2005, 07:25 PM
DavidC DavidC is offline
Senior Member
 
Join Date: Aug 2004
Location: Ontario, Canada
Posts: 292
Default Re: PT Help please

Hey man... just thought I'd put in an update here.

I ran your script: very cool by the way. It's been a long time since I looked at code.

For games between 4 and 5 players, I had about 40% raked [img]/images/graemlins/frown.gif[/img].

This might actually be a good thing if you're playing more hands per hour there, though.

However, when I ran the filter in PT it gave me something like 2400 hands, and your script gave me 2800 hands. All my observed hands are going into another DB rather than the one specified in the script, so I'm a little weirded out by it, but that's not so bad... Maybe it's counting hands where I'm sitting out... this is pretty common for me as I come and go through tables quickly.

---

I wish I knew more about javascript. [img]/images/graemlins/frown.gif[/img]

Maybe it's possible that if players were posting incomplete blinds that it didn't show up as a 2/4 game or something...

------------------------------------------------

I edited the script a bit, and please don't take offense. I'm a pretty bad programmer so I "personalized" the variables section of the code, and I don't know how to write a function in javascript, so I cut-and-pasted (!)... but here's what I adapted the script to. I couldn't have done it without the basic framework and the sql queries. Thanks.

(I'm officially a script-kiddie now.)

-----------

///// change settings here /////
var minrake = 0.01;
var players = 2;
var level = '$2/$4';
var ptdb = 'ptrack11';
////////////////////////////////

///// Globals /////////
var db = new ActiveXObject("ADODB.Recordset");
var cstring = "Driver={Microsoft Access Driver (*.mdb)};DBQ="+ptdb+".mdb";
var totalhands = 0;
var rakedhands = 0;
var sql = '';
var echoout = "Game Level:\t\t" + level + "\n--------------------";
var pcnt = 0;
//////////////////////


/// 2 players

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
totalhands = db(0)+0;
db.Close();

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
rakedhands = db(0)+0;
db.Close();

pcnt = Math.round(rakedhands / totalhands * 10000)/100;

echoout = echoout
+ "\n\nPlayers:\t\t\t" + players
+ "\nNumber of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%";

players++;

/// 3 players

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
totalhands = db(0)+0;
db.Close();

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
rakedhands = db(0)+0;
db.Close();

pcnt = Math.round(rakedhands / totalhands * 10000)/100;

echoout = echoout
+ "\n\nPlayers:\t\t\t" + players
+ "\nNumber of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%";

players++;

/// 4 players

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
totalhands = db(0)+0;
db.Close();

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
rakedhands = db(0)+0;
db.Close();

pcnt = Math.round(rakedhands / totalhands * 10000)/100;

echoout = echoout
+ "\n\nPlayers:\t\t\t" + players
+ "\nNumber of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%";

players++;

/// 5 players

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
totalhands = db(0)+0;
db.Close();

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
rakedhands = db(0)+0;
db.Close();

pcnt = Math.round(rakedhands / totalhands * 10000)/100;

echoout = echoout
+ "\n\nPlayers:\t\t\t" + players
+ "\nNumber of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%";

players++;

/// 6 players

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
totalhands = db(0)+0;
db.Close();

sql = "SELECT Count(game.game_id) AS Hands FROM game"
+ " WHERE game.number_of_players = " + players
+ " AND game.rake &gt; " + minrake
+ " AND game.game_level_id=(SELECT game_level_id FROM game_level"
+ " WHERE game_level_desc='"+level+"');"
db.Open(sql, cstring, 1, 3);
rakedhands = db(0)+0;
db.Close();

pcnt = Math.round(rakedhands / totalhands * 10000)/100;

echoout = echoout
+ "\n\nPlayers:\t\t\t" + players
+ "\nNumber of Hands:\t\t" + totalhands
+ "\nraked hands:\t\t" + rakedhands
+ "\nraked percent:\t\t"+ pcnt + "%";

WScript.Echo(echoout);

======================================

Results:

2 / 229 / 58 / 25.33%
3 / 566 / 177 / 31.27%
4 / 1109 / 395 / 35.62%
5 / 1782 / 782 / 43.88%
6 / 2671 / 1246 / 46.65%
Reply With Quote
Reply


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 03:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.