Post
Topic
Board Gambling
Re: Moneypot just took a huge loss?
by
blockage
on 30/01/2016, 05:01:52 UTC
Edit: I should post the equation of the curve I'm plotting so you can check I didn't do anything stupid. I'm looking at the bet 'backwards', ie. from the house's point of view. I am considering the house bet size to be the most it can lose on the bet. So the 'b' for the jackpot is -1 (a profit of -1 times the bet size). 'b' for the 2nd highest win is -46/120 (we only lose 46/120ths as much as we were willing to risk because the highest two payouts are 121 and 47). Etc:

Code:
plot [0.352:0.354] \
      1/65536.0 * log(1 + x * -120/120) + \
     16/65536.0 * log(1 + x *  -46/120) + \
    120/65536.0 * log(1 + x *  -12/120) + \
    560/65536.0 * log(1 + x *   -4/120) + \
   1820/65536.0 * log(1 + x *   -2/120) + \
   4368/65536.0 * log(1 + x * -0.4/120) + \
   8008/65536.0 * log(1 + x *    0/120) + \
  11440/65536.0 * log(1 + x *  0.5/120) + \
  12870/65536.0 * log(1 + x *  0.7/120) + \
  11440/65536.0 * log(1 + x *  0.5/120) + \
   8008/65536.0 * log(1 + x *    0/120) + \
   4368/65536.0 * log(1 + x * -0.4/120) + \
   1820/65536.0 * log(1 + x *   -2/120) + \
    560/65536.0 * log(1 + x *   -4/120) + \
    120/65536.0 * log(1 + x *  -12/120) + \
     16/65536.0 * log(1 + x *  -46/120) + \
      1/65536.0 * log(1 + x * -120/120)   \
title "maximise this"

Why exactly do you divide by 120? The only difference to what I calculated is that factor in the 'b's. So my plot looks like



Code:
plot [0:0.006] [-1e-5:3e-5] \
      1/65536.0 * log(1 + x * -120) + \
     16/65536.0 * log(1 + x *  -46) + \
    120/65536.0 * log(1 + x *  -12) + \
    560/65536.0 * log(1 + x *   -4) + \
   1820/65536.0 * log(1 + x *   -2) + \
   4368/65536.0 * log(1 + x * -0.4) + \
   8008/65536.0 * log(1 + x *    0) + \
  11440/65536.0 * log(1 + x *  0.5) + \
  12870/65536.0 * log(1 + x *  0.7) + \
  11440/65536.0 * log(1 + x *  0.5) + \
   8008/65536.0 * log(1 + x *    0) + \
   4368/65536.0 * log(1 + x * -0.4) + \
   1820/65536.0 * log(1 + x *   -2) + \
    560/65536.0 * log(1 + x *   -4) + \
    120/65536.0 * log(1 + x *  -12) + \
     16/65536.0 * log(1 + x *  -46) + \
      1/65536.0 * log(1 + x * -120)   \
title "maximise this"

Edit2: I tried reading the Haskell code. (I don't know Haskell. I don't even know how many L's it has):

Code:
table =
  [ ( 65536     / (2^32) , 1 - 121.0 ), ( 749731840 / (2^32) , 1 - 0.5   )
[...]
fun x = sum [ p * log (1 + b * x) | (p,b) <- table ]

It looks like you're using newton's method to maximize the sum of the products - but you're using the payout multipliers from the player's point of view. You need to look at it from the other side. The house never wins 121x. The player's big wins are the house's big losses. We need to calculate each house profit or loss as a multiplier of the amount the house is risking.

No, it's from the house's point of view. Notice the  1 - 121.0 in the second component of the first entry? It takes the stake of 1 into account and subtracts the payout to get the profit (-120) for the house in that case. Sorry I should've normalized the table a bit more.

Edit: Oh I see what you're doing. You're normalizing the stake for the house. Let me ponder about that some more.