[viff-devel] Bitonic sort
Martin Geisler
mg at daimi.au.dk
Tue Aug 12 05:17:13 PDT 2008
Ivan Bjerre Damgaard <ivan at daimi.au.dk> writes:
>> Martin Geisler <mg at daimi.au.dk> writes:
>>
>> I began looking at card shuffling because I want to make a small
>> tutorial for VIFF, something that will explain how to make a
>> program. And for that I figured that some card game would be cool.
>> I don't know which game yet, so let let me know if you have any
>> good idea!
>
> Blackjack perhaps? seems simple in that you just draw cards until
> you win or loose. Can also be played with 3 people, one being the
> bank - so you don't necessarily need 2-party computing.
Yeah, I guess Blackjack would work. I don't know much about card
games, so I looked up the rules on Wikipedia and found that they were
a lot more complicated than I thought :-)
http://en.wikipedia.org/wiki/Blackjack
But if we simplify things to the core, then I think it would be okay
to program, even for a tutorial. So the game would go like this:
* Cards are shuffled. Using MPC here gives us a fair shuffle where
neither the bank nor the players learns anything about the order.
* Each player is dealt two cards == two secret shares are opened to
each player. For the dealer one opening is done to all players.
* Each player can now choose either "hit" (get a new card) or "stand"
(finished).
* When everybody "stands", the dealer would normally reveal his
unopened card and the one with the best hand wins (as long as the
hand is less than 21).
We could do the comparisons securely instead instead of opening here
and I guess that would remove some of the chance for card counting.
* When the comparisons are done the winners and loosers are announced
to everybody and a new round can begin using the remaining cards.
That doesn't sound too bad... I don't know when I'll get around to
implementing it and you guys are welcome to beat me to it! :-)
--
Martin Geisler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.viff.dk/pipermail/viff-devel-viff.dk/attachments/20080812/d2b7561d/attachment.pgp>
More information about the viff-devel
mailing list