Hi all! I'm not very active on these forums, but here's something I'd like to share with you. It might as well be interesting, or lead me to better understand BRM.
I just wrote a program in python which simulates BRM for SnGHU, DoN or such simple stuff. My aim was to simulate the effects of BRM on my winning rate, and take into account the risk of ruin. My idea was that someone might be losing a lot of money in the longrun compared to optimal BRM if he really is to far from it (either to large or too tight) so went for a few calculations.
So basically, I took the SnG HU buy-ins of pokerstars (up to 200$), added in the rake in my country (6.6%
), and decided that our bot would have 54% itm on every level. So, simple thing so far.
As for the brm, I simulated simple BRM at first:
when chosing to play a game, the script chooses the higher BI for which BI*BRM is inferior to our actual bankroll. Everytime I broke, I respawn to starting BR and remember that I lost the money (removing (prob to broke)*(restarting bankroll) from the end bankroll.
I also make sure that the results are accurate. I chose to run something like 10 000 games.
In order to get a very good accurate value, the results I get are the average results from 5000 runs (each run being 10000 games). The result is that I have very little dispersion.
My results are somewhat... unexpected.
With 80$ starting BR, and a 5BI BRM, I won 2446$ (over 10000 games, in average)
With 80$ starting BR, and a 50BI BRM, I won 2452$.
With 5$ starting BR and 5BI BRM, I won 241$
With 5$ starting BR and 50BI BRM I won 242$
I run the same number of games for every simulation. And apparently, it seems that the BRM does not matter on how much I win in the longrun. I do'nt understand this result.
What I expected was a stupid risk of ruin with 5BI BRM but (since the bot has an edge) much more earnings.
Just in case it comes from a script mistake:
#!/usr/bin/python
#python 2.6x
import random
br = float(raw_input("Starting bankroll?"))
respawn = br
brm = int(raw_input("Number of BI for BRM?"))
bi = [[200., 45],[100., 54],[50., 54],[30., 54],[20., 54],[10., 54],[5., 54],[3., 54],[1., 54], [0.5, 54]]
rake = 0.066
#a function simulating a poker SnG HU game
def game(br, bi, rake):
if random.randint(1, 100) >= bi[1]:
br = br - bi[0]
else:
br = br + (1+rake)*bi[0]
return br
#a function to choose which BI to play
#simple BRM for the moment
def brmsim(brm, startbr, bi, rake):
for elem in bi:
if br >= brm*elem[0]:
return game(startbr, elem, rake)
return game(startbr, bi[9], rake)
#SIMULATION FUNCTION
def simu(brm, br, bi, rake, games, respawn):
maxbr = 0
broke = 0
for j in range(games):
br = brmsim(15, br, bi, rake)
if br >= maxbr:
maxbr = br
if br < 0.5:
broke = broke + 1
br = respawn
return broke, br
#MAIN
print "Starting bankroll:", br
print "Chosen BRM:", brm
pbroke = 0
avgbr = 0
for i in range(5000):
loss, brsim = simu(brm, br, bi, rake, 5000, respawn)
pbroke = pbroke + loss
avgbr = avgbr + brsim
avgbr = avgbr / 5000
pbroke = pbroke / 5000.
print "You broke", pbroke, "on average, and won $", avgbr - respawn*pbroke
print "Ratio: Won/RoR =", (avgbr-br)/pbroke
What this might suggest is really counterintuitive: when we have an edge, the BRM we apply doesn't matter in the long run.
Is the conclusion correct? Incorrect? Would anyone have anything that would help me about this?