Post
Topic
Board Gambling
Re: Negative house edge
by
futureofbitcoin
on 30/03/2015, 19:17:40 UTC
-snip
I don't know how the house edge is actually implemented at dice sites (anyone care to explain?)
-snip

It is very simple, the site just set your probability to win to make your EV always be (1- House edge %)*bet size.
For example if you are playing a x2 bet in a 0.5% edge site, you will win the bet if the roll is under 49.75. (1-0.5% = 49.75%*2)
But if you are playing in a 1% edge site, you will win the bet if the roll is under 49.5. (1-1% = 49.5%*2)

I don't think that's what he was asking. I think he was asking how that's implemented. One simple way in pseudocode would be

Code:
double player_bankroll;
double bet;
int x = RNG(1,100);
    if (x > 51) {
        player_bankroll = player_bankroll + bet;
    } else {
        player_bankroll = player_bankroll - bet;
    }

And I haven't touched this stuff in 2+ years (I wasn't very good to begin with) so if it's way off, don't blame me. RNG stands for random number generator, in this case from 1 to 100.