

Show HN: WebRTC Poker - kinger
https://bitflop.me

======
kybernetikos
I was hoping someone had found and implemented a practical Mental Poker
algorithm, since webrtc is p2p, and you usually don't want to have to trust
the other parties in a p2p system.

[https://en.wikipedia.org/wiki/Mental_poker](https://en.wikipedia.org/wiki/Mental_poker)

~~~
dminor
Mental poker is a neat thought exercise, but if one of the parties drops out
mid-hand, it can't be completed. If there are connectivity issues or if
someone doesn't like the flop that's a huge problem.

~~~
mithras
In a serious bitcoin/mental poker implementation you could let people put up a
bond that's used to pay the other party if you do that. It's not exactly zero
trust anymore but still better than the conventional model.

------
Wingman4l7
What shuffling algorithm do you use?

Here's a description of a very solid one:
[http://www.briggsoft.com/docs/pmavens/Technical_Shuffling.ht...](http://www.briggsoft.com/docs/pmavens/Technical_Shuffling.htm)

Here's an example of what can happen if you do it wrong:
[http://www.cigital.com/papers/download/developer_gambling.ph...](http://www.cigital.com/papers/download/developer_gambling.php)

~~~
kinger
I'm using Fisher-Yates for the shuffle algo
[http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle](http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle)

------
kinger
Thanks to all those sitting and playing against me! Its been so much fun
chatting with you all. I will keep creating games until 5pm Pacific time, so
feel free to join and play me! My username is ziebac.

~~~
bodhisoma
I'm interested in getting in a match as well. Username is "quux".

10/20, t1500, gogogo. =)

------
dl8
As an avid poker player, I think this is a neat idea for a lot of casual live
players to get into online play.

------
dummyasking
have you posted this to 2p2? Feel like they would be very receptive to a
version of this game that could allow for bitcoin and potentially other
wagering

~~~
kinger
This is still very early in development, and needs a lot more work before it's
ready for some serious wagering.

~~~
bodhisoma
You might still want to post this to 2+2. Granted, 99% of the readers won't be
interested in a play money site with virtually zero traffic but 1% will and 1%
of 2+2 is a lot of people.

You might be intentionally keeping this on the downlow (so I won't go post it
myself, obv) but if not, and you want eyeballs to work out the kinks, that's
your place.

------
rcknight
Small comment: I was slightly confused by the new game form.

I assumed that your watermarked values were defualts (which i was happy with)
.... so didn't change them, then couldn't work out why the create game button
was disabled.

~~~
kinger
Thanks so much for the feedback! You're right , this is kind of confusing, and
will be fixed shortly.

------
rjv
> Can bitflop games be monitored or recorded?

The answer to this may be a little misleading. There's nothing really stopping
anyone from recording their own screen (which includes the opponent's video
broadcast).

~~~
kinger
This is an excellent point. I will definitely reword that FAQ to account for
this.

------
rschmitty
I can hear my own sounds (voice, clicking, etc), is there a way to disable
that?

~~~
kinger
As of right now, you can only disable the microphone completely, but I will
look into taking care of this, as it is quite annoying!

~~~
Wingman4l7
Are you looking at doing something like Ventrilo's PTT (Push-To-Talk) --
hotkey-based transmitting like 2-way radios?

------
degenerate
Do you have some links that helped you get started with the whole WebRTC
setup? I watched the google i/o talk on WebRTC
([https://www.youtube.com/watch?v=p2HzZkd2A40&hd=1](https://www.youtube.com/watch?v=p2HzZkd2A40&hd=1))
but it's still a mystery to me how to implement STUN and ICE, which they
didn't go over in the talk. Some SaaS services are popping up but I'd like to
know if you did this all from scratch and what resources you used.

~~~
kinger
This was all built from scratch, and the best article I came across was
[http://www.html5rocks.com/en/tutorials/webrtc/basics/](http://www.html5rocks.com/en/tutorials/webrtc/basics/)

This helped me understand how every part of the process worked.

~~~
degenerate
Wow, that's a thorough article. Thanks for sharing!

------
malandrew
How would one go about implementing a distributed poker system where one could
not cheat?

~~~
dminor
Even if you can manage to implement a system where everyone trusts the deal,
you still have the problem of collusion between players.

You can avoid collusion by only playing heads up (2 players), but then you
have the problem that there is very good AI for heads up.

In short, it's probably not possible to completely eliminate it.

~~~
Wingman4l7
Heads-up play will prevent collusion based on sharing your known hole cards
with others, but it of course can't prevent the "asking a friend sitting next
to you their opinion on the hand"-type collusion. The webcam video feed would
prevent that, though. =)

The AI for fixed limit is much better than that for no-limit _(you can do more
statistical math on the situation)_ ; I could have sworn it wasn't that great
on heads-up but now you've got me doubting my memory.

~~~
bodhisoma
>> Heads-up play will prevent collusion based on sharing your known hole cards
with others, but it of course can't prevent the "asking a friend sitting next
to you their opinion on the hand"-type collusion. The webcam video feed would
prevent that, though. =)

Not unless you require nobody listens to music on headphones.

Even then, people using micro earpieces which sell for under $100 would go
undetected.

If you required an inspection of every player's ear over the webcam, an app
which allows two SMS devices to do Morse code with the player having vibrate
turned on would suffice. One buzz for check/fold, two buzzes for bet/raise
followed by a pause then binary for bet size.

I like the idea of the webcam as a novelty but I don't see how it offers
anything but the illusion of honesty.

~~~
Wingman4l7
Funny that you came up with an SMS-based "buzzer" \-- a technique similar to
this was used to gain an edge in casino blackjack decades ago. A custom
microcomputer was hidden in the player's shoe, and IIRC they used vibrating
motors to communicate the correct plays in one version of the device.

The webcam I think isn't there for an "illusion of honesty" but rather for a
more personal / "human" game experience.

------
applecore
Do you accept bitcoins?

~~~
kybernetikos
That's an interesting idea. Given how flexible the bitcoin transaction script
system is, it might be possible to set up a system where the bitcoins can only
be claimed by someone who can prove that they won.

~~~
nly
The bitcoin script system only really allows by hashing. People have gotten
very hyped up about the programmability of the scripting system in Bitcoin,
but anything slightly interesting still requires trust in one or more
arbitrators.

~~~
Anderkent
But less trust than the currently used alternatives. In a 2 out of 3
transaction you have to trust the arbitrator is not colluding with the other
person, but you don't have to worry about him taking the money for himself.

~~~
kybernetikos
Yes, this seems like the most likely arrangement - in a poker game if a
significant fraction of your opponents are colluding without your knowledge
then you're in trouble anyway, so you already have that level of trust. If you
can use the same level of trust to claim the prize as you already implicitly
have - maybe that 2/3rds of the players systems agree that a particularly
player won, that would probably be good enough.

Another approach might be that everyone playing a game also automatically
randomly observes another game somewhere, and their view of what happened is
added to the trust calculation.

------
kinger
If anyone wants to play me :)
[https://bitflop.me/game/play/62](https://bitflop.me/game/play/62)

~~~
kinger
Im waiting at
[https://bitflop.me/game/play/114](https://bitflop.me/game/play/114) for
someone to join, if anyone wants to play (use your webcam please)! I'm
crushing everyone today!

------
karolisd
Is this just 1v1? How many people could this scale to?

~~~
kinger
Ya, this is 1v1 as of right now, but a full table (9 people) is currently in
the works.

~~~
alooPotato
anyway to get notified when you launch this?

~~~
kinger
Yes, of course! Follow on twitter to stay updated
[https://twitter.com/bitflopme](https://twitter.com/bitflopme)

------
lcasela
Does this use bitcoin or something?

~~~
kinger
Not right now since it's still alpha, but soon (hopefully).

------
EGreg
This is pretty awesome!

------
swaraj
Crazy mic feedback :(

~~~
kinger
This is first up in my list of things to fix!

