coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 06, 2012, 10:45:51 PM Last edit: November 28, 2012, 11:02:05 PM by coolidgecoin |
|
I've built a delightfully simple bitcoin game called Kingcoin (at http://kingco.in) that I'd like to share with the community. Spin a multi-colored wheel and match various patterns (like, hitting the same color three times in a row) to win. You can try it out for free and play for real bitcoins when you're ready. Kingcoin uses a slight modification of Bitzino's technique to prove that it's fair. http://kingco.inI welcome any and all feedback! I plan to make the game even more fun by introducing a daily jackpot, so stay tuned. Thanks, Sanjay Updates to KingcoinNovember 28, 2012A minimum bet amount of 0.01 is now required (either BTC or points). November 25, 2012Some game parameters have changed to benefit the player.- The expected value of Kingcoin has increased to be competitive with other games. It is now approximately 0.984.
- Game parameters are as follows: Black slice is 16% of the wheel (used to be 15%), King slice is 1.3% of the wheel (used to not exist), and other slices are a minimum of 15% of the wheel (used to be 10%).
- The maximum number of spins per game is now 5.
- Each game is logged in the database with more details (in case I have to process refunds)
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 13, 2012, 05:11:54 AM |
|
I welcome any and all feedback! I plan to make the game even more fun by introducing a daily jackpot, so stay tuned.
I like it. I only played play money, but didn't do very well. Do you have any idea what the house edge is?
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
Stephen Gornick
Legendary
Offline
Activity: 2506
Merit: 1010
|
|
November 13, 2012, 07:28:18 AM |
|
I welcome any and all feedback! I plan to make the game even more fun by introducing a daily jackpot, so stay tuned.
There's still this issue, with Android: from an Android mobile when I login, the logout button isn't clickable for some reason.
The only way to logout is to get to a 0 balance and then a link for logout is shown.
|
|
|
|
Stephen Gornick
Legendary
Offline
Activity: 2506
Merit: 1010
|
|
November 13, 2012, 08:47:27 AM |
|
It appears there is no memory of games that have started.
Specifically, let's say a browser crashes in the middle of a spin. The funds are lost. I can log out and log back in and my funds are lost and it is looking for me to start a new game. I don't see any way to resume from where the crash occurred.
(This happened to me after starting to play with some newly deposited coin.)
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 13, 2012, 11:06:26 PM Last edit: November 13, 2012, 11:22:25 PM by coolidgecoin |
|
It appears there is no memory of games that have started.
Specifically, let's say a browser crashes in the middle of a spin. The funds are lost. I can log out and log back in and my funds are lost and it is looking for me to start a new game. I don't see any way to resume from where the crash occurred.
(This happened to me after starting to play with some newly deposited coin.)
Hi, Stephen-- Let me know how much you lost and your address and I'll refund you. You are right; as of now, you must finish a game once you start it, otherwise you lose the game. I will change this if Kingcoin becomes popular, but right now it seems to be a corner case that probably doesn't merit the time needed to fix. I do log every game, wager, and outcome (as well as all items required for provability) in my database once the game has started. So even if your browser crashes mid-game, I have a record of it. EDIT: I apologize for the inconvenience, Stephen! Thanks, Sanjay
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 13, 2012, 11:12:26 PM Last edit: November 13, 2012, 11:22:54 PM by coolidgecoin |
|
I welcome any and all feedback! I plan to make the game even more fun by introducing a daily jackpot, so stay tuned.
I like it. I only played play money, but didn't do very well. Do you have any idea what the house edge is? Hi, dooglus-- It is actually very difficult to compute the house edge because the color slices are of random and variable sizes each game. If Kingcoin becomes popular, I'll figure out the precise odds and post. Each game, the minimum size of each slice is 10% of the total wheel. The black slice is a constant 15%. The wheel is spun randomly (per the seeds, which are provided by the user but otherwise based on a timestamp), but the precise same location cannot be hit twice (because the wheel is represented as a randomized string of integers (each slice represented by one integer), and the first 6 integers of the string are the outcome of each game). I believe that is all there is to the game! I'm glad you like the game! EDIT: Forgot to mention one more thing. I publish each and every paid game's outcome at http://kingco.in/history.phpThanks, Sanjay
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 13, 2012, 11:13:14 PM |
|
I welcome any and all feedback! I plan to make the game even more fun by introducing a daily jackpot, so stay tuned.
There's still this issue, with Android: from an Android mobile when I login, the logout button isn't clickable for some reason.
The only way to logout is to get to a 0 balance and then a link for logout is shown.
Ack, my apologies. It's designed for Chrome and Firefox only. I'll add a message on the site about this. Thanks, Sanjay
|
|
|
|
Stephen Gornick
Legendary
Offline
Activity: 2506
Merit: 1010
|
|
November 13, 2012, 11:37:00 PM |
|
It's designed for Chrome and Firefox only. I'll add a message on the site about this.
This is with Chrome browser on Android. This occurs the same under both a mobile device as well as with a tablet (Nexus 7)
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 14, 2012, 02:10:08 AM |
|
Each game, the minimum size of each slice is 10% of the total wheel.
I would include this kind of detail on the site somewhere, along with what the total 'size' of the wheel is, etc. Then people can calculate (via simulation, if not analytically) the house edge. Edit: I notice the 'division of the wheel' isn't shown in the 'provably fair' section until after my first spin. It could be shown as soon as the division has been revealed graphically, since by then I've already committed to playing and spent my BTC.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 14, 2012, 02:23:03 AM |
|
I would include this kind of detail on the site somewhere, along with what the total 'size' of the wheel is, etc. Then people can calculate (via simulation, if not analytically) the house edge.
I see you're shuffling 450 0's and 3 1's. I saw one wheel where there were no 0's after the 3rd 1. I guess that means the corresponding colour was at its minimum of 10%. It looks to me like each 0 represents 1/1000th of the wheel, since 10+10+10+10+15 = 55% of the wheel is already accounted for by the fixed size black and the 4 10% minimums leaving 45% represented by the 450 0's you shuffle. I'd like to see this explicitly stated in your 'how it works' section.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 14, 2012, 09:01:03 PM |
|
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.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 14, 2012, 09:57:25 PM |
|
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 #!/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)
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 15, 2012, 08:01:00 AM |
|
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 #!/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!
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 15, 2012, 08:02:34 AM |
|
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
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 15, 2012, 06:55:14 PM |
|
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 #!/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
|
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 15, 2012, 07:19:59 PM |
|
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.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 15, 2012, 07:25:14 PM |
|
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.
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
dooglus
Legendary
Offline
Activity: 2940
Merit: 1333
|
|
November 15, 2012, 07:31:13 PM |
|
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...
|
Just-Dice | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | Play or Invest | ██ ██████████ ██████████████████ ██████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████ ██████████████ ██████ | 1% House Edge |
|
|
|
libertaad
|
|
November 16, 2012, 05:32:04 AM |
|
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... For the record, it's definitely cool with us The proliferation of provably fair games is good for bitcoin and it just good in general, so I'm all for it!
|
|
|
|
coolidgecoin (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
|
November 16, 2012, 05:38:45 PM |
|
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
|
|
|
|
|