Hacker News new | past | comments | ask | show | jobs | submit login

A quick and dirty, shallow one, that I just opted to brute force out of curiosity.

An online game I play includes an optional two player Russian Roulette type feature (non-fatal). I got to wondering if there was an optimal betting percentage to use, if you set aside some money as a betting seed. So I spent time coding up a really ugly brute force "just run lots of games and see".

Pretty much the answer is you'll lose more often than you win, looks like your best bets are around 2% of whatever money you have left of your betting money.

If you play 75 games, at 2% of your betting pool, you'll come out ahead only about 49.8% of the time.

There's more efficient ways of working that out than I bothered to do, which was to create a basic abstraction for a gun. For example, your odds of winning is essentially 50%, given two players. For every "game" I simulated, I could have just picked a random integer between 0 and 1 instead. Faster and the same effect.

As best as I could find, there are no good betting strategies on a coin toss (which is what this really is)




> a really ugly brute force "just run lots of games and see".

This is usually called https://en.wikipedia.org/wiki/Monte_Carlo_method


You might find the Kelly Criterion interesting and/or useful for optimal bet sizing. This rabbit hole goes deeeep

https://en.m.wikipedia.org/wiki/Kelly_criterion


Oh boy, further down the rabbit hole!


Okay, unless I'm missing something, Kelly Criterion puts it at 0%, which is about what I'd expect.

p = 0.5

q = 0.5

b = 1.0

0.5 - (0.5 / 1.0) = 0.0




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: