Post
Topic
Board Gambling
Re: Where are the EV+ casino games?
by
Kluge
on 06/06/2014, 04:40:44 UTC
Game rules:
1000 players bet 1000 times in a game where they have a 50% chance of winning each bet (actually I think they have a 49.999999999% chance or whatever - Idunno exactly how random works, tbh). They each have a starting balance of 1 unit and must bet 1 unit. (changed from original so there's less 0s to write)

Set rules:
One game must be played 50 times.

Results of 10 sets: https://docs.google.com/spreadsheets/d/1KR_Wd9Z7K1YfWCsOgiq0KyRF7lD4dYaBnbW99BkSbSY/pubhtml

Conclusion:
House ended up very slightly (each game and set, the house seemed likely to lose, but rarely won huge) - nothing abnormal. Theory's definitely bunk, and I've now paid my debt to rationality by manually typing all those numbers in.

Script run (only "real" change is to print "casino profit" after each game so I don't have to think):
Code:
#!/usr/bin/env python

import random, sys

players = 1000
bets_per_player = 1000
starting_balance = 1
stake = 1

def roll():
    return random.random() < 0.50

player = 1
while player <= players:
    balance = starting_balance
    bets = 0
    while True:
        bets += 1
        if roll():
            balance += stake
            print "player %4d  won bet %4d.  balance = %4d" % (player, bets, balance)
        else:
            balance -= stake
            print "player %4d lost bet %4d.  balance = %4d" % (player, bets, balance)
            if balance < stake:
                print "player %d bust after %d bets" % (player, bets)
                break
        if bets == bets_per_player:
            print "player %d made %d bets without busting" % (player, bets)
            print "casino profit is %d" % (player-balance)
            sys.exit(0)

    player += 1

print "all the players busted"