Bitcoin Forum
December 11, 2016, 12:24:18 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: A multi player dice game  (Read 848 times)
grondilu
Legendary
*
Offline Offline

Activity: 1134


View Profile
October 26, 2010, 01:06:02 AM
 #1

Here is an other game concept.  It can involve several players.

We are going to bet on the outcome of a dice, i.e. of the outcome of a random number from 0 to 5.

There are several possible bets, basically any combination of the ways you can place you money on the 5 numbers.

Thus, a example of a bet can be :

0: 0
1: 1BTC
2: 2BTC
3: 0
4: 0
5: 0

In this exemple, the player bets 1 bc on the 1, and 2 bc on the 2.  Such a bet can be noted (0 1 2 0 0 0).

Therefore we have a collection of bets  (bet_{i,j}) , where i=0..5 and j=0..N-1,  and N is the number of players.

Let's note k the outcome of the dice,  then the player n will receive the following amount :

G_n =  \sum_{i,j} bet_{i,j} * bet_{k,n}/\sum_j bet_{k, j}


In order to decide the outcome of the dice, each player thinks about a number, and computes a hash of a string beginning with this number.  The right part of the string should be some random characters.  Such a string could be :

324  jkncjknsdninusjiujzdujsqoiwqlwdxx

for instance.

Each player has to keep this string secret until everybody is ready.   Meanwhile, everybody shows the hash of their string, and the corresponding bet.


For instance a player who wants to bet 10 BTC on '4' would say this :

(0 0 0 0 10 0)
eb36f2f12cc6b586098a10c90493799872f55fcd4fae7b5a9bbc8dc44a2ba06c

Once everyone has placed his bet, everybody reveals his original string.

We then calculate the sum of all revealed numbers, modulo 6.


All losers should pay the winners in proportion of their bets, in order to comply to the G_n formula.  This means that a player x must pay to a player n the following amount :

bet_{i,x} * bet_{k,n}/\sum_j bet_{k, j}

A loser who refuses to pay will not be accepted for next games.

Ok ?



Let's try.  Here is my bet :

(0.01 0 0 0 0 0)
503d6a1b3c06f8d62f38e5ebc6cd6a658cf109372d3c5e89ac06cc047ea9a0d8

If you don't mind, I'll store my original string here, in encrypted form (I
don't want to store it on my disk where I could easily forget about it or
remove it).

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.10 (GNU/Linux)

hQIOA9o1PxP9fpBoEAf7BTWWCIQPyIhD1KtlMBx1TKXjUjaBncRJHDCRaYbw1XCu
PDVUKs1zoOXOsIXDqIk35xY6Dw/QW0w1zNUqExaox56Isyg9kkzKOA8K5rWv4gA8
jUazIawCwKbEYYq4LHkcV5K0ET4CzBmZ/fy2yQ9sbl1QvitaKVbvmYb5mh+kqhid
4lsmP5sgTJWXPt2iPXht7y/TOSKz3qxwFqknfq009V/jVTFHdfjWT/sJWhrKj+25
bdf2k8ETZLkyALhHDlJUgxaYxReZEqUUV5ev7zF926w6xBdOExwV6SYqsWLojhaU
yEHe3Gy9cXBKP6SXVUFklcIcRZNoO+PVwscrYG5MawgAt1s4ZFYSvNSxD5fqzQ53
ZRc7pKiwHG+TnorDggJLu6KgN4AL1PClVNDIljNPzLv2vqSxz+C7Mjxz4ezevMCP
6Xf/7DG+BlIUPO+/vfbj0YDNaPwp8eQCtO5Q5+u3/LSxgbeM6eTWkYzpZfjyAG0w
AKBW06RCXZwrpo9qZVwfNY+3GMC24JYPe6RRcnhqeZGCYu3gBsO24vpzMe49bCqa
oExZPfZ1lf0sXRKriYvNV5a6II5wEIIGRw09Oh1NiFiLrdGngeOfaWIkOwi/i8S9
fSuLiy/ZGacSS1RQfdrsKkgGYn2YjntNKK1liOBAGK0Jy0VNa8tnUZ/YeuVAzc9U
m9JqAQz7J7erktvy/cB30vWD1xn4BPgQAqfQr901BtjNDMf4cGnhOPeew+I1yOIF
NF0zrOeBbeNcWvzKSyQdUGOektb0qaolAeXfG7nFMFwdrFXiLNYY8rTJ2t7ODwdK
bhe6zxePbm5HWSOz9w==
=pod8
-----END PGP MESSAGE-----
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!