PDA

View Full Version : limped pot stats



dway
01-15-2010, 11:02 PM
I can't find any stats for behaviour on flops in limped pots. What i need to see is the limp in, and bet/ call /r ip oop.

These would be very handy HU.


thanks

netsrak
01-16-2010, 08:49 AM
We only have Misc.->Steal limped pot and the usual bet etc. stats

Please suggest it or vote for it here: http://holdemmanager.uservoice.com/pages/5307-holdem-manger-suggestions

dway
01-16-2010, 11:20 PM
I can't post my idea up as my votes are used up. My user name is dway.

The main problem is stats where donk bet and fld to donk bet aren't recorded in limped pots as they're not donks. Some players almost NEVER raise.

These are the stats I'd like (FOR HU):


fold to lead limped pot,
raise lead limped pot,
check back limped pot /
bet limped pot ip / oop

Limp, no bet flop, bet turn.



thanks

brunowillis
01-26-2010, 05:51 AM
SELECT sum(case when positiontype_id in (0) then 1 else 0 end) as sbhands, sum(case when positiontype_id in (0) and pkh.positiontype_id_firstlimper in (0) then 1 else 0 end) as limphands FROM playerhandscashkeycolumns ph join players pl on (pl.player_id = ph.player_id) join pokerhands pkh on pkh.pokerhand_id = ph.pokerhand_id join gametypes gt on gt.gametype_id = ph.gametype_id WHERE (ph.player_id = 'PLAYERID')

will return you the amount of hands played in small blind by the player with id PLAYERID and the amount of hands in small blind the player limped. So limphands/sbhands will give you the limp percentage preflop just as an example (for heads up games!)

dway
01-26-2010, 06:17 AM
great ! thanks. I'll try it.

brunowillis
01-26-2010, 07:53 AM
This is my java code for receiving some of the most popular stats:

it can simply be used by
getPlayerStatsFromDB("databasename", "database username", "password", "player name", "absolute");

I have only added cereus site id, but other sites can be added.

Output example:

http://img121.imageshack.us/img121/6381/statsreader.png


import java.awt.AWTException;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Vector;

public class StatsReader {

private static void getPlayerStatsFromDB(String databaseName, String userName, String password, String playerName, String siteName) throws NumberFormatException, SQLException, ClassNotFoundException {

//load postgres drivers
Class.forName("org.postgresql.Driver");

//connect to db
Connection conn = null;
Statement st = null;
String url = "jdbc:postgresql://localhost:5432/" +databaseName;
conn = DriverManager.getConnection(url, userName, password);
st = conn.createStatement();
ResultSet rs;

//database query

//first get player id
int site_number = 0;
if(siteName.equals("absolute")) site_number = 5;
String query = "SELECT player_id FROM players WHERE playername = '" +playerName +"' AND site_id=" +site_number;
rs = st.executeQuery(query);
int player_Id = 0;
while (rs.next()) {
player_Id = Integer.parseInt(rs.getString(1));
}
System.out.println("playerid " +player_Id);

//determine player stats
query = "SELECT sum(case when ph.preflopaction_id=0 then 1 else 0 end) as uohands, "
+ "sum(case when didpfr = true and ph.preflopaction_id=0 then 1 else 0 end) as uopfrhands, "
+ "sum(case when ph.preflopaction_id = 3 OR ph.preflopaction_id = 4 then 1 else 0 end) as couldthreebet, "
+ "sum(case when ph.firstpreflopactiontype_id = 3 AND (ph.preflopaction_id = 3 OR ph.preflopaction_id = 4) then 1 else 0 end) as didthreebet, "
+ "sum(case when positiontype_id in (0) then 1 else 0 end) as sbhands, "
+ "sum(case when positiontype_id in (0) and pkh.positiontype_id_firstlimper in (0) then 1 else 0 end) as limphands, "
+ "sum(case when phmisc.threebetresponsetype_id > -1 then 1 else 0 end) as facingthreebet, "
+ "sum(case when phmisc.threebetresponsetype_id = 3 then 1 else 0 end) as raisethreebet, "
+ "sum(case when ph.totalflopbets > 0 then 1 else 0 end) as betonflop, sum(case when ph.maxstreetseen >= 1 then 1 else 0 end) as sawflop, "
+ "sum(case when ph.totalturnbets > 0 then 1 else 0 end) as betonturn, sum(case when ph.maxstreetseen >= 2 then 1 else 0 end) as sawturn, "
+ "sum(case when ph.totalriverbets > 0 then 1 else 0 end) as betonriver,sum(case when ph.maxstreetseen >= 3 then 1 else 0 end) as sawriver, "
+ "sum(ph.totalflopbets) as flopbets, sum(ph.totalflopcalls) as flopcalls, "
+ "sum(ph.totalturnbets) as turnbets, sum(ph.totalturncalls) as turncalls, "
+ "sum(ph.totalriverbets) as riverbets, sum(ph.totalrivercalls) as rivercalls, "
+ "sum(case when ph.maxstreetseen = 4 then 1 else 0 end) as sawshowdown, "
+ "sum(case when ph.maxstreetseen >= 1 then 1 else 0 end) as sawflop, "
+ "count(ph.*) AS Hands, "
+ "sum(ph.netamountwon/1.0/gt.bigblind)/count(ph.*)*50 as BigBets100 "
+ "FROM playerhandscashkeycolumns ph join players pl on (pl.player_id = ph.player_id) join pokerhands pkh on pkh.pokerhand_id = ph.pokerhand_id join playerhandscashmisc phmisc on phmisc.playerhand_id = ph.playerhand_id join gametypes gt on gt.gametype_id = ph.gametype_id WHERE (ph.player_id = " + player_Id +")";

//get values
rs = st.executeQuery(query);
Vector<Double> vec = new Vector<Double>();
while (rs.next()) {
vec.add(Double.parseDouble(rs.getString("uohands")));
vec.add(Double.parseDouble(rs.getString("uopfrhands")));
vec.add(Double.parseDouble(rs.getString("couldthreebet")));
vec.add(Double.parseDouble(rs.getString("didthreebet")));
vec.add(Double.parseDouble(rs.getString("sbhands")));
vec.add(Double.parseDouble(rs.getString("limphands")));
vec.add(Double.parseDouble(rs.getString("facingthreebet")));
vec.add(Double.parseDouble(rs.getString("raisethreebet")));
vec.add(Double.parseDouble(rs.getString("betonflop")));
vec.add(Double.parseDouble(rs.getString("sawflop")));
vec.add(Double.parseDouble(rs.getString("betonturn")));
vec.add(Double.parseDouble(rs.getString("sawturn")));
vec.add(Double.parseDouble(rs.getString("betonriver")));
vec.add(Double.parseDouble(rs.getString("sawriver")));
vec.add(Double.parseDouble(rs.getString("flopbets")));
vec.add(Double.parseDouble(rs.getString("flopcalls")));
vec.add(Double.parseDouble(rs.getString("turnbets")));
vec.add(Double.parseDouble(rs.getString("turncalls")));
vec.add(Double.parseDouble(rs.getString("riverbets")));
vec.add(Double.parseDouble(rs.getString("rivercalls")));
vec.add(Double.parseDouble(rs.getString("sawshowdown")));
vec.add(Double.parseDouble(rs.getString("sawflop")));
vec.add(Double.parseDouble(rs.getString("Hands")));
vec.add(Double.parseDouble(rs.getString("BigBets100")));
}
rs.close();
st.close();

//some calculations
double cap;
if(vec.elementAt(6) >= 1) cap = vec.elementAt(7)/vec.elementAt(6);
else cap = Double.POSITIVE_INFINITY;

double threeBet;
if(vec.elementAt(2) >= 1) threeBet = vec.elementAt(3)/vec.elementAt(2);
else threeBet = Double.POSITIVE_INFINITY;

double uopfr;
if(vec.elementAt(0) >= 1) uopfr = vec.elementAt(1)/vec.elementAt(0);
else uopfr = Double.POSITIVE_INFINITY;

double limpRange;
if(vec.elementAt(4)>0) limpRange = vec.elementAt(5)/vec.elementAt(4);
else limpRange = Double.POSITIVE_INFINITY;

double postflopAggFrequency;
if(vec.elementAt(9) + vec.elementAt(11) + vec.elementAt(13) > 0) postflopAggFrequency = (vec.elementAt(8) + vec.elementAt(10) + vec.elementAt(12))/(vec.elementAt(9) + vec.elementAt(11) + vec.elementAt(13));
else postflopAggFrequency = Double.POSITIVE_INFINITY;
double postflopAF;
if((vec.elementAt(15) + vec.elementAt(17) + vec.elementAt(19) > 0)) postflopAF = (vec.elementAt(14) + vec.elementAt(16) + vec.elementAt(18))/(vec.elementAt(15) + vec.elementAt(17) + vec.elementAt(19));
else postflopAF = Double.POSITIVE_INFINITY;

double wentSD;
if(vec.elementAt(21) > 0) wentSD = vec.elementAt(20)/vec.elementAt(21);
else wentSD = Double.POSITIVE_INFINITY;

double hands = vec.elementAt(22);
double BB100 = vec.elementAt(23);


//output
System.out.println("cap: " + cap);
System.out.println("3Bet: " + threeBet);
System.out.println("unopened PFR: " + uopfr);
System.out.println("limp range: " + limpRange);
System.out.println("postflop agg freq: " + postflopAggFrequency);
System.out.println("postflop AF: " + postflopAF);
System.out.println("went to SD: " + wentSD);
System.out.println("================================================== =====================================");
System.out.println("PlayerName: " + playerName);
System.out.println("Hands: " + hands);
System.out.println("BB/100: " + BB100);
}

public static void main (String [] args) throws AWTException, IOException, SQLException, InterruptedException, NumberFormatException, ClassNotFoundException {
getPlayerStatsFromDB("databasename", "database username", "password", "player name", "absolute");
}
}