Welcome, Guest. Please login or register.
August 20, 2019, 01:45:58 AM
Home Help Login Register
News:

Shanky Technologies Poker Bot Support Forum  |  General Category  |  PPL Support (Moderator: sngbot)  |  Topic: Calculating SPR (Stack to Pot Ratio) 0 Members and 1 Guest are viewing this topic.
Pages: [1] Print
Author Topic: Calculating SPR (Stack to Pot Ratio)  (Read 2184 times)
Sleeper
Confident Newbie
**

Karma: 14
Posts: 99


« on: August 09, 2018, 03:52:25 PM »

Here is an attemp to calculate SPR.
The code should be placed at the start of the flop orbit.

This description of SPR was given to me by another botter.
Thanks to him for explaining the concept and the examples.

Quote:

 SPR = stack to pot ratio...

 There are 3 categories

 0-6 = Low SPR

 7-16 = Medium SPR

 17+ = High SPR

 The SPR is only ever calculated on the flop, never pre flop and never the turn or river,
 only the flop before any further action is taken.

 The calculation is to take the effective stack on the flop, which is always the smallest stack to see the flop,
 and then divide that by the pot size, which gives the SPR number.

 Depending on the SPR number, this will dictate what type of hand will be needed to proceed in the hand, based on the risk to reward.

 For example ...

 0-6 SPR

 Overpairs
 Top pair
 Bottom two pair
 Or better

 7-16 SPR

 Top two pair
 Sets
 Good drawing hands (8 outs or more) proceed as per pot odds and drawing odds dictate.
 Flopped Flushes and straights
 Full house
 Or better

 17+ SPR

 Sets
 Strong drawing hands (9 outs or more) proceed as per drawing odds relative to pot odds.
 Made Big flushes and high-end straights
 Full house
 
 Some examples..

 You are in MP with QQ and one person has limped before you. You raise 4bb +1bb for the limper and everone else folds, limper calls.

 The flop comes JT4 and you have 9,000, caller has 2,300. Pot size is 1,200.

 So effective stack is 2,300/1,200 = 1.9 SPR, placing it into the low SPR category.
 You have an over pair, which means you are most likely ahead in this hand given the SPR,
 therefore you are committed to this hand and will bet pot size each street until villain is all in.
 
 Next example..

 You are in early position with As Ac and it is folded to you, you bet 4xbb and get 2 callers.

 Flop comes Kh Jh 8d... and the pot is 1,200

 You have 23,000
 Caller 1 has 57,000
 Caller 2 has 15,000

 Effective stack sizes are calculated twice since it is a three way pot using the two smallest stacks..

 Your SPR v the 15k stack is 15000/1200 = 12.5 SPR meaning you have a medium SPR and therefore
 really need at least top two pair or better to proceed against him.

 Your SPR v the 56k stack is 23,000/1,200 = 19 SPR which is massive and means you really need at least
 a set or better to proceed against him.

 Since the SPRs are not favarable against these players with just one over pair..
 it's best to take a shot at the flop with your AA with a 3/4s pot bet.. but if  called then check fold turn and/or river
 as SPR dictates you are likely behind. Also if re-rasied on flop it's an automatic fold.

 This was an actual hand played. Hero bet 3/4s pot on flop and was rerasied which Hero then folded his AA.
 The other guy called and turn came 5s...both players checked turn and river came 7s, player 1 pushes and player 2 calls..
 player one had flopped a set of 8s and player 2 had flopped 2 pair KJ.

 99.9% of people would have been all in with AA. But SPR dictated the risk to reward was poor and likely Hero was behind.
 
 End Quote.
 
 The effective stack is always the smallest stack to see the flop,
 If we have more than one opponent, then we cant know all the stack sizes.
 We can only get the SPR between our stack and the opponent with the largest stack.
 With one opponent, were good to go,
 with two or more, at least we have some idea about risk to reward.

 Also added how not to Donk bet?
 
 Code:
 
 //--- Start of flop
 
 flop

//--- SPR ---//

WHEN MaxCurrentOpponentStackSize >= 100% StackSize AND NOT USER_SPR_calc
  When PotSize <= 6% StackSize USER_HighSpr
  When NOT USER_HighSpr AND PotSize <= 20% StackSize USER_MedSpr
  When PotSize > 20% StackSize USER_LowSpr
 
WHEN MaxCurrentOpponentStackSize < 100% StackSize AND NOT USER_SPR_calc
  When MaxCurrentOpponentStackSize > 1500% PotSize USER_HighSpr
  When NOT USER_HighSpr AND MaxCurrentOpponentStackSize > 500% PotSize USER_MedSpr
  When MaxCurrentOpponentStackSize <= 500% PotSize USER_LowSpr
 
WHEN Others 
 When Others USER_SPR_calc

//--- Dont Donk bet out of position (Mostly) ---//

WHEN POSITION = FIRST AND BETS = 0 AND RaisesBeforeFlop
  AND NOT BotRaisedBeforeFlop AND BotCalledBeforeFlop AND RANDOM <= 80 Call Force     
 
 

 
 
 
 
 
 
 
 
Logged
Egor
Forum Admin
Extreme Botter
*****

Karma: 349
Posts: 32905



WWW
« Reply #1 on: August 22, 2018, 05:39:34 PM »

Cool  Afro

I am too jet-lagged to read this at the moment  sleep
Logged

Please do not PM me about license issues or help stuff - email me or use the Help board. Thanks! -Egor
Blue777
Confused Newbie
*

Karma: 0
Posts: 30


« Reply #2 on: August 22, 2018, 10:45:32 PM »

thanks for the code for reducing the donk bets...i was just trying to work on that to add to my profile  Smiley
Logged
jbotman
Botter
***

Karma: 1
Posts: 211

Think it and make it so.


« Reply #3 on: September 13, 2018, 12:44:18 AM »

Is this code useable as is?
Does it need tweaking?
JB
Logged

Be Happy!
Sleeper
Confident Newbie
**

Karma: 14
Posts: 99


« Reply #4 on: September 13, 2018, 08:07:05 AM »

Yes, place the code at the very start of the flop before any other code.

How you use the variables later in your code is up to you.
Logged
jbotman
Botter
***

Karma: 1
Posts: 211

Think it and make it so.


« Reply #5 on: September 16, 2018, 04:21:24 PM »

Wouldn't you get an accurate SPR from:
MinOpponentStackSize/PotSize ?
Logged

Be Happy!
Sleeper
Confident Newbie
**

Karma: 14
Posts: 99


« Reply #6 on: September 18, 2018, 10:55:04 AM »

Yes, but.

Works for one opponent on the flop.
If you have more than one opponent on the flop.
You might want to know the biggest risk to reward that you might be up against.
Logged
jbotman
Botter
***

Karma: 1
Posts: 211

Think it and make it so.


« Reply #7 on: September 19, 2018, 08:23:54 AM »

Good feedback, however, I am pretty sure our calculations come up with the same result.  How you code for your intended results is a great question.
Also, not being adept at coding, I want to understand something in yours.

WHEN MaxCurrentOpponentStackSize >= 100% StackSize AND NOT USER_SPR_calc
is the first line that you show.

When Others USER_SPR_calc
is the last line you show.  Doesn't this mean that you are using a variable in that first line that hasn't been created yet?

All the best;
Jbotman
Logged

Be Happy!
Sleeper
Confident Newbie
**

Karma: 14
Posts: 99


« Reply #8 on: September 19, 2018, 08:38:44 AM »

When first entering the flop, USER_SPR_calc is false, so the SPR is caculated.

After the calculation:

WHEN Others  
 When Others USER_SPR_calc

USER_SPR_calc  is set True.

If there is a raise in the flop round after a bet, then there is a second loop through the flop code.
As USER_SPR_calc is now true, the SPR will not be re-calculated.  

The When others line also closes the open when condition
« Last Edit: September 19, 2018, 08:54:14 AM by Sleeper » Logged
jbotman
Botter
***

Karma: 1
Posts: 211

Think it and make it so.


« Reply #9 on: September 19, 2018, 05:23:14 PM »

TYVM!
Logged

Be Happy!
BleepBlopBlurp
Confused Newbie
*

Karma: 0
Posts: 36


« Reply #10 on: May 02, 2019, 01:56:22 AM »


 
 Code:
 
 //--- Start of flop
 
 flop

//--- SPR ---//

WHEN MaxCurrentOpponentStackSize >= 100% StackSize AND NOT USER_SPR_calc
  When PotSize <= 6% StackSize USER_HighSpr
  When NOT USER_HighSpr AND PotSize <= 20% StackSize USER_MedSpr
  When PotSize > 20% StackSize USER_LowSpr
 
WHEN MaxCurrentOpponentStackSize < 100% StackSize AND NOT USER_SPR_calc
  When MaxCurrentOpponentStackSize > 1500% PotSize USER_HighSpr
  When NOT USER_HighSpr AND MaxCurrentOpponentStackSize > 500% PotSize USER_MedSpr
  When MaxCurrentOpponentStackSize <= 500% PotSize USER_LowSpr
 
WHEN Others 
 When Others USER_SPR_calc



I am trying to see if I understand this. This is using the "effective stack" (smallest stack size between all opponents) correct? In a heads up situation its will make the calculation based on MAX stack being yours or the opponents then configuring the math to determine High Med or Low SPR. If there are three opponents it is using the second largest stack size to compare to yours to determine the SPR? Am I reading that correctly?

Also my SPR considerations are different than the format you used. I use 0-3 is committed for Overpair, TPTK, Bottom 2 or better.

As an example though we are playing 200nl.
Both stacks are 200 and preflop there is a $20 and I call with AK and its BB vs SB to keep things simple.
Flop comes K Q 9.
With $40 in the pot and $180 behind the SPR is 4.5 and my opponent shoves I can seriously consider folding.
I don't have to be committed using an SPR of 3 as my threshold. With an SPR of 6 this is a call.
In a 200BB structure having a commitment at 6 there isn't a whole lot you are folding there. If you had 99 on a AKQ board you'd be committed using 6 as the threshold.

Just my 2 cents on the numbers used there. For a deepstack tourney they would probably work for me though. Maybe that is the thought process there.

So the changes I would make to determine my definition of a low SPR would be > 34% in the first set of lines (vs 40%) and > 300% (vs 500%) in the second equation line is that correct as well?

My next level would be 3-6 so those numbers would be <= 34% and <= 300%

For 6+ as my high threshold I would use <=16% and <= 600% in the third equation. That is the one I am getting stumbled on. Is that correct?

Logged
Sleeper
Confident Newbie
**

Karma: 14
Posts: 99


« Reply #11 on: May 03, 2019, 02:54:35 PM »

Yes, its using the "effective stack" smallest stack size between opponents.
This works when heads up, but for 3+ players its a compromise.

If there are 3+ opponents it is using the largest stack size to compare to ours

The 'MaxCurrentOpponentStackSize' V 'hero' is used when facing 3+ opponents, as that is biggest risk to reward that you might be up against.
Not ideal!

It is easily changed to suit your limits. Code changed to suit.
I agree with your figures, I have changed the '<=' to just '<' in the first part.

The code reads without errors, but I have not had time to test it?
 
//--- SPR ---//

// 0 to 3 = Low SPR
// 3+ to 6 = Medium SPR
// 6+ = High SPR

WHEN MaxCurrentOpponentStackSize >= 100% StackSize AND NOT USER_SPR_calc
  When PotSize < 16% StackSize USER_HighSpr
  When NOT USER_HighSpr AND PotSize < 34% StackSize USER_MedSpr
  When PotSize >= 34% StackSize USER_LowSpr
 
WHEN MaxCurrentOpponentStackSize < 100% StackSize AND NOT USER_SPR_calc
  When MaxCurrentOpponentStackSize > 600% PotSize USER_HighSpr
  When NOT USER_HighSpr AND MaxCurrentOpponentStackSize > 300% PotSize USER_MedSpr
  When MaxCurrentOpponentStackSize <= 300% PotSize USER_LowSpr
 
WHEN Others 
  When Others USER_SPR_calc
Logged
Pages: [1] Print 
Shanky Technologies Poker Bot Support Forum  |  General Category  |  PPL Support (Moderator: sngbot)  |  Topic: Calculating SPR (Stack to Pot Ratio)
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!