Title: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 04:18:49 AM I'm going to host a 2 or 3 player game of forum based online poker.
Buy in is... uh... ok, let me think about this... maybe 0.10 BTC maximum per player. I will be the dealer, and I will shuffle a deck, hash it, and show the hashes. Then I will allow players to give me a random character seed, which will be hashed with a fixed and unknown salt (which will be revealed later), to use as the "cut" for the shuffled deck. Then I will post the final shuffled deck. The game starts. I deal 5 cards to each player. I PM the players their cards and whatever secrets you need to verify that you indeed got the cards you were supposed to. Players DO NOT see other player's cards until the end of the game, if they deserve to see it. Then players bet, raise, check, call, whatever. To keep this game running smoothly in a timely manner, I need at least 2 players, maximum of 4 players, who can reasonably be online on this forum 3 times a week, daily if possible. Remember, the dealer (me) is a very busy person and I might not be online every day as well. So, what kind of game do we want to play? I was thinking of something very simple. Summary: 1. I am the dealer. 2. I escrow your buy-in for your "chips". 3. I shuffle the deck. 4. I let the players "cut" the deck according to certain cryptographic rules and sorting, which are provably fair. (see my lotto for an example.) 5. I deal one card from the top of the deck to the first player. 6. I deal the next card, to the next player. 7. Each player gets 5 cards. I send a PM what your cards are. 8. You guys play, bet, call, fold, whatever. 9. The winner, gets the pot. His cards have to be revealed, of course. 10. All players can verify their own cards, and cards that can be seen on the table. 11. No player can see any other cards they are not supposed to see. 12. There is no house rake or dealer rake for this one game (or for the next), but it would be nice to tip the dealer. 13. All BTC will be held in a cold wallet I control, the blockchain will be proof of confirmed buy-ins and payments to the winner. Ok, tell me I am missing something, because I know I am missing something. For this first game, I would like to keep this simple, so maybe I want 3 players, each sends 0.3 BTC to me (on the table), and this is a simple 5 card poker game. I confirm the order of players. I confirm all "moves". I send the pot to the winner. This game will take maybe several days. So this is gonna suck for the impatient types. I will not host this on IRC or some chat room, not until I have a "server" up and running where I can just input the needed variables. What I am still wondering about are the bets or something. How does that go about. Anyway. Ok, what I need now are volunteers / players. Who's up for this? No free roll or free play, or play money. I am pretty sure I will not attract high rollers, so you guys decide on min / max bets or something. I suggest we start at 0.01 and maximum maybe of 0.30. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 04:19:28 AM Post reserved for shuffling seeds, deck, etc.
SHA256 of Dealer Shuffle 1 seed 5bbef58be675e74d11c88db84d8083d57f3ca50e696f3a7ced5e00fbe95b82b6 SHA256 of Dealer Shuffle 2 seed 4d5016cf416539544bb12a11c118bb01df463555c4a1364ef093f96f2d128eb2 Dealer Shuffle 1 will be used for the initial shuffling of the deck. Dealer Shuffle 2 will be used for the final shuffling of the deck, after the players have shuffled or cut the deck. Before the game starts. Both seeds are 64 character alpha numeric. Both seeds will be revealed either after the shuffling, or after the game. I'm still thinking how to shuffle the deck, but I have a couple of ideas already in mind. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: cparsley on August 15, 2013, 04:22:28 AM Depending on what others say for stakes, etc, I'm game for Dabs test at 0 rake.
Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 04:37:38 AM SHA256 of shuffle seeds posted. Someone quote that so I can't change it. I need players now.
Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 05:10:02 AM I will use a standard 52 card deck as follows: (unshuffled)
Code: Card (Short) Card (Long Name) Each card is now combined with a secret for each card that only the dealer knows and then hashed. The results are as follows: Code: Card SHA256 You can use the above hash result to verify that I am indeed giving you the card you are supposed to have. At the time I deal the card to you, I may reveal the Card Secret as well. I then take the Card, Card Secret and Dealer Shuffle 1 Seed, concatenate that, hash that, then sort it. Code: 01d395b34d7790d6d7d6c2708ccfe3a0f89e404bb0cdfb66ea13ab5b7a4e3408 That now represents the deck of cards shuffled. The Dealer shuffle seed can be revealed now, because it doesn't really matter unless you know the Card secret. When the Card secret is revealed later (when I deal you the cards), you can see where it is in the deck. But you still can not see any other cards. Only the dealer (in this case, me) can see the deck. However, I will reveal the Dealer Shuffle Seeds after the game, just so players don't get a clue. To make this Provably Fair, I will now require each player to provide "Player Seeds" composed of 20 digits. Allowed characters are the numbers from 0 to 9. You can grab some examples from this link: http://www.random.org/strings/?num=10&len=20&digits=on&unique=off&format=html&rnd=new I am only allowing numbers to be used, to prevent players from providing seeds which can look offensive (such as profanity.) I will then use these player seeds, concatenate the seed + the letter P + the digits 01 to 52, hash that, then sort it. This now represents your shuffle. The letter is used to make my spreadsheet know this is a string and not a number. The cards then get sorted per the player hash of the player seed. This can be done for all players at once, or for each player in order. Then the Dealer Shuffle 2 Seed is used in the same fashion. All player seeds and dealer seeds are revealed to show that the deck has indeed been shuffled according to all shuffle seeds. You still don't know what the cards are until I show them to you. Okay, who wants to play? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 06:56:25 AM Oh yah, this was inspired by this other thread:
https://bitcointalk.org/index.php?topic=266791.40 Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 15, 2013, 09:00:45 AM http://en.wikipedia.org/wiki/Five-card_draw
This is the game I was thinking. To keep things simple. I need 2 or 3 players. 4 maybe. This is subject to collusion, but not subject to insider access (because I'm the dealer). I urge the players, to play fair anyways. Don't collude. Don't tell the other players what your cards are. I can't stop you though. You could lie to them, they might fold. hehehe. But they won't believe you unless you show the relevant hashes. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on August 15, 2013, 04:56:59 PM For disconnecting players, I think a default fold if you don't connect is best. The "all-in" on disconnect does not make sense to me. But I've not played any online poker, so what do I know... This is a feature that is often abused, which is why many sites don't have it. Players deliberately disconnect to get protection. It basically means they're considered "all in" and don't have to call any more bets, but could still win the hand. Even though I get disconnected sometimes, I generally prefer that a disconnected player gets treated like anyone else, i.e., if they don't call a bet they get folded. Quote As for cheating, the server can always cheat, that's a given. All casinos can cheat. All dice site owners / operators can cheat. There just isn't a practical way around that. And even if the site does not cheat, what if it does not pay out the pot? All new casinos are probably scams until they have stood the test of time, or the reputation of the operator is at stake. EV could have cheated SD, we would never know. dooglus has said, he could do the same for JD, but he claims he does not. I disagree on that. Precisely because of people like dooglus and others who don't post, but simply collect data, a rigged SD would produce skewed data that would basically scream "rigged." The same is true of poker sites. I am nowhere near the statistician that many poker players are, but even I had a couple million hands from Stars at one point and cranked it through SPSS a few times to figure things out. Obviously, one of the things you want to check is "is it rigged?" Even though others did it, I also did and found nothing, i.e., the data was consistent with the null hypothesis. More usefully, I also did population analysis correlating things like VP$IP (percentage of the time the player puts money into the pot voluntarily) against profit with players I had lots of hands on, and unsurprisingly found that at a certain breakpoint, players were almost all losers or winners just based on that stat alone. In any event, any significant rigging would stand out like a sore thumb to people who analyze data like this as a hobby. People like dooglus and probably others we don't see as often would be the canaries in the coal mine, and their analysis of the data could be replicated by others. Quote @darkmule, would you be so kind as to enumerate a typical 5 card draw poker game with 4 players, for example. I was thinking of just making a simple game where: I'd consult either Hoyle, Scarne, or the original Super/System by Doyle Brunson on draw games. The rules are actually pretty variable. I'll just point out where I disagree with this set of rules, but I will note that this is merely my opinion and people have played draw differently. Quote 1. Players seed. Dealer shuffles. 2. Dealer gives 5 cards to each player, face down. 3. Players see their cards. Players can immediately verify they were dealt the cards they were meant to have. 4. Player 1 has to check, bet, or fold. This is the blind or opening. He'll fold if he doesn't like his hand. In what used to be the most commonly played variant of five card draw, there was a jacks-or-better minimum to make the first bet. Once someone did open (and they could be forced to keep their discards and "show their openers" later), anyone else could play regardless of their hand. In antes only play, everyone would ante before the deal. However, draw poker can be played with other structures. Another common structure, especially after the popularity of holdem, is blind bets. Another possibility (more commonly used in stud games) is an ante with a "come-in." That is, everyone puts up an ante, but there is a full bet required to "come in" and actually play the hand. Quote 5. Player 2 can check, raise, or fold. 6. errr.. betting goes around the table to Player 3, to 4, then back to 1.. or.. well, I wanted to keep it simple. This is getting complicated already. 7. Showdown to whoever is left. It gets more complicated. There is also a question of how much you can bet or raise. In limit, there is a specific amount and all bets or raises have to be in that denomination. For instance, you can bet $1, and the raise is to $2, and subsequent raises are to $3, $4, etc. Sometimes the limit goes up on later streets, such as in limit holdem (my favorite game). Then there's no-limit. Any player can bet or raise any amount from the minimum allowed to their entire stack at any time (with a few exceptions for short-stack all-ins). Then there's pot-limit, which I'm sure people love to code. In pot-limit, you can bet anything from the minimum to the entire contents of the pot, or raise what the pot is after you call the bet to you. You probably shouldn't start with this, but pot-limit jacks-or-better was sort of the gold standard of draw games when they were still commonly played. (If the strategy for this game actually interests you, I recommend the long out of print Winning With Game Theory by Nesmith Ankeny. Good luck finding it.) Quote I think a solution is that the dealer does the shuffling. The players are only allowed to "cut" the deck. Without knowing the cards, they can cut anywhere and it just changes the order the cards are dealt. Whoa. Wait. While I was typing the above paragraph, it just dawned on me that the players can still shuffle the deck, without knowing the cards. Shuffling = cutting the deck multiple times, it can even be randomly ordered as many times as needed, and a script can be used to verify all of this. This is, I think, a good idea. The actual solutions players have used with physical cards that have evolved over the centuries of card-playing are probably a good analogy for what would work online, especially to solve the same problem, i.e., a fair deal. Quote I better start another thread already or we'll derail this one. Sorry mem for hijacking your thread accidentally. I'm not sure we're really jacking it. It probably now deserves its own thread, but the example of poker is pretty much a subset of the provably fair problem. Quote Here is my thread now: Provably Fair Online Poker by Dabs https://bitcointalk.org/index.php?topic=274068.0 I'll join you there, though I probably don't have much to say on the math issues where you are probably the expert. I do have one suggestion, though. I think five card stud would actually be a more approachable problem. Seven card stud, which more people play (even though they're usually in their eighties) would be not much more difficult. The reason five card stud is rarely played any more is that a skilled player almost invariably wins. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 16, 2013, 02:44:52 AM This is a feature that is often abused, which is why many sites don't have it. Players deliberately disconnect to get protection. It basically means they're considered "all in" and don't have to call any more bets, but could still win the hand. Even though I get disconnected sometimes, I generally prefer that a disconnected player gets treated like anyone else, i.e., if they don't call a bet they get folded. Okay, I agree on this one. Disconnected players will be treated as automatic folds. They lose. Therefore there is an incentive not to disconnect. We run into the problem of people having bad connections due to storms, earthquakes, tsunamis, or whatever. Quote Quote As for cheating, the server can always cheat, that's a given. All casinos can cheat. All dice site owners / operators can cheat. There just isn't a practical way around that. And even if the site does not cheat, what if it does not pay out the pot? All new casinos are probably scams until they have stood the test of time, or the reputation of the operator is at stake. EV could have cheated SD, we would never know. dooglus has said, he could do the same for JD, but he claims he does not. I disagree on that. Precisely because of people like dooglus and others who don't post, but simply collect data, a rigged SD would produce skewed data that would basically scream "rigged." ...snip... In any event, any significant rigging would stand out like a sore thumb to people who analyze data like this as a hobby. People like dooglus and probably others we don't see as often would be the canaries in the coal mine, and their analysis of the data could be replicated by others. That's the thing. Significant rigging will be seen. But an additional 1% or 2% on top, and it wouldn't look significant, it would look like variance. The fact is, it is possible to cheat. Not saying they did, but it's possible. It's insider or employee "super-user" or something, as what happened in poker sites. The problem with poker sites is that they are not provably fair. You can't look at their RNG, you can't look at their shuffling, you just get dealt cards and have to accept it. You can't see that the deck has not been tampered with in the middle of the game. With my system, or in attempt to make it provably fair, you see the deck. You see the order of the cards. What you can't see, are the cards themselves, until they are given to you, or until they are on the table face up. Quote This is, I think, a good idea. The actual solutions players have used with physical cards that have evolved over the centuries of card-playing are probably a good analogy for what would work online, especially to solve the same problem, i.e., a fair deal. I do have one suggestion, though. I think five card stud would actually be a more approachable problem. Seven card stud, which more people play (even though they're usually in their eighties) would be not much more difficult. The reason five card stud is rarely played any more is that a skilled player almost invariably wins. I think I will defer to your experience. Pick a game. In fact, I'm open to Texas Hold'em, or even Crazy Pineapple. We just need to agree to the exact rules of play, as well as the limits and betting rules. I used to play a lot of Pusoy Dos (Big 2) and simple draw poker games. Those were very popular where I am, and people have lost (and won) thousands. Most of the time though, it's social playing, with pennies (or equivalent) as bets. Or chocolate chip cookies, or food. Bragging rights just dont cut it. Poker needs money, or it's not really poker. Bitcoin in poker is going to be interesting. Because of the way this is going to be Provably Fair, the advantages are simple: Players know for sure they were dealt fairly, the deck was shuffled fairly, and no one who has a sun sized computer can cheat. (They need several galaxies worth of ASICs to crack SHA256). The disadvantage: You still need a dealer. You'll need one anyway, so that's not much of a problem. The bigger disadvantage is to me personally. This will become open and anyone can copy it without paying me any licensing or royalty or whatever. The only other way to cheat is to crack/sniff the traffic, or man-in-the-middle attacks, or trojan the players, or something along those lines, but that's beyond my control already. If I don't come up with my own poker site, someone else will. What I could do, for people to attempt to verify this or study it for statistics or analysis, without revealing the mechanism (but most of it has already been posted earlier), is to simulate a million hands, maybe of simply 5 card poker from a deck. 1. shuffle. 2. draw 5 cards. 3. show the 5 cards. 4. repeat 1 million times. Or would it have to be a complete game with several simulated players who don't fold? (no betting in this analysis.) Or I can change the game to be texas hold'em. Doesn't matter what game, as long as I can have my software simulate a million games. Edit 1: I'm not a math expert but I do understand what I'm talking about when it comes to secure hash functions. I could also just do a million dealer shuffles using my algo, then show all the cards, then thats what you audit. I could make it a simple text file with one deck per line. I don't know if that helps. Edit 2: Several years ago, I made several programs to shuffle decks, and I came up with the shuffle now known as the Fisher-Yates, without knowing that it was already invented more than 75 years ago. I never got around to coming up with anything more efficient as even back then (some 10 years ago) shuffling arrays of 52 elements was not memory or computing intensive, and taking even 1 second to do it was certainly faster than doing riffle shuffles in a physical deck of cards. My current shuffling method is actually more inefficient since it uses sorting of large random numbers assigned to the cards. 256 bit numbers. There is a very improbable chance of collisions using this method, but I think even if I use 100 decks of cards, the odds are negligible and I can ignore it. For the purists and other computer scientists, this will not do. For testing purposes, this will have to do. I only need 226 bits to produce all the possible permutations of a 52-card deck. Finally, I think I found a potential use for Jokers. And in fact more than 2 if it helps. The Jokers will have to be identified distinctly and uniquely from each other. After the final shuffling, the Jokers and their positions in the deck can be revealed, then they are simply not used anymore. I could have, for example, 13 Jokers, which is essentially a 5th suit. AJ = Ace of Jokers 2J = 2 of Jokers 3J = 3 of Jokers ... JJ = Jack of Jokers QJ = Queen of Jokers KJ = King of Jokers Their only purpose is to show the audience the provable fairness of the shuffle and the game. The deck will end up being shuffled as many times as there are players plus the two dealer shuffles. In fact, I can skip the final dealer shuffle I just thought to include it, just in case the last player to shuffle somehow finds out the cards and manipulates the deck to his advantage. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 16, 2013, 08:24:00 AM @darkmule and others who suggest a particular poker game: Kindly include at each step of the way, whether the cards will be seen by the player only, everyone else, or no one.
We'll avoid burning cards since it is pointless in online play (the original purpose of burn cards are to prevent players from cheating by reading physical marks on the tops of the cards). I could always reveal ALL the cards after a game, but that might only work or make sense for freerolls. Anything involving any amount of bitcoins (or chips converted from BTC) should work like in a normal physical environment, ie: mucked cards are never revealed to others. This leaves analyzing the cards difficult for non-players who never see anything but upface or community cards. annnyyywhooo, who wants to play? The deck is shuffled and ready, I just need some players. If no one wants to play for "real coins", (since some may argue that this is a beta test), I prefer no one is allowed to fold. I do suggest to play at least one game for real and maybe a minimum of 0.0001, the transaction fee limit just to have a reasonable number. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: vlees on August 16, 2013, 09:38:03 PM Post reserved for shuffling seeds, deck, etc. SHA256 of Dealer Shuffle 1 seed 5bbef58be675e74d11c88db84d8083d57f3ca50e696f3a7ced5e00fbe95b82b6 SHA256 of Dealer Shuffle 2 seed 4d5016cf416539544bb12a11c118bb01df463555c4a1364ef093f96f2d128eb2 Dealer Shuffle 1 will be used for the initial shuffling of the deck. Dealer Shuffle 2 will be used for the final shuffling of the deck, after the players have shuffled or cut the deck. Before the game starts. Both seeds are 64 character alpha numeric. Both seeds will be revealed either after the shuffling, or after the game. I'm still thinking how to shuffle the deck, but I have a couple of ideas already in mind. Quoted as requested. Also I'm in for 0.01. Quite tired now so I don't feel like looking it up but I assume "Five Card Draw" is the original poker? Like Yahtzee, but face down cards and you can replace any amount of cards once. Also the Deck has jokers included? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on August 16, 2013, 11:32:32 PM IIRC Jacks or Better draw poker was often played with a single joker that acted as a "bug." That is, it could fill out a straight or a flush, and was otherwise considered an ace.
AFAIK, there is no poker variant where all players get to see all cards of all opponents. All variants of poker, at least that I have considered, are limited information games. I may have failed to consider some variant. Five card stud is the least information limited variant I know, because only one card is secret. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 17, 2013, 01:03:51 PM So, do I have three players? vlees, we haven't decided a specific game to play yet. Those were just suggestions.
@darkmule, big2 or pusoy dos is one variant where everyone eventually sees all the cards, at the end of the game, or it depends on the variant. Some games continue until all players have shed their cards. Some stop after the winner has won. My current deck that is now posted above has no jokers, its the standard 52 card deck. If I have 3 players, you guys position yourselves on the table, and label them as Player 1, Player 2, and Player 3. That will be the order for dealing out the cards once the game starts, after all players have had their chance to cut or shuffle the deck. You guys suggest a variant. A community card based game like hold'em is actually a good idea, since the public can see the flop. Only the players will see their own cards, unless you reveal it here. Here, I thought I was going to "sell" the idea, to some poker site, but after this game is over, you'll see how it works. I had this crazy idea to sell it for 100 BTC or 1% of the rake for a year or something. Then I realized, I've practically just given it away already. If you don't get it now, you will. As for "mental poker", the problem with that is if any player disconnects, the entire game is ruined. Did I understand that right? In this version, as long as the dealer/operator/website is present, only disconnected players ruin their game by being considered folded. So, both solutions have their disadvantages. The holy grail, if ever, is a P2P version that has the audience acting as escrow, dealer, shuffler, verifier, etc. without them knowing what the cards are unless its the flop. A bigger audience or those acting as the poker network allows for decentralized provably fair "servers" similar perhaps to bitcoin or bittorrent. Games older than yesterday, or are finished, can be discarded so all clients don't store any "poker chains". Edit: five card draw is also good. It tests the provable fairness while keeping secret what should be kept secret. And I'm guessing no one will fold, so everyone has the chance to see the cards. Edit2: Can someone show me a deterministic Fisher-Yates shuffle? I mean, providing the same seed, it will result in the same exact shuffle. I might change the Player seed thing, to allow all players to submit any 256 bit number they want, 20 digits might be too small. I have an idea already, but my solution tends to be overkill and inefficient. I'll use the player seed and append a counter to generate as many hashes are needed to do a shuffle instead of my sorting method. The sorting method is only used for the first dealer shuffle to satisfy provable fairness and be verifiable. If I do a regular Fisher-Yates shuffle at the start, it will leak all cards unless I keep the seed secret. If I keep the dealer seed secret, no one can verify the shuffle. Or maybe you still can, but it's late and I'm typing this reply on an ipad, so ... Edit3: Optional, but I can GPG encrypt any PMs to you so your cards remain secure and secret. Regular PMs will work fine, but staff, mods, or admins might be able to read it. Just PM me your public key, or make one just for this game. If not, I'll send a plaintext PM with your cards. Edit4: Wow, I just read some stuff on PokerStars and they fold you after 20 to 35 seconds. I think thats too fast, I mean this isn't like an RTS game of StarCraft or a FPS like Quake or Counter-Strike. Or do I just think too slow. I've never played any online poker game at all. Maybe I should try them out one of these days. If ever I turn this into a website, whats a good time before you get forced folds? It seems to me that online poker rooms are more like MMORPGs. Okay, I'm going to take World of Poker as my name if it hasn't been already. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: dooglus on August 19, 2013, 06:45:32 PM Ok, tell me I am missing something, because I know I am missing something. I think the biggest problem with your proposed scheme, and the thing keeping it from being provably fair, is that you know everyone's hand. You can make a sockpuppet account and play and have a massive advantage. The point of "mental poker" is that there isn't a trusted third party who could be cheating. Everyone's equal, and can be sure there's no cheating going on. Or did I misunderstand your scheme? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 19, 2013, 11:26:59 PM You understand that problem correctly, but this is the same kind of problem you have with your dice site, for example; knowing the secrets, knowing the lucky numbers.
The way around that, for now, is that investors simply trust you. And I will of course state that I will not allow any kind of cheating, colluding, super users, sock puppets, etc. In general, most other big gambling sites, even non-bitcoin sites, have to be trusted, or they would be found out by the players. But poker sites, so far, are not even a little bit "provably fair". Not even at all. Mental poker would be ideal, but my concern with that is all other players have the encryption keys. What happens if a player disconnects and doesn't come back? Or two players? How about in tournaments? And who holds the pot while the game is going on? I know one solution, but it slows down your dice site significantly, and it might make my poker game take longer than usual, unbearably so that no one will play both games. (Replied from ipad, sorry if any typos.) Edit1: If this ever gets implemented in a website or client/server software, there would no need to have server secret access, to do audits. Or not as much as other poker sites. Players can at least see their own cards (and any community cards) and prove those. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on August 19, 2013, 11:35:22 PM In general, most other big gambling sites, even non-bitcoin sites, have to be trusted, or they would be found out by the players. But poker sites, so far, are not even a little bit "provably fair". Not even at all. Not remotely. The best you can say about even the most extensive collection of hand data you get after the fact, as it is incomplete, is to say the data (that you actually have) are consistent or inconsistent with a fair deal to some degree of probability. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 19, 2013, 11:53:37 PM I made a minor edit.
What I attempting to prove (as far as proving using hashes) is to show a fair shuffle. Knowing what you know after the fact, after you've seen your own cards, what is the probability that the other cards you never see are not part of the same deck? Edit1: Other players can prove their own cards, and they don't have to tell you what the cards are, just that they verified themselves. If all or some players do that, you know that all the cards on the table, face up and face down are valid and belong to the same deck. I think this is good enough for now. I might have an additional layer of "provability" by using additional secrets (which I'm still working on if it makes sense or not), and for now, it would be infeasible to attempt to find collisions just to manipulate cards in a deck when I have already published hashes of the cards (even if you never see them) and published a randomized order of cards with a different set of hashes that are linked to the card secrets. I don't know the exact numbers, but I dare say you are still looking at close to 2^256 for every single card. From the other thread, this was said: I think we want two solutions to this: 1. With a central server that does not need to be trusted (but can generate the shuffling.) 2. P2P version of poker. No need for servers (except maybe to find other players.) I like option 1, too. Total decentralization is like the holy grail of online poker, but it seems to me that a central server would still be needed to organize the games, keep them moving along at a reasonable pace, and to act as a trusted escrow service to transfer funds back and forth. Maybe you could build a p2p client to handle all that, but then you'd get cheaters building their own clients to get around any constraints. It's an interesting problem anyway and I'm pretty sure there is a big market for it. My own informal survey of bitcoin gaming sites tells me that the most profitable sites are also the 'provably fair' sites (bitZino, Just-Dice, etc). People aren't fools (for the most part). A provably fair HU poker site would almost certainly get a lot of action from high-rollers ... is my guess. I can see the $$ in their eyeballs now. So mental poker falls into #2, while I am attempting to solve #1. We have to take some assumptions, like for example, that the dealer / site operator / owner can be trusted. And, if there are two player tables (heads up poker), then obviously I can't play my sockpuppet there. That would be too obvious, and someone is going to notice very quickly. I'd rather play as myself, while declaring that I'm not cheating. But like dooglus, I will probably stick to limit games or low stakes, because, with a house rake, I don't need to play to make money. I will play just to be better at poker myself. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 20, 2013, 01:05:43 PM In general, most other big gambling sites, even non-bitcoin sites, have to be trusted, or they would be found out by the players. But poker sites, so far, are not even a little bit "provably fair". Not even at all. Not remotely. The best you can say about even the most extensive collection of hand data you get after the fact, as it is incomplete, is to say the data (that you actually have) are consistent or inconsistent with a fair deal to some degree of probability. I take it, you mean, that you can't prove anything on almost all other poker sites (bitcoin or not), at all. So you can't even check your own cards or the cards on the flop. Not unless the site eventually reveals the entire deck (and then they will have less players because of that.) Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on August 20, 2013, 06:25:49 PM Not remotely. The best you can say about even the most extensive collection of hand data you get after the fact, as it is incomplete, is to say the data (that you actually have) are consistent or inconsistent with a fair deal to some degree of probability. I take it, you mean, that you can't prove anything on almost all other poker sites (bitcoin or not), at all. So you can't even check your own cards or the cards on the flop. Not unless the site eventually reveals the entire deck (and then they will have less players because of that.) I think we're basically agreeing here. Statistics don't really "prove" anything. However, they've generally been good enough at keeping sites on the straight and narrow as far as PRNG goes, because a PRNG that was biased enough to make more rake would also (probably) produce cards visible to the player on showdown that, if collected in large enough numbers, would show bias. While this is far from a gold standard, like provable fairness, when you can rule out the null hypothesis with something like 99.99% certainty, that's good enough for most purposes. Similarly, the insider cheating accounts on Absolute/UB were exposed by statistical analysis. Players were already suspicious of these accounts, but running the numbers showed they were winning something like six sigmas out. I forget the exact amount, but a win rate like that was highly, highly unlikely. Provable fairness has the significant advantage that you can actually prove that any individual event was generated fairly, and actually have mathematical certainty to it. Considering a lot of Bitcoin gambling is spread by operations that could easily just start cheating at any time, make a lot of money, then take a runner before they get caught, that kind of certainty is preferable. It makes the defection strategy less profitable for less of a period of time. I.e., the first big rigged wager is probably the last anyone will make. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 21, 2013, 09:51:36 PM The more I think about this, the more I'm sure the current setup is enough, considering the mathematical certainty. However I am still thinking of using additional card secrets to further attempt to prove the mathematical certainty of the cards you do not see.
The public cards are easy. Your own personal cards as a player is almost as provable, at least to yourself. The others you do not see, while certain, can still leave some doubts. As seen above, the first and only card secrets so far, unique for each card, proves those cards. The dealer seed or first shuffle seed links the same set of cards to a new set of hashes that can not be seen until the corresponding card secrets are revealed. What I am trying to establish is that the cards are not changing or swapping or somehow finding a collision for the same hash result of a different rank or suit. Another card secret might help, linked to both the first card secret and the dealer secret, but not shown until after the first shuffle, but before the players cut the deck, so I can sort of prove the entire set without showing any cards at all. Then the more cards are revealed, to all players, the more the probabilities approach provable fairness for one secret. The result will not be 1 in 2^256 but it will definitely still be better than 1 in 2^128. Maybe its 52 in 2^128 for a deck that is never seen, or just 1 card revealed. I don't know exactly. The order of the cards, after players have cut or reshuffled the deck, can be clearly seen. In fact, you can see it now, as the last group of hashes is what I will use to represent the deck. I just sorted it, so it gets randomized. It can be played or dealt from, as is. But I want players to cut or reshuffle it further. This is the second requirement of provable fairness, players can influence the deck card order. The proposed 2nd dealer shuffle is to prevent the last player from attempting to stack the deck (which I find unlikely anyway). The hash is shown before it is done, so I can't change that particular secret anymore. Okay, who is playing? And what are we playing? In case of weird betting structures, you can just send in 10x the minimum bet as the buy in. The winner gets the pot. The rest who didn't go all-in get refunded their balance. This is going to be a single ring game or cash game, unless the same players agree to play more than one hand. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: gektek on August 22, 2013, 02:46:29 AM Okay, who is playing? And what are we playing? In case of weird betting structures, you can just send in 10x the minimum bet as the buy in. The winner gets the pot. The rest who didn't go all-in get refunded their balance. This is going to be a single ring game or cash game, unless the same players agree to play more than one hand. Well, I don't fully understand the logistics but I've had fun throwing my btc at you in your lotto game. I'm vested in a few other 'ventures' until the end of the month but if the interest keeps up I'd like to join in at the beginning of next month. I know this wasn't the reply you were looking for but wanted to make sure you know that there IS interest in the game...just, for me at least, the timing isn't 'ideal' :D Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 22, 2013, 04:19:17 AM Well, it seems I have 3 potential players.
1. cparsley 2. darkmule 3. vlees The question now is, what game? What bet limits? The other question is, do I implement the second card secret now already? I haven't dealt the cards yet (in fact, the players have not yet cut the deck.) Upon doing some basic research, there are two possible attack vectors to attempting to cheat this game, both of which can be the considered the same: 1. Birthday attack 2. Collision attack http://en.wikipedia.org/wiki/Birthday_attack Using a 256 bit hash such as SHA-256, to get a 0.1% chance of figuring out the cards of the other players takes 1.5 × 10^37 hashes, or attempting to brute-force. You are better off trying to figure out the card by the way the player bets (this is poker after all.) http://en.wikipedia.org/wiki/Collision_resistance http://en.wikipedia.org/wiki/Provably_secure_cryptographic_hash_function I will probably never go that route, it messes up my brain too much at this point. Using classical hash functions like SHA-256 is more than good enough, don't you think? Quote In the second category are functions that are not based on mathematical problems but on an ad hoc basis, where the bits of the message are mixed to produce the hash. They are then believed to be hard to break, but no such formal proof is given. Almost all widely-spread hash functions fall in this category Thus my argument in another thread that "Provably Fair" is actually "Probably Fair" but with a very very very very high degree of probability. We would need to use provably secure hash functions to be really provably fair, but that's the platinum standard already. I don't mind just going for the gold standard. We have other issues to worry about. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 22, 2013, 06:03:43 AM @darkmule, can you kindly post the Jacks or Better variant you are interested in? (unless you prefer hold'em or something else.) I am willing to host any kind of game.
I will try to enumerate the rules in a step by step manner (including bets), so we all see the order of the game. Then I will announce which game, and what buy-in and any other details so we can start. Then the players cut the deck by supplying a seed by posting here (or send me a PM). I will hash all three and post here, then apply the shuffling, then post the seeds. Then everyone can tell for sure the shuffling was fair. (It can't not be, because... it just has to be fair at this point, I don't see a way it can otherwise be.) Then I deal from the top of the deck, to players, in order. Since I can see all the cards, I can easily determine if anyone has a pair of Jacks or Better, and can easily enforce this requirement, if this is the game we will play. If no one has Jacks or better, we start over. I can not use the same deck because you will see the cards you already had. I will have to restart with a brand new deck, with brand new card secrets. At that point, I can reveal everyone's cards or bring it with me to the grave (this is easy, I just delete the file containing the secrets) and just announce that no one got Jacks or better. You know what you got, and you know it is not Jacks or better. Then you will know that the other two also did not get Jacks or better, but you don't know what they got. I think I should keep it that way, unless you all agree to reveal your cards (you simply post them.) As the dealer I can't decide on that. Since I will hold all the money, I can not, and will not favor anyone, this will be as fair as a face-to-face poker game. This is where you have to trust the dealer (me.) that I won't disappear. That will only happen if I get hit by a bus. No dead man's switch here, sorry. (Your bitcoins will go to my funeral if I die, so ... just kidding.) I post every step of the way, at every turn. This is why this game will take several days. Sorry, it can only get faster if I host a live chat or something, but then I'd have to dedicate the time to it and all players have to be present in real time for live play. And unfortunately, I don't have the time, and I probably live in a different time zone. Winner gets the pot. Remaining balances gets refunded back to players if they have any left. Unless you guys want to play more than one game, or turn this into a mini 3 player tournament, where winner takes all. Edit1: For this first game for these 3 players, I am allowing player provided seeds composed of UPPERCASE letters, lowercase letters and numbers, up to 64 characters in length, as long as it looks random. You can grab some inspiration from these two websites: http://www.random.org/strings/?num=10&len=20&digits=on&upperalpha=on&loweralpha=on&unique=off&format=html&rnd=new https://www.grc.com/passwords.htm You could just grab one straight from either of those. Pick one, send it to me in a PM. I will then post the SHA-256 result of it here. Then I shuffle using my sort method. (Yes, it's ugly, but it works, I'll figure out a proper Fisher-Yates shuffle based on player seeds later.) You can also use whatever password generator you have. Why limit to just letters and numbers? Because I can double click on it and copy the whole "word". Any symbols or spaces break it up. Besides, it's way more than 256 bits worth of entropy even with just letters. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 24, 2013, 03:09:37 AM Math Questions / Probability Questions: (Related to how Provably Fair this will turn out to be.)
In a deck of 52 supposedly unique cards, individually hashed with a random secret using SHA-256: 1. What are the probabilities of each hash representing a different card? 2. If one card is revealed, how sure are you the other 51 cards are not the same as the one you already saw? 3. If several cards are revealed, what's the math for those? 4. Using the current system of card secrets in the first few posts: 4a. a card secret of 64 character length (maximum of 256 bits worth) 4b. a dealer shuffle secret of 64 character length (maximum of 256 bits worth) 4d. the hash of 4a is known. (definitely 256 bits) 4e. the hash of 4b is known. (definitely 256 bits) 4f. the hash of both 4a and 4b is known. (definitely 256 bits) 4g. the dealer shuffle secret is revealed after 4f is known. 4h. 4b can now be verified to match 4e. How easy or difficult is it to find the card secret knowing it is half of the 4f string? According to the current system, you can check the following: 1. Any community or public or face up cards can be seen and verified against the hash published before the deal. 2. All your hole cards, or cards only you, as the player can see, you can verify for yourself against the published hashes. 3. If all the other players are satisfied, you can be reasonably assured they got their cards fairly too. 4. Over hundreds or thousands or millions of hands, you can do statistical analysis about what you do know for sure, and it should be consistent with the rest of the deck even if you never see them. 5. In a game of Texas Hold'em, If there are 10 players at the table, that's 20 cards revealed (18 privately, 2 to you), and at most 5 on the table, for a total of 25 cards, which is already almost half the deck. An extra card secret which can all be publicly revealed may help support the provability of the entire deck, without revealing the cards you are never meant to see. Again, this leaves the game with 2 problems: Super-Users and Collusion. We already know about that, we'll deal with that separately. But in an attempt to keep it short and simple, here is what can be done now. 1. Super-Users: Don't give anyone else access to the secrets. 2. Collusion: heads up play won't have a problem. All other tables will have to be monitored by both staff and players for signs of collusion. Another idea is to use 2 decks of cards or rather there are more cards than in a normal game, but the second deck or all extra cards are all revealed after the shuffling before the first card is dealt. All extra cards are then skipped from being used. You now have half of the 104 card deck already revealed at the start of the game. Think of them as 52 Jokers that can't be used. They are just part of the shuffling process. I figure that the more cards are revealed (either to the players alone or to the public) then the more fair the shuffle and deal is going to look like. The extra cards will of course be easily identifiable that they are not part of the game itself. I can attempt to stack the deck in favor of a particular player by using duplicate cards, but there is at least a 2 in 52 chance (or 1 in 26, or 3.846%) that this will be discovered during play. After the players cut or reshuffle the deck, it can't be done since that duplicate card is now somewhere else in the order of the deck. It does not make sense to use anything other than 52 regular standard cards in a deck. The shuffling process is such that the actual shuffling algorithm knows nothing about player cards. It simply shuffles the cards so that each one is equally likely to end up in any of the 52 slots. This occurs before the hand even starts. It doesn't know that each hash corresponds to a playing card, let alone in a poker game, let alone for Texas Hold'em, let alone who they are dealt to or to which table. What makes a good card shuffling algorithm are two main requirements: each card must have an equal chance of landing in any position in the deck, and the random number generator used by the shuffler must be unpredictable to a human observer so that they cannot determine the future order of the cards. I am using SHA-256 with the option to upgrade it to SHA-512, both of which are overkill and inefficient for this purpose, to satisfy both requirements. However, it takes the computer or server just a mini-micro-short second to do all that. Accidental hash collisions are a problem I am simply not going to worry about. Intentional hash collisions are also another problem I will not worry about. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 24, 2013, 03:58:54 AM I still don't know what game you guys want to play and what stakes are involved and what bet limits or betting structure you want, but I made the following address anyway:
1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf Code: -----BEGIN PGP SIGNED MESSAGE----- Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on August 25, 2013, 05:36:49 AM I still don't know what game you guys want to play and what stakes are involved and what bet limits or betting structure you want, but I made the following address anyway: 1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf Neat! How long did it take to generate that? I'd play pretty much anything, it's really up to you, but give details at least 48 hours in advance. My only request is that actually participating not require me to do anything overly complicated above my levels of mathematical ability. Consider teaching me any more math than I already know to be something like trying to explain quantum physics to a goat. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 25, 2013, 02:32:18 PM As a player, no math involved on your part. I will show the calculations and the solution and the answer. For the hash functions, there are links on the web to do it all online. Here's one you can use.
http://www.xorbin.com/tools/sha256-hash-calculator For example: Dabs hashes to c0e6c3a45c1f8fc1ec10f4aed977dcad9d1562e8a9a59057bd2b5ed22e37dea4. The 1poker address took about 30 minutes to generate on my laptop. It's a 3 year old dual core intel laptop. For the game itself, it's a toss up between hold'em and a draw variant or a stud. The two other players should take a vote. After a lot of research and watching and downloading 5 different poker clients, (sandboxed of course), it seems the most popular game is hold'em. I tried pokerstars on both my laptop and ipad. Everyone is playing hold'em and each player gets about 10 seconds to play his turn. No wonder they play so many hands per hour. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 26, 2013, 12:15:49 AM I found one game variant where you sometimes get to see ALL the cards. They call it Chinese Poker, with a variant called Open Face Chinese Poker.
When I read the rules, I remember playing this particular variant before. We didn't call it Chinese Poker, we just called it Pusoy, and some called it "Good, Better, Best". Because that's what you do. 4 players are dealt 13 cards, and you show it all on the table. And then, after reading this link: http://en.wikipedia.org/wiki/Chinese_poker I can take a good guess why I used to play it. We have a large Chinese community in the Philippines. In fact, the top businessmen in the country are mostly Chinese. They gamble and play everywhere, I see them playing Mahjong, Chinese Poker (and Pusoy Dos) and Tong-its (another pairing up card game), and, of all places I see them in Baptisms, Weddings, Birthdays and Funerals. Despite being exposed to the culture for a long time, I find it fascinating that people gamble at funerals. Usually, when it is a young person, no one does it. But when it is an old person, like a grandparent, people are actually happier, and willing to play. Maybe because, it is expected, I mean, a person who dies at 90 years old is a chance for a mini-reunion of everyone who is related to that person. Open Face Chinese Poker would eventually reveal almost all the cards. This would be the easiest game to show Provably Fair, even without all the card secrets. A simple deck hash (like it most bitcoin blackjack games) is all that is needed after shuffling and it's already Provably Fair. I'm guessing though, that you guys probably want to play Hold'em. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 26, 2013, 12:57:46 AM I'm bored. Where are my players?
https://i.imgur.com/Z4HyvIB.jpg Ok, I grabbed a table from one of them games, then did some photo shop work on it. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 28, 2013, 02:20:56 AM I just was talking to someone else about this and we sort of agreed that to date, the way I see it, there are maybe 3 or 4 levels of online poker now:
1. The way it is now, no security, no proof, just trust the site. All existing poker sites are at this stage. 2. Some proof, but you still have to trust the site. This is where I am. "some" proof. Maybe just enough proof. 3. Centralized Mental Poker (with or without drop tolerance). You still need a site. 4. True Decentralized Mental Poker. P2P. No site at all. Maybe a tracker like in torrents. And it's only a matter of time before 3 and 4 are achieved. In fact, he says he's done it. He claims he will shake the whole online poker industry with a rake-free smooth p2p poker experience. The problem there, so far, is, Who holds the pot? or the chips? So somehow, you'd still need a table, you'd still need a banker / cashier, you still need to buy-in with chips and you'd still need to cashout or withdraw. Also, variations of Mental Poker have shifting decks or completely random decks especially when a player drops out. I'd prefer to the same analogy of physical poker where you see the back of the deck, it's just being held by the dealer then deal cards from the top. For 30 years, Mental Poker was (and still is) impractical and unsolved. I just think, adoption of the 4th level of Poker (as listed above) will take time because most players actually don't seem to care, as evidenced by the sheer number still playing at 1st level Poker. It's more the site and it's reputation than the system. #3 and #4 will first be adopted by the math geeks, then slowly trickle down to the mainstream players. On the way there, I hope to catch some on #2. I never said I'd solve the original problem, but I took a small step in a similar direction. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 29, 2013, 04:27:25 AM These people have replied on this thread.
1. cparsley 2. darkmule 3. vlees 4. dooglus 5. gektek Kindly state the following: 0. Are you playing? or just watching? 1. What game do you like? Default = Texas Hold'em as in most poker sites. 2. What is your buy-in or stakes or whatever you want? 3. Would you like just 1 hand, or you all play several hands until someone has everything? 4. Where do you want to sit? First come first serve. Available seats are numbered 1 to 5 (or more) with the first 1 is where the dealer button will be or rather the one who gets the first card dealt. Additional rules: You may leave the "table" at any time if the others decide to continue playing. Others may join in, but will have to wait until the current hand is over, I will just reserve your "seat." Current status: The cards have been shuffled. Waiting for players to cut the deck. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: gektek on August 29, 2013, 04:59:06 PM Lets see if I can give a satisfactory answer here ;)
I am VERY interested in playing...as long as I can afford it. I only mine up around 0.02 to 0.03 bitcoin per day after expenses as it is so if a game gets too pricey I'll have to fold/bow out regardless. In this regard...either by trust or by escrow (and maybe this was discussed already and I missed it...sry, following a LOT of threads with all the botched group buys going on hehe) is there a way to do some sort of 'deposit to personal account' so that I can deposit 0.25 and 'play off that'. I ask because at one point it seemed like the 'chips' were going to be worth around 0.01 btc and up. With there being 'personal deposit accounts' I can put in my 0.25 and play with 'chips' valued at a nickel, dime, and quarter or roughly 0.0005, 0.001, 0.0025 respectively, without having to worry about a 0.0005 transaction fee with every bet. This is all assuming of course I can convince you to do 'small bet' games. If the minimum bet is going to be around the 0.01 btc or above range then I will have to respectfully switch to 'watch' mode :D That being said...I think my choice of number of hands kinda falls in with what I've already discussed...all depends on price ;) oh right...and the game...I am impartial but something 'familiar' or popular and 'easy' would be good. The less game mechanic rules the first round probably the better no? If we're calling seats...I dunno why but seat 4 looks nice. If its first come first served then well... ;) Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 29, 2013, 08:00:44 PM @gektek. I'm watching the mining forums too, but not as actively. I missed some nice IPOs, but I'm more concerned about the chips now. Anyway, thats off topic.
Yes, as the dealer and essentially the cashier, I will issue you chips, and you get to play with that. When you want to cash out, is when I actually send the transaction. But instead of chips, let's use the actual value. Or would you rather I have like 1BTC = 1000 Dabs chips? Think of it as off-the-blockchain. One transaction in. Bunch of games. If you still have a balance left, one transaction out to you. If you lost, well, I have to give it to the winner, hehe. Also, I said rake free, but I did not say bitcoin transaction fee free. You get whatever you cash out minus 0.0001. Tips to the dealer are voluntary. :) In the future, I will use a proper server or irc or chat bot or whatever. Game: I think Hold'em is the most popular. You guys vote on no limit, pot limit, or fixed. I'll just grab the rules from another poker site and use that. Seats: #4 = gektek. In a typical game, the button moves after every hand. So your position is good for the first hand. Then all of you either switch, or the button goes to the next player. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Financisto on August 31, 2013, 02:31:54 AM That's a very interesting experiment, besides it's a little complicated.
If it gets too much complex in order to implement, try doing something similar with Poker Dice (https://en.wikipedia.org/wiki/Poker_dice). 8) Cheers! Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on August 31, 2013, 03:03:10 AM That's still a dice game. Interesting, but I'm sure someone else can handle that.
It's a little complicated, but not as complicated as a true Mental Poker implementation with voodoo math that most people do not understand. You can also join if you want. You don't need to understand what's going on if you trust the dealer or other players or those watching and they agree that the game looks fair. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Adriano on August 31, 2013, 04:27:57 PM Hey everyone,
Just to let you know I'm watching this thread since the beginning (actually since the previous thread) and I really like the effort spend improving the way poker sites deal with transparency. I might join on a future test game, just want to see how things go on this first try. I really like the idea of a irc bot or a website implementing your ideas. Adriano Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 01, 2013, 09:53:18 AM According to some research, there used to be an irc bot. Dunno if that is still working. It wasn't provably fair, so it's best I make mine from scratch anyways.
This system would work in any setting where I can send both public and private messages, such as irc, chat, this forum, or even the local network. Public only environments can still work but would spam with too much encrypted chatter that everyone does not need to see. This forum based one seems to be taking its sweet time, or the other posters are just busy handling their own stuff. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on September 01, 2013, 11:28:37 PM These people have replied on this thread. 1. cparsley 2. darkmule 3. vlees 4. dooglus 5. gektek Kindly state the following: 0. Are you playing? or just watching? 1. What game do you like? Default = Texas Hold'em as in most poker sites. 2. What is your buy-in or stakes or whatever you want? 3. Would you like just 1 hand, or you all play several hands until someone has everything? 4. Where do you want to sit? First come first serve. Available seats are numbered 1 to 5 (or more) with the first 1 is where the dealer button will be or rather the one who gets the first card dealt. My problem is I can't really reliably state what I'm doing. My stakes would be something on the order of a few bitmills. I'm just kind of disgusted with poker at the moment and can't be reliable. I'd say 10 bitmills or so. My preference would be something like a sit and go. Because I can't really reliably show up. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 02, 2013, 08:54:11 AM My problem is I can't really reliably state what I'm doing. My stakes would be something on the order of a few bitmills. I'm just kind of disgusted with poker at the moment and can't be reliable. I'd say 10 bitmills or so. My preference would be something like a sit and go. Because I can't really reliably show up. disgusted = although off topic, how or why? It is still considered gambling despite involving some skill. bitmills = ? 0.001? So 10 bitmills is 0.01 ? sit and go = Sure I can wait a few days for your turn, and all other players should be able to wait. Or did you mean a fixed Sit and Go tournament? For 3 or 4 people. We will probably be talking about fixed limit or pot limit or something I think. With such stakes, it wouldn't make sense for a No Limit game would it? Actually, it could, the table stakes and your buy-in is the limit effectively. I'd also prefer that everyone buy-in with the same amount, so if everyone (3 or 4) send 0.01, then we have 0.03 or 0.04 "in the bank", and those are all the chips. Then maybe I'll fix the blinds to 0.001 / 0.002 or something like that. So we can do at least a couple of hands. I'd also prefer at least 3 players, and not just a heads up. Once one hand is done, I've basically opened Pandora's Box. If I never get to implement it on my own server, everyone else will. (and even if I do.) So unless there are objections, I am declaring the buy-in to be 0.01 BTC. Send your coins to the poker address above 1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf and post or PM me the transaction. Optionally sign with the bitcoin address you used. Summary: 1. Texas Hold'em Sit and Go style, but we just keep playing until you want to leave (cash out) or until you're bust. 2. Waiting for 3 players or 4. 3. Seat #4 = gektek, Seat #? = darkmule, need another 1 or 2 players. 4. Small Blind / Big Blind = 0.001 / 0.002 and the Buy-in is only 0.01. 5. 3 days = disconnected = fold. Hope this is fair. You have 72 hours to reply with your move. No moves out of turn please (no reason to.) 6. Every hand is a new deck, shuffled as per the first post, with players allowed to "cut". 7. No leaving once the cards have been dealt, if you do, you are considered folded. 8. Button moves in sequential order, first one is Seat #1. Therefore #2 is small blind, and #3 is big blind. (Hey, first come first serve right?) Next hand button is on Seat #2. Next hand after that button is on Seat #3. Does that sound fair to everyone so far? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: gektek on September 02, 2013, 11:36:33 PM Seems okie dokie to me :D My next 'payout' for mining will be Wednesday so I'll send my coin then. Seems I've probably got time but if the other players send in all their coin before Wed. I 'may' be able to squeeze enough out of my remote wallets to add up to 0.01 :P
Getting excited! :D Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 03, 2013, 02:36:33 AM Yeah, how can you complain when I just fire up my mobile poker app, and I see
Quote Dealer: Dabs it's your turn, you have 8 seconds to act. But I've tried about 4 or 5 online poker rooms, they're all that fast. So when I say this is just a test, and the buy in is only 10 BB (Big Blinds)... Think of it as almost a cash game, or a mini 3 or 4 player Sit n Go winner take all or whatever you have left when you decide to leave. I just need 3 or 4 people to participate in this experiment, and hopefully more than once. Also, I'm changing the buy-in / blind structure. Quote 4. Buy-in 0.01 BTC. Big Blind 0.001, Small Blind 0.0005. No Limit. Will become: Small Blind / Big Blind = 0.001 / 0.002 and the Buy-in is only 0.01. No Limit. Don't buy in again, (not for now). That effectively limits this to 1 or 2 hands or maybe even 3. This is an experiment after all. However, if majority of the players prefer a lower stake game, I can adjust it, to say 0.0002 / 0.0004. I don't want to run this for more than a month, or for more than 10 hands. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 03, 2013, 04:02:03 AM I was just thinking about how to prove that cards and decks can be almost provably fair without you ever seeing the deck that is used. One suggested method is to shuffle and prepare more than 1 deck of 52 cards. Then allow players to choose 1 deck to use, the rest are exposed or revealed.
That way, players can see that, if the site or dealer wanted to stack the deck or cheat or whatever. For example, I use 2 decks of cards. I will reveal one deck at random, not at my choosing. The players choose or some provably fair method of determining this is used, such as hashes etc. That leaves one secret deck to be used for the actual game. Everyone now can see the other deck, and see that it is fairly shuffled and has 52 unique cards of the standard deck. Do this for every hand, and there is a 50% chance that any unfairly shuffled decks or stacked or duplicated or cheated decks will be discovered at every hand. Extend it to 4 decks. 3 decks are revealed. 75% chance of discovering the stacked deck. 75% certain the remaining deck is fair. Extend it to 8 decks. 7 decks are revealed. 87.5% If we use 128 decks, 127 of which are revealed to be fair, we have more than 99% certainty that the remaining deck must be fair. However, all this takes computing power and time if I were to use so many decks (someone suggested 65535 / 65536 decks for 99.99847412% .) Using just 2 should be enough, since I can not guess which deck will be used, therefore both decks have to be fair. If I were cheating or stacking the deck, I'd be found out half the time. *edit* Of course decks can be uniquely identified. I will use a common secret for the same cards of the same deck, or a deck secret. This can't be implemented now, unless I reset the whole game. I can do it for the next hand, although that might be too much work (this can be easy to implement in a proper client/server/website.) Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 09, 2013, 05:20:57 AM And, ... I dunno, but this is taking longer than expected. Anyway, I've had time to think about further improvements to the poker protocol. These include using HMAC instead of just the regular hash functions. Although I don't see how this particular implementation can get affected by length or prefix attacks, using HMAC isn't that much more difficult to do.
I found some 3rd party sites that you can use to check but this one seems to use javascript: http://myeasywww.appspot.com/easyweb?command=UTILITY&ID=2 And if you'd like, you can even use this http://code.google.com/p/crypto-js Here is a summary of future changes, which, if I figure it out before people start playing, I might as well implement. 1. HMAC-SHA-512 2. Usage of 2 or more decks 3. Usage of 2 or more card secrets So for example, the 4 of Hearts can be hashed as follows: hmac-sha-512 ("cardsecret", "4h") = 8a0791801b9c656dc8f6eb842d4942128a6cdc32dda6d09e0a33c42cfd091c84e33df8014793ec5 562f0b8a1110c2d9ef52666f0a5d2daefeca6cbfa2e2041fe Getting overkill huh? I could stick to just to SHA-1 while it's undergoing testing so I don't use too much string space. hmac-sha-1 ("cardsecret", "4h") = 6e122d2b3414aad5cd09bf1ffd77358f0ea4c1e0 hmac-sha-1 is not considered broken, as in fact currently used in Google Authenticator. And if used in this manner, I'll add in either a salt, or concatenate the dealer secret inside the "message". Or use the dealer secret as the key and the card + card secret as the message. Either way, it goes towards making this Provably Fair. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 12, 2013, 06:07:18 AM I'm doing a test run of SHA-512 hashing of at least 100,000 decks of 52 cards, sorting them, and only keeping the low hash card (the top of the deck). This is prior to any player cuts or shuffles. Then I'm going to take this data and do a frequency analysis of the card ranks and suits.
It takes my slow laptop about 1 second to create 10 shuffled decks. While not very accurate, as it uses a different RNG for the card secrets, it should be representative of what it will spit out whenever I get this online or on a server. It is slow though. If I have 30 tables, it will take 30 seconds to shuffle their decks. Maybe you won't notice it right before the next hand, if it's only your table that needs a new deck. Maybe I should store the pre-shuffled decks in some file or database and have the server pull it from there. Sort of like the random entropy pool in most computer systems. Anyway, I'll let my deck generator run for about an hour and use that. Later on if I have time, I'll make it run overnight so I get a million decks. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 12, 2013, 09:00:21 AM H:\stuff-01\dabs-sha-512>cardstat.EXE
Ac: 2552 1.98414% Expected: 2473.46 1.92308% 2c: 2445 1.90095% Expected: 2473.46 1.92308% 3c: 2489 1.93516% Expected: 2473.46 1.92308% 4c: 2440 1.89706% Expected: 2473.46 1.92308% 5c: 2549 1.98181% Expected: 2473.46 1.92308% 6c: 2434 1.89240% Expected: 2473.46 1.92308% 7c: 2485 1.93205% Expected: 2473.46 1.92308% 8c: 2469 1.91961% Expected: 2473.46 1.92308% 9c: 2406 1.87063% Expected: 2473.46 1.92308% Tc: 2485 1.93205% Expected: 2473.46 1.92308% Jc: 2427 1.88695% Expected: 2473.46 1.92308% Qc: 2389 1.85741% Expected: 2473.46 1.92308% Kc: 2544 1.97792% Expected: 2473.46 1.92308% Ad: 2461 1.91339% Expected: 2473.46 1.92308% 2d: 2607 2.02690% Expected: 2473.46 1.92308% 3d: 2478 1.92661% Expected: 2473.46 1.92308% 4d: 2453 1.90717% Expected: 2473.46 1.92308% 5d: 2521 1.96004% Expected: 2473.46 1.92308% 6d: 2461 1.91339% Expected: 2473.46 1.92308% 7d: 2438 1.89551% Expected: 2473.46 1.92308% 8d: 2469 1.91961% Expected: 2473.46 1.92308% 9d: 2430 1.88929% Expected: 2473.46 1.92308% Td: 2366 1.83953% Expected: 2473.46 1.92308% Jd: 2413 1.87607% Expected: 2473.46 1.92308% Qd: 2349 1.82631% Expected: 2473.46 1.92308% Kd: 2544 1.97792% Expected: 2473.46 1.92308% Ah: 2548 1.98103% Expected: 2473.46 1.92308% 2h: 2480 1.92816% Expected: 2473.46 1.92308% 3h: 2429 1.88851% Expected: 2473.46 1.92308% 4h: 2581 2.00669% Expected: 2473.46 1.92308% 5h: 2541 1.97559% Expected: 2473.46 1.92308% 6h: 2346 1.82398% Expected: 2473.46 1.92308% 7h: 2567 1.99580% Expected: 2473.46 1.92308% 8h: 2500 1.94371% Expected: 2473.46 1.92308% 9h: 2470 1.92039% Expected: 2473.46 1.92308% Th: 2523 1.96159% Expected: 2473.46 1.92308% Jh: 2421 1.88229% Expected: 2473.46 1.92308% Qh: 2403 1.86829% Expected: 2473.46 1.92308% Kh: 2598 2.01990% Expected: 2473.46 1.92308% As: 2509 1.95071% Expected: 2473.46 1.92308% 2s: 2522 1.96081% Expected: 2473.46 1.92308% 3s: 2506 1.94838% Expected: 2473.46 1.92308% 4s: 2473 1.92272% Expected: 2473.46 1.92308% 5s: 2429 1.88851% Expected: 2473.46 1.92308% 6s: 2417 1.87918% Expected: 2473.46 1.92308% 7s: 2494 1.93905% Expected: 2473.46 1.92308% 8s: 2416 1.87840% Expected: 2473.46 1.92308% 9s: 2423 1.88384% Expected: 2473.46 1.92308% Ts: 2454 1.90795% Expected: 2473.46 1.92308% Js: 2546 1.97947% Expected: 2473.46 1.92308% Qs: 2401 1.86674% Expected: 2473.46 1.92308% Ks: 2519 1.95848% Expected: 2473.46 1.92308% Decks : 128620 7.54599999999482 seconds I took about 2 hours to generate 128620 decks, shuffle it, then grab the top card, put it in a file. Then it took about 7.5 seconds to count the cards from a file. I'll make it run some more and see what I get. Going for half a million decks. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 12, 2013, 11:49:37 PM Code: Decks: 500000 41313.896 seconds It took less than eleven and a half hours to generate and shuffle half a million decks. It took almost 11 minutes to tally the numbers. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Financisto on September 14, 2013, 07:39:00 PM I'm bored. Where are my players? https://i.imgur.com/Z4HyvIB.jpg Ok, I grabbed a table from one of them games, then did some photo shop work on it. Hey Dabs! If you succeed in order to automate that provably fair Poker game, I volunteer to be your partner when the game's site is set up! 8) I'll try to find some place (garage) for us at Silicon Valley (some parties and some hot chicks too)! ;) BTW, this experiment is getting more interesting each day it evolves. Congrats! Cheers! Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: b!z on September 16, 2013, 10:35:48 AM I'll be one of your first players :-)
Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 16, 2013, 12:16:22 PM Code: H:\stuff-01\dabs-sha-512>cardstat.EXE 45 Minutes just to tally a million cards from a million decks. @b!z, ok great! Pick a seat. From 1 to 6. I'm making this 6 max. Play starts when there are at least 3. Small Blind / Big Blind = 0.001 / 0.002 and the Buy-in is only 0.01. No Limit Hold'em. Send your BTC to the 1Poker address somewhere in this thread. I'll hold on to it until you "stand up" and leave or everyone else lost. Seat #4 = gektek The others are still "watching". Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 17, 2013, 04:59:58 AM Here's the address:
https://blockchain.info/address/1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf And no one has bought in yet. hehehe.. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: zachcope on September 19, 2013, 12:52:28 PM Just found this thread from my thread re the correspondance poker.
Unfortunately I'm not motivated enough to play your manual provably fair game but would eventually be interested in the outcomes from this. Note heads up play is the easiest way to prevent collusion over time and removes a significant problem with anonymous online poker. With regards to decentralised poker, would it be possible to have a P2P poker network where players can become 'anonymous dealers'. They basically hold some of the secret keys etc through the hand and reveal them at the end. They would hold the bitcoin balances for the tables but perhaps post an escrow in case their server went down during a hand / match . There could be a trust system built in so that players can rate the dealers. Over time and over many hands (ie a dealer would provie resources for many tables at a time) open player result stats might show crooked dealers who might also be communicating with crooked players. Each dealer could charge their own rake so that high trust might lead to higher rake, or more tables allowed, or higher stakes. As the dealer identity is a public key the 'dealer' servers/computer could move location or site if jurisdiction issues arise, with an inbuilt incentive to build up dealer trust. Perhaps player 'trust' could be built in so that suspicion of collusion or playing too much on dodgy dealers would become a flag in itself. Perhaps this would work - my understanding is that there is no fully trustless poker possible so far for p2p poker without some kind of dealer function- or am I incorrect? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: gektek on September 19, 2013, 06:00:03 PM Here's the address: https://blockchain.info/address/1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf And no one has bought in yet. hehehe.. Sry...just got myself moved to a new place. Hoping to be organized later today or tomorrow... Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 20, 2013, 04:26:56 AM @zachscope, the issue with heads up, is, uh, it's just the two of you. I guess you get rid of collusion there, but it's more fun in a ring game or 1 table tournament where there are two blinds, sometimes an ante, and 9 others contribute to the pot.
I am to set up something similar to what you describe, and I'll be one of the first "dealers". There is that elusive "Mental Poker" but in my opinion too difficult to implement, and not something I would be willing to play if disconnects cause the deck to reshuffle (the disconnected player's cards go back to the deck.) It doesn't feel right to me. The way I have it set now, you can clearly see where all the cards are. You just don't know what they are. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: zachcope on September 20, 2013, 07:46:51 AM Keep up the good work Dabs - I will sit at your tables at some point!
One more thought (naive thoughts as I am not too up to date on the concepts) - could multiple dealers be used somehow in a p2p scheme? Ie cards are shared between multiple dealers, with another dealer managing payouts and coordinating player actions? One dealer would therefore not know all the cards at any given time, which would make collusion more difficult, unless you happened to get dealers from the same crooked dealer pool on the same table? There would have to be some redundancy however, in case a dealer holding keys to a few cards went offline during a hand. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 20, 2013, 10:45:31 AM Whats that dealer supposed to do if he doesn't know the cards he is dealing? Doesn't make sense to me. The dealer's job in a real card room is to deal, shuffle, take bets, enforce the rules, save your chips in case you stand up, get you more chips (thru a runner) if you run out.
It should be easier in a P2P setting where all he has to do is run a dealer program. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: darkmule on September 20, 2013, 06:50:45 PM Incidentally, a game in which every provably fair dealer was also a player would avoid a lot of legal issues, especially in the U.S., where the primary illegality of an "illegal gambling operation" is some business collecting a rake. With no rake and players playing with each other fairly, especially when it's provable, there is no crime in most jurisdictions.
Sorry I haven't participated in the games to date, but I'd hate causing delays. Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on September 21, 2013, 06:42:56 AM Well, the dealer can't play his own game. Obviously. Instead of rake, I'm going to call it a mandatory donation... heheheh.
Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: b!z on September 22, 2013, 05:34:43 AM @b!z, ok great! Pick a seat. From 1 to 6. I'm making this 6 max. Play starts when there are at least 3. Small Blind / Big Blind = 0.001 / 0.002 and the Buy-in is only 0.01. No Limit Hold'em. Send your BTC to the 1Poker address somewhere in this thread. I'll hold on to it until you "stand up" and leave or everyone else lost. Seat #4 = gektek The others are still "watching". Ok, I'll take a seat. What's the address? And what game is it? texas holdem? Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on November 12, 2013, 08:28:53 AM Address: 1PokerUdZ36KMsg7rmp1ruAiufVT2jAFpf
Buy-in: 0.01 BTC Small Blind / Big Blind = 0.001 / 0.002 Game: No Limit (Table Limit) Texas Hold'em Seat #4 = gektek, Pick a seat from 1 to 5. #1 is the first dealer button. But it will eventually rotate around, so it doesn't matter in the long run. (Although, with a 10 BB buy-in, the game might be over after 2 or 3 hands.) Title: Re: Provably Fair Online Poker by Dabs (Beta Test 1) Post by: Dabs on April 23, 2014, 08:54:06 AM 5 months later, and I just want to bump this. :) And I still have the dealer seeds.
|