Hacker News new | ask | show | jobs
Show HN: WebRTC Poker (bitflop.me)
75 points by kinger 4575 days ago
16 comments

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

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.
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.
What shuffling algorithm do you use?

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

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

I'm using Fisher-Yates for the shuffle algo http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
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.
I'm interested in getting in a match as well. Username is "quux".

10/20, t1500, gogogo. =)

As an avid poker player, I think this is a neat idea for a lot of casual live players to get into online play.
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
This is still very early in development, and needs a lot more work before it's ready for some serious wagering.
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.

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.

Thanks so much for the feedback! You're right , this is kind of confusing, and will be fixed shortly.
> 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).

This is an excellent point. I will definitely reword that FAQ to account for this.
I can hear my own sounds (voice, clicking, etc), is there a way to disable that?
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!
Are you looking at doing something like Ventrilo's PTT (Push-To-Talk) -- hotkey-based transmitting like 2-way radios?
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) 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.
This was all built from scratch, and the best article I came across was http://www.html5rocks.com/en/tutorials/webrtc/basics/

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

Wow, that's a thorough article. Thanks for sharing!
How would one go about implementing a distributed poker system where one could not cheat?
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.

I'm really interested in poker, HU specifically, and I'd be perfectly happy if I could play an AI that gave me a challenging game but the best I've found is Poker Academy Pro and that was pretty poor. I found the AI to be sort of ridiculous and quite exploitable. And I'm not a very good player, maybe a 10NL break-even player (without rake).

So if you know of a good AI that can crush microstakes, I'd love to know about it. Since I'm in it for the challenge and not the $$, I'd be happy to play a computer.

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.

>> 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.

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.

Do you accept bitcoins?
No, but this option has always been in the back of my head. This has just been a weekend project for the past few months, and is still in alpha, but once I get to a stable/secure release this option will be explored.
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.
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.
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.
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.

Could an alternate coin system be developed to get around this pitfall? Would it still carry the advantages inherent in bitcoin?

Could bitcoin be extended to support such a feature it were possible?

Give it a little time. After being an early adopter, bitcoin has pretty much bored me to death recently but this new idea of DACs, protoshares etc. has me interested again like bitcoin originally did.

DAC stands for distributed autonomous corporation. "Corporation" in this context is a little bit wonky because bitcoin is a DAC. I could see there being both general gambling DACs or specific to poker. It takes a little while to wrap your head around the concept, so I will just give you some reading:

1 - http://letstalkbitcoin.com/dacs-that-spawn-dacs/#.Up0Y9uL3P2...

2 - http://bitsharestalk.org/index.php?board=9.0

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

I'm a stay-at-home dad so my availability will be sporadic. It'd be cool to get in a game tho.

Timezone is EST.

Is this just 1v1? How many people could this scale to?
Ya, this is 1v1 as of right now, but a full table (9 people) is currently in the works.
anyway to get notified when you launch this?
Yes, of course! Follow on twitter to stay updated https://twitter.com/bitflopme
Does this use bitcoin or something?
Not right now since it's still alpha, but soon (hopefully).
This is pretty awesome!
Crazy mic feedback :(
This is first up in my list of things to fix!