Pages:
Author

Topic: Kingcoin: A delightfully simple spin-the-wheel game (that's provably fair) - page 2. (Read 6335 times)

newbie
Activity: 34
Merit: 0
Thanks for the refund.

Tried on a faster connection and had less issues, plus I was more careful not to try and play too fast.
newbie
Activity: 26
Merit: 0
This is with Chrome browser on Android.  This occurs the same under both a mobile device as well as with a tablet (Nexus 7)

Right now the site is a black hole when using my Android mobile (with Chrome).   The press on the spin button does do a spin and then the spin button reappears.  But the second press causes the button to disappear but no spin occurs.  There is no recovery as far as I could tell.  This occurs when playing for free as well as if I've signed in and have placed an actual wager (and thus the black hole, you will lose your wager).    Something should be done to either disable the game when on a mobile or the game should function on a mobile as well.

My mobile (LG Optimus Elite) is running Android v2.3.7.   Incidentally, this same behavior does not occur on a tablet (Nexus 7) running Android v4.2.




I'll put up a "doesn't work on mobile" redirect of some sort asap. I wanted to get a basic version out there to see what the response was (test the waters) before investing in other platforms. But yes, I should at least have a redirect. Sorry for the poor experience.

Sanjay
legendary
Activity: 2506
Merit: 1010
This is with Chrome browser on Android.  This occurs the same under both a mobile device as well as with a tablet (Nexus 7)

Right now the site is a black hole when using my Android mobile (with Chrome).   The press on the spin button does do a spin and then the spin button reappears.  But the second press causes the button to disappear but no spin occurs.  There is no recovery as far as I could tell.  This occurs when playing for free as well as if I've signed in and have placed an actual wager (and thus the black hole, you will lose your wager).    Something should be done to either disable the game when on a mobile or the game should function on a mobile as well.

My mobile (LG Optimus Elite) is running Android v2.3.7.   Incidentally, this same behavior does not occur on a tablet (Nexus 7) running Android v4.2.


newbie
Activity: 26
Merit: 0
I just lost .5 playing this game.

It was a combination of freeze outs and delays clicking New Game. If you click it twice too fast it'll steal your bet.


=(




Hi, jjustinn--

First off, I am truly sorry you had trouble with the game. I've refunded your account for the full 0.5 BTC. In addition, I've credited you 0.1 BTC for your troubles. Good luck...hope you win!

In the game log, I see only one game where your game didn't complete possibly due to a slow connection. The other games show a legitimate win or loss.

I haven't been able to reproduce the errors you experienced. Are you on a very slow connection?

Anyway, I've refunded your account with 0.5 BTC (plus 0.1 BTC to aplogize). Please try on a reliable connection and let me know how it goes. On my end, I will simulate a slow connection and add some checks to try and prevent this in the future.

I'm really sorry you had a bad experience and hope you give it another shot.

Thanks,
Sanjay
newbie
Activity: 34
Merit: 0
I just lost .5 playing this game.

It was a combination of freeze outs and delays clicking New Game. If you click it twice too fast it'll steal your bet.


=(


legendary
Activity: 2940
Merit: 1333
I might add a special slice on the wheel that is a mega-jackpot (10x or 20x). That will give me an easy parameter to tweak in order to adjust the expected value.

That will increase your variance significantly I think, and so also increase your 'risk of ruin'.

If you're thinking of tinkering with the existing payouts, you can quickly calculate the return to player percentage using:

Code:
>>> 1.5*13.23 + 2*11.88 + 2.5*12.26 + 3*7.21
95.885

and just changing the 1.5, 2, 2.5, and 3 accordingly.

For instance, changing the 3x to 3.5x gives:

Code:
>>> 1.5*13.23 + 2*11.88 + 2.5*12.26 + 3.5*7.21
99.49

Edit: notice that the 2.5x payout happens slightly more often than the 2x payout.  Most games reserve the bigger payouts for rarer events.  Smiley
newbie
Activity: 26
Merit: 0
newbie
Activity: 26
Merit: 0
Hi, dooglus-- I sent 1 BTC to 146aSkxyXWM4U7jPnsXhVHd1RfohnVDhPx. Enjoy!

Received, thanks.

I played 10 games at 0.1 BTC each:

https://i.imgur.com/07LyB.png

So I kept only 0.6 BTC.  Well less than expected.

I asked to withdraw 0.6 BTC, and it appeared to let me, but some seems to be gotten lost in transaction:

https://i.imgur.com/Q8R7j.png

Yep, I include a very small transaction fee.

About taking only 0.6 BTC, looks like you just got unlucky. Smiley

Sanjay
legendary
Activity: 2940
Merit: 1333
Also, I ran my simulator on 1 million plays, and show the average payout over each 10k plays.  It seems to suggest the true house edge is more like 4.25%:

Code:
average return over   10000 spins is 0.982250
average return over   20000 spins is 0.971225; average return over last 10000 spins is 0.960200
average return over   30000 spins is 0.972617; average return over last 10000 spins is 0.975400
average return over   40000 spins is 0.967612; average return over last 10000 spins is 0.952600
average return over   50000 spins is 0.968010; average return over last 10000 spins is 0.969600
average return over   60000 spins is 0.965833; average return over last 10000 spins is 0.954950
average return over   70000 spins is 0.963571; average return over last 10000 spins is 0.950000
average return over   80000 spins is 0.960931; average return over last 10000 spins is 0.942450
average return over   90000 spins is 0.960939; average return over last 10000 spins is 0.961000
average return over  100000 spins is 0.960825; average return over last 10000 spins is 0.959800
average return over  110000 spins is 0.959377; average return over last 10000 spins is 0.944900
average return over  120000 spins is 0.958413; average return over last 10000 spins is 0.947800
average return over  130000 spins is 0.958342; average return over last 10000 spins is 0.957500
average return over  140000 spins is 0.959057; average return over last 10000 spins is 0.968350
average return over  150000 spins is 0.958917; average return over last 10000 spins is 0.956950
average return over  160000 spins is 0.959762; average return over last 10000 spins is 0.972450
average return over  170000 spins is 0.960424; average return over last 10000 spins is 0.971000
average return over  180000 spins is 0.960592; average return over last 10000 spins is 0.963450
average return over  190000 spins is 0.960305; average return over last 10000 spins is 0.955150
average return over  200000 spins is 0.959715; average return over last 10000 spins is 0.948500
average return over  210000 spins is 0.960100; average return over last 10000 spins is 0.967800
average return over  220000 spins is 0.960327; average return over last 10000 spins is 0.965100
average return over  230000 spins is 0.960565; average return over last 10000 spins is 0.965800
average return over  240000 spins is 0.960127; average return over last 10000 spins is 0.950050
average return over  250000 spins is 0.959996; average return over last 10000 spins is 0.956850
average return over  260000 spins is 0.959887; average return over last 10000 spins is 0.957150
average return over  270000 spins is 0.959263; average return over last 10000 spins is 0.943050
average return over  280000 spins is 0.959348; average return over last 10000 spins is 0.961650
average return over  290000 spins is 0.959778; average return over last 10000 spins is 0.971800
average return over  300000 spins is 0.959428; average return over last 10000 spins is 0.949300
average return over  310000 spins is 0.959876; average return over last 10000 spins is 0.973300
average return over  320000 spins is 0.959642; average return over last 10000 spins is 0.952400
average return over  330000 spins is 0.959198; average return over last 10000 spins is 0.945000
average return over  340000 spins is 0.959329; average return over last 10000 spins is 0.963650
average return over  350000 spins is 0.959156; average return over last 10000 spins is 0.953250
average return over  360000 spins is 0.958596; average return over last 10000 spins is 0.939000
average return over  370000 spins is 0.958392; average return over last 10000 spins is 0.951050
average return over  380000 spins is 0.958522; average return over last 10000 spins is 0.963350
average return over  390000 spins is 0.958156; average return over last 10000 spins is 0.944250
average return over  400000 spins is 0.957544; average return over last 10000 spins is 0.933650
average return over  410000 spins is 0.957546; average return over last 10000 spins is 0.957650
average return over  420000 spins is 0.957874; average return over last 10000 spins is 0.971300
average return over  430000 spins is 0.958094; average return over last 10000 spins is 0.967350
average return over  440000 spins is 0.958113; average return over last 10000 spins is 0.958900
average return over  450000 spins is 0.958157; average return over last 10000 spins is 0.960100
average return over  460000 spins is 0.957914; average return over last 10000 spins is 0.947000
average return over  470000 spins is 0.957834; average return over last 10000 spins is 0.954150
average return over  480000 spins is 0.957831; average return over last 10000 spins is 0.957700
average return over  490000 spins is 0.957845; average return over last 10000 spins is 0.958500
average return over  500000 spins is 0.958034; average return over last 10000 spins is 0.967300
average return over  510000 spins is 0.958103; average return over last 10000 spins is 0.961550
average return over  520000 spins is 0.957910; average return over last 10000 spins is 0.948050
average return over  530000 spins is 0.958014; average return over last 10000 spins is 0.963450
average return over  540000 spins is 0.958069; average return over last 10000 spins is 0.960950
average return over  550000 spins is 0.958285; average return over last 10000 spins is 0.970000
average return over  560000 spins is 0.957993; average return over last 10000 spins is 0.941900
average return over  570000 spins is 0.957975; average return over last 10000 spins is 0.956950
average return over  580000 spins is 0.958003; average return over last 10000 spins is 0.959600
average return over  590000 spins is 0.958335; average return over last 10000 spins is 0.977600
average return over  600000 spins is 0.958202; average return over last 10000 spins is 0.950400
average return over  610000 spins is 0.958202; average return over last 10000 spins is 0.958150
average return over  620000 spins is 0.958641; average return over last 10000 spins is 0.985450
average return over  630000 spins is 0.958611; average return over last 10000 spins is 0.956750
average return over  640000 spins is 0.958415; average return over last 10000 spins is 0.946050
average return over  650000 spins is 0.958482; average return over last 10000 spins is 0.962800
average return over  660000 spins is 0.958675; average return over last 10000 spins is 0.971200
average return over  670000 spins is 0.958600; average return over last 10000 spins is 0.953650
average return over  680000 spins is 0.958597; average return over last 10000 spins is 0.958400
average return over  690000 spins is 0.958434; average return over last 10000 spins is 0.947350
average return over  700000 spins is 0.958416; average return over last 10000 spins is 0.957150
average return over  710000 spins is 0.958258; average return over last 10000 spins is 0.947200
average return over  720000 spins is 0.958257; average return over last 10000 spins is 0.958200
average return over  730000 spins is 0.958037; average return over last 10000 spins is 0.942200
average return over  740000 spins is 0.958268; average return over last 10000 spins is 0.975100
average return over  750000 spins is 0.958549; average return over last 10000 spins is 0.979400
average return over  760000 spins is 0.958555; average return over last 10000 spins is 0.959000
average return over  770000 spins is 0.958670; average return over last 10000 spins is 0.967400
average return over  780000 spins is 0.958659; average return over last 10000 spins is 0.957800
average return over  790000 spins is 0.958528; average return over last 10000 spins is 0.948300
average return over  800000 spins is 0.958378; average return over last 10000 spins is 0.946550
average return over  810000 spins is 0.958323; average return over last 10000 spins is 0.953900
average return over  820000 spins is 0.958302; average return over last 10000 spins is 0.956650
average return over  830000 spins is 0.958460; average return over last 10000 spins is 0.971400
average return over  840000 spins is 0.958351; average return over last 10000 spins is 0.949300
average return over  850000 spins is 0.958142; average return over last 10000 spins is 0.940600
average return over  860000 spins is 0.957822; average return over last 10000 spins is 0.930600
average return over  870000 spins is 0.957674; average return over last 10000 spins is 0.944950
average return over  880000 spins is 0.957515; average return over last 10000 spins is 0.943700
average return over  890000 spins is 0.957448; average return over last 10000 spins is 0.951500
average return over  900000 spins is 0.957381; average return over last 10000 spins is 0.951450
average return over  910000 spins is 0.957069; average return over last 10000 spins is 0.929000
average return over  920000 spins is 0.957115; average return over last 10000 spins is 0.961300
average return over  930000 spins is 0.957189; average return over last 10000 spins is 0.964000
average return over  940000 spins is 0.957286; average return over last 10000 spins is 0.966300
average return over  950000 spins is 0.957279; average return over last 10000 spins is 0.956600
average return over  960000 spins is 0.957481; average return over last 10000 spins is 0.976650
average return over  970000 spins is 0.957582; average return over last 10000 spins is 0.967300
average return over  980000 spins is 0.957528; average return over last 10000 spins is 0.952300
average return over  990000 spins is 0.957527; average return over last 10000 spins is 0.957450
average return over 1000000 spins is 0.957537; average return over last 10000 spins is 0.958500
legendary
Activity: 2940
Merit: 1333
Hi, dooglus-- I sent 1 BTC to 146aSkxyXWM4U7jPnsXhVHd1RfohnVDhPx. Enjoy!

Received, thanks.

I played 10 games at 0.1 BTC each:



So I kept only 0.6 BTC.  Well less than expected.

I asked to withdraw 0.6 BTC, and it appeared to let me, but some seems to be gotten lost in transaction:

newbie
Activity: 26
Merit: 0
Btw, dooglus, if you sign up for Kingcoin, let me know your receive address and I'll send you 1.0 BTC to play with to say thanks for this analysis!

I just signed up, but I was confused by the interface.  I think I ended up signing up with a blank password.

The signup page doesn't ask for the password twice, like every other signup page in the world does, so I thought it was a login page.  You shouldn't allow people to use blank passwords either, I think.  I can't find any way of changing my password.  Is there a way?

I made another account, this time specifying a password.  Its receive address is 146aSkxyXWM4U7jPnsXhVHd1RfohnVDhPx.

Thanks!

I sped up the simulation code - there's no need to shuffle all 1000 spots on the wheel when we only ever use the first 6.  It's still pretty slow, being written in Python and all, but I got another result:

average return over 100000 spins is 0.961925

Also, I couldn't find a way to get rid of the big grey 'Send to this address to play for real BTC!' box that popped up showing me my deposit address.  Eventually I found a slightly differently grey coloured X somewhere near the top right corner, but not close enough to the corner to really look like a 'close' button.  That closed the dialog, but it's pretty hard to notice it given its low contrast and unusual positioning.

Hi, dooglus-- I sent 1 BTC to 146aSkxyXWM4U7jPnsXhVHd1RfohnVDhPx. Enjoy!

Sanjay
sr. member
Activity: 266
Merit: 252
I just noticed on http://kingco.in/history.php your verify links are using the bitZino verifier directly, rather than your own.

I don't know whether that's cool (using a 3rd party to verify your results makes the verification more believable) or rude (did you ask their permission?).  Probably it's both...  Smiley

For the record, it's definitely cool with us Smiley The proliferation of provably fair games is good for bitcoin and it just good in general, so I'm all for it!
legendary
Activity: 2940
Merit: 1333
I just noticed on http://kingco.in/history.php your verify links are using the bitZino verifier directly, rather than your own.

I don't know whether that's cool (using a 3rd party to verify your results makes the verification more believable) or rude (did you ask their permission?).  Probably it's both...  Smiley
legendary
Activity: 2940
Merit: 1333
Also, I couldn't find a way to get rid of the big grey 'Send to this address to play for real BTC!' box

Once I did get rid of the box, the 'click to refresh balance' popup appeared.  It stayed up as I moused over the 'add btc' button, leading to this ugly mess:



It would be better to close the other popup before opening the new one, so only 1 ever shows up at a time.
legendary
Activity: 2940
Merit: 1333
Btw, dooglus, if you sign up for Kingcoin, let me know your receive address and I'll send you 1.0 BTC to play with to say thanks for this analysis!

I just signed up, but I was confused by the interface.  I think I ended up signing up with a blank password.

The signup page doesn't ask for the password twice, like every other signup page in the world does, so I thought it was a login page.  You shouldn't allow people to use blank passwords either, I think.  I can't find any way of changing my password.  Is there a way?

I made another account, this time specifying a password.  Its receive address is 146aSkxyXWM4U7jPnsXhVHd1RfohnVDhPx.

Thanks!

I sped up the simulation code - there's no need to shuffle all 1000 spots on the wheel when we only ever use the first 6.  It's still pretty slow, being written in Python and all, but I got another result:

average return over 100000 spins is 0.961925

Also, I couldn't find a way to get rid of the big grey 'Send to this address to play for real BTC!' box that popped up showing me my deposit address.  Eventually I found a slightly differently grey coloured X somewhere near the top right corner, but not close enough to the corner to really look like a 'close' button.  That closed the dialog, but it's pretty hard to notice it given its low contrast and unusual positioning.
newbie
Activity: 26
Merit: 0
According to some simulations I've run, the house edge for this game is around 4%:

average return over 20000 games is 0.965675
average return over 20000 games is 0.951625
average return over 20000 games is 0.961850
average return over 100000 games is 0.960370

Code:
#!/usr/bin/env python

import MersenneTwister19937

import random, string

class KingCoin:
    def __init__(self):
        seed = random.randint(0, 2**60)
        self.mt = MersenneTwister19937.MersenneTwister19937(seed)

        self.FOUR_DIFFERENT = 3 # 4 different colors in 4 spins
        self.SIX_SPINS = 2.5 # 6 spins, any color
        self.THREE_IN_ROW = 2 # 3 in a row
        self.THREE_OF_FIVE = 1.5 # 3 out of 5 (needs 5 non-black spins to pay)
        self.LOSE = 0 # spinning black = lose

    def play_once(self):
        wheel = '1'*3 + '0'*450
        wheel = [150] + map(lambda x: len(x)+100, string.split(self.mt.shuffle_string(wheel), '1'))
        n = 0
        spots = []
        for c in wheel:
            spots += c*[n]
            if (n == 0):
                n += 1
            else:
                n *= 2

        self.spots = self.mt.shuffle(spots)[:6]
        s0, s1, s2, s3, s4, s5 = self.spots

        # 3 spins
        if s0==0 or s1==0 or s2==0: return self.LOSE
        if s0==s1 and s1==s2: return self.THREE_IN_ROW

        # 4 spins
        if s3==0: return self.LOSE
        if s0+s1+s2+s3 == 15: return self.FOUR_DIFFERENT
        if s1==s2 and s2==s3: return self.THREE_IN_ROW

        # 5 spins
        if s4==0: return self.LOSE
        if s1+s2+s3+s4 == 15: return self.FOUR_DIFFERENT
        if s2==s3 and s3==s4: return self.THREE_IN_ROW
        c = {}
        for i in self.spots[0:5]:
            if c.has_key(i):
                c[i] += 1
                if c[i] == 3: return self.THREE_OF_FIVE
            else:
                c[i] = 1

        # 6 spins
        if s5==0: return self.LOSE
        if s2+s3+s4+s5 == 15: return self.FOUR_DIFFERENT
        else: return self.SIX_SPINS

k = KingCoin()

spins = 100000
sum = 0.0
for i in range(spins):
    sum += k.play_once()

print "average return over %d spins is %f" % (spins, sum / spins)

Btw, dooglus, if you sign up for Kingcoin, let me know your receive address and I'll send you 1.0 BTC to play with to say thanks for this analysis!

Thanks,
Sanjay
newbie
Activity: 26
Merit: 0
Does "red, red, yellow, red, red" count as a "3 out of 5" win?  It's a 4 out of 5, so I can imagine you might not count it as a win, though that would seem a little harsh.

Yes, that would count as a "3 out of 5 win". Per the official rules:

"3 out of 5: Hit the same color in any 3 of the previous 5 spins. Note that this winning pattern can only be achieved after the wheel has been spun at least 5 times."

I do not say "exactly 3 of the previous 5." But still, good question.

Sanjay
newbie
Activity: 26
Merit: 0
According to some simulations I've run, the house edge for this game is around 4%:

average return over 20000 games is 0.965675
average return over 20000 games is 0.951625
average return over 20000 games is 0.961850
average return over 100000 games is 0.960370

Code:
#!/usr/bin/env python

import MersenneTwister19937

import random, string

class KingCoin:
    def __init__(self):
        seed = random.randint(0, 2**60)
        self.mt = MersenneTwister19937.MersenneTwister19937(seed)

        self.FOUR_DIFFERENT = 3 # 4 different colors in 4 spins
        self.SIX_SPINS = 2.5 # 6 spins, any color
        self.THREE_IN_ROW = 2 # 3 in a row
        self.THREE_OF_FIVE = 1.5 # 3 out of 5 (needs 5 non-black spins to pay)
        self.LOSE = 0 # spinning black = lose

    def play_once(self):
        wheel = '1'*3 + '0'*450
        wheel = [150] + map(lambda x: len(x)+100, string.split(self.mt.shuffle_string(wheel), '1'))
        n = 0
        spots = []
        for c in wheel:
            spots += c*[n]
            if (n == 0):
                n += 1
            else:
                n *= 2

        self.spots = self.mt.shuffle(spots)[:6]
        s0, s1, s2, s3, s4, s5 = self.spots

        # 3 spins
        if s0==0 or s1==0 or s2==0: return self.LOSE
        if s0==s1 and s1==s2: return self.THREE_IN_ROW

        # 4 spins
        if s3==0: return self.LOSE
        if s0+s1+s2+s3 == 15: return self.FOUR_DIFFERENT
        if s1==s2 and s2==s3: return self.THREE_IN_ROW

        # 5 spins
        if s4==0: return self.LOSE
        if s1+s2+s3+s4 == 15: return self.FOUR_DIFFERENT
        if s2==s3 and s3==s4: return self.THREE_IN_ROW
        c = {}
        for i in self.spots[0:5]:
            if c.has_key(i):
                c[i] += 1
                if c[i] == 3: return self.THREE_OF_FIVE
            else:
                c[i] = 1

        # 6 spins
        if s5==0: return self.LOSE
        if s2+s3+s4+s5 == 15: return self.FOUR_DIFFERENT
        else: return self.SIX_SPINS

k = KingCoin()

spins = 100000
sum = 0.0
for i in range(spins):
    sum += k.play_once()

print "average return over %d spins is %f" % (spins, sum / spins)

Wow, impressive! I did some simulations myself and got virtually the same figures. Thanks for doing this!
legendary
Activity: 2940
Merit: 1333
According to some simulations I've run, the house edge for this game is around 4%:

average return over 20000 games is 0.965675
average return over 20000 games is 0.951625
average return over 20000 games is 0.961850
average return over 100000 games is 0.960370

Code:
#!/usr/bin/env python

import MersenneTwister19937

import random, string

class KingCoin:
    def __init__(self):
        seed = random.randint(0, 2**60)
        self.mt = MersenneTwister19937.MersenneTwister19937(seed)

        self.FOUR_DIFFERENT = 3 # 4 different colors in 4 spins
        self.SIX_SPINS = 2.5 # 6 spins, any color
        self.THREE_IN_ROW = 2 # 3 in a row
        self.THREE_OF_FIVE = 1.5 # 3 out of 5 (needs 5 non-black spins to pay)
        self.LOSE = 0 # spinning black = lose

    def play_once(self):
        wheel = '1'*3 + '0'*450
        wheel = [150] + map(lambda x: len(x)+100, string.split(self.mt.shuffle_string(wheel), '1'))
        n = 0
        spots = []
        for c in wheel:
            spots += c*[n]
            if (n == 0):
                n += 1
            else:
                n *= 2

        self.spots = self.mt.shuffle(spots)[:6]
        s0, s1, s2, s3, s4, s5 = self.spots

        # 3 spins
        if s0==0 or s1==0 or s2==0: return self.LOSE
        if s0==s1 and s1==s2: return self.THREE_IN_ROW

        # 4 spins
        if s3==0: return self.LOSE
        if s0+s1+s2+s3 == 15: return self.FOUR_DIFFERENT
        if s1==s2 and s2==s3: return self.THREE_IN_ROW

        # 5 spins
        if s4==0: return self.LOSE
        if s1+s2+s3+s4 == 15: return self.FOUR_DIFFERENT
        if s2==s3 and s3==s4: return self.THREE_IN_ROW
        c = {}
        for i in self.spots[0:5]:
            if c.has_key(i):
                c[i] += 1
                if c[i] == 3: return self.THREE_OF_FIVE
            else:
                c[i] = 1

        # 6 spins
        if s5==0: return self.LOSE
        if s2+s3+s4+s5 == 15: return self.FOUR_DIFFERENT
        else: return self.SIX_SPINS

k = KingCoin()

spins = 100000
sum = 0.0
for i in range(spins):
    sum += k.play_once()

print "average return over %d spins is %f" % (spins, sum / spins)
legendary
Activity: 2940
Merit: 1333
Does "red, red, yellow, red, red" count as a "3 out of 5" win?  It's a 4 out of 5, so I can imagine you might not count it as a win, though that would seem a little harsh.
Pages:
Jump to: