tag:blogger.com,1999:blog-3000721125799986885.post4665681494395596924..comments2024-03-28T04:05:20.028-07:00Comments on SELECT Blog FROM Brad.Schulz CROSS APPLY SQL.Server(): Playing For High StakesBrad Schulzhttp://www.blogger.com/profile/01852762873611487368noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-3000721125799986885.post-89635893899949155592019-09-30T10:15:58.790-07:002019-09-30T10:15:58.790-07:00I'd love to see the probabilities of two or mo...I'd love to see the probabilities of two or more events in a single hand so we could see just how ridiculous Hollywood is when there's a full house, four of a kind, and a royal flush all in the same hand of six players.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-55382440058302702082019-08-26T02:02:37.340-07:002019-08-26T02:02:37.340-07:00This comment has been removed by the author.PokerMagnethttps://www.blogger.com/profile/08309166140076281534noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-89299384878422949282017-02-14T08:41:10.792-08:002017-02-14T08:41:10.792-08:00great work, i will send you a different type of po...great work, i will send you a different type of poker can you please help out. it's Holdem poker. In this only 2 cards will be given to the player,<br />and 4 common cards for all who all in the last round. Should get the winner from 2+4 cards, the best hand of 5 cards. Thanks in advance.<br />with regards.<br />Heljeeve.<br />heljeeve.u@gmail.comAnonymoushttps://www.blogger.com/profile/11993564326424987447noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-3764363058784975342016-01-31T23:37:03.599-08:002016-01-31T23:37:03.599-08:00Hi, this is awesome! May I challenge you? 13 cards...Hi, this is awesome! May I challenge you? 13 cards per player in 3 group (3-5-5).. this is Chinese Poker. No-one has the calculation yet... I'm working on it now... and losing half of my hair from my head... :)Anonymoushttps://www.blogger.com/profile/13220224845130406775noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-45389160808186117622012-10-26T16:38:30.144-07:002012-10-26T16:38:30.144-07:00I wanted to keep that beautiful script bug-free an...I wanted to keep that beautiful script bug-free and corrected the case with straights. Revised version is at below path.<br /><br />https://docs.google.com/open?id=0B9ceZntjqm9EMjlpcEVFckhPTk0<br /><br />New simulation results show that the difference at straights with Wikipedia values are eliminated.<br /><br />HandDescript Occurrences PercentOccurred<br />------------------------------------------- <br />Nothing 1,301,768 50.088035214 %<br />Two of a Kind 1,099,008 42.286453043 %<br />Two Pair 123,739 4.761096746 %<br />Three of a Kind 54,699 2.104649552 %<br />Straight 10,185 0.391887524 %<br />Flush 5,181 0.199348970 %<br />Full House 3,757 0.144557823 %<br />Four of a Kind 592 0.022778342 %<br />Straight Flush 27 0.001038877 %<br />Royal Flush 4 0.000153908 %<br />-------------------------------------------<br />GRAND TOTAL 2,598,960 100.0000000 %fikhttps://www.blogger.com/profile/05483699781311821783noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-65416086330034954062012-08-24T11:31:58.697-07:002012-08-24T11:31:58.697-07:00Thanks for the comments, Daniel... I think you'...Thanks for the comments, Daniel... I think you're right... I only counted the Ace as a "high ace" and didn't account for it possibly being a "low ace".<br /><br />This probably explains why I didn't get as many straights as the Wikipedia probability indicates.<br /><br />--BradBrad Schulzhttps://www.blogger.com/profile/01852762873611487368noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-21805590244760655752012-08-23T15:19:31.531-07:002012-08-23T15:19:31.531-07:00I like the approach you've taken and have made...I like the approach you've taken and have made use of the SQL too. I thought I found an issue with the straight Ace though five, when I should have been using one though five, took me a while to spot my mistake in the SQL I modified to compare a number of hands.Anonymoushttps://www.blogger.com/profile/14718477070823614114noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-21192598070631302442012-08-23T13:22:15.478-07:002012-08-23T13:22:15.478-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/14718477070823614114noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-88031117417604496422012-08-23T12:51:13.762-07:002012-08-23T12:51:13.762-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/14718477070823614114noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-81655748453469532322011-09-06T19:18:00.487-07:002011-09-06T19:18:00.487-07:00@Kevin:
I'm glad you enjoyed it! Thanks for ...@Kevin:<br /><br />I'm glad you enjoyed it! Thanks for the feedback... Now if I can just find the time to run the program a few thousand times... 8^)<br /><br />--BradBrad Schulzhttps://www.blogger.com/profile/01852762873611487368noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-88443159714177288652011-08-22T14:11:54.743-07:002011-08-22T14:11:54.743-07:00This was amazing! And perhaps to explain your &quo...This was amazing! And perhaps to explain your "luck" : they [wikipedia] were computing probability directly, whereas your SQL server has the luxury of presenting reality. I'm willing to "bet" (pun intended!) that if you re-ran this program 10, 20, 100, 1000 times with averaged results, you'd achieve numbers closer to those that the math predicts. (And SQL Server would absolutely LOVE drawing 2,598,960,000 (2.6 BILLION) poker hands for you!)Kevinhttp://www.homeloan-rates.comnoreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-2510689831066068102010-04-12T08:41:46.822-07:002010-04-12T08:41:46.822-07:00Good idea & read Brad. Brilliant stuff here!Good idea & read Brad. Brilliant stuff here!Jamiehttps://www.blogger.com/profile/13974575745319655932noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-32887759712248071322010-04-12T05:51:18.533-07:002010-04-12T05:51:18.533-07:00@Brad
Understood. Perhaps you can post your goofs...@Brad<br /><br />Understood. Perhaps you can post your goofs as well. If you're documenting you're "process", why not?Brian Tkatchhttps://www.blogger.com/profile/11320700842381820277noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-16787883015227518542010-04-09T11:55:06.395-07:002010-04-09T11:55:06.395-07:00@Adam:
Thanks for the comment... I was wondering ...@Adam:<br /><br />Thanks for the comment... I was wondering if someone else was crazy enough to do something like this, and I'm glad to see I wasn't the first. 8^)<br /><br />I did consider doing a more mathematical approach at first, but didn't come up with anything that I liked. Admittedly the light bulb went on with regard to my eventual approach before I was able to pursue mathematics any further. I like your idea of the powers of two... I look forward to looking into your code in more detail... thanks for that.Brad Schulzhttps://www.blogger.com/profile/01852762873611487368noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-5297395633536854342010-04-09T11:50:33.815-07:002010-04-09T11:50:33.815-07:00@Brian:
Yes, "Insane" is my middle name...@Brian:<br /><br />Yes, "Insane" is my middle name.<br /><br />Regarding your critique... I appreciate your bringing it up. This kind of complicated stuff does get hard to communicate. But the steps that I outlined in the blog were the actual steps that I took in developing the solution (but I left out a couple things I tried and eliminated). My explanations mirrored what I was thinking when composing the code.<br /><br />I read over the post several times before posting it, trying to make sure it would be clear, and I thought it was. But perhaps I am "just too close" to it... it was already ingrained in my brain, so what seemed clear to me may be "clear as mud" to others.<br /><br />It was a challenge to write the code... my brain did go through several contortions... but you eventually get "into the zone" and it all becomes clear. But it is admittedly hard to get into that same zone if you haven't begun the entire process from scratch... It's hard for me to follow someone else's code sometimes... especially something as wild as this was.<br /><br />Wait till next Tuesday... Most likely I won't even bother trying to explain the code in my T-SQL Tuesday post because it is even more complex than the Poker stuff... I may just let the comments in the code speak for themselves... We'll see.Brad Schulzhttps://www.blogger.com/profile/01852762873611487368noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-41656400461311626212010-04-09T07:34:28.949-07:002010-04-09T07:34:28.949-07:00Nice! I started something similar several years ag...Nice! I started something similar several years ago but you've taken it to a much higher level.<br /><br />http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/texas-hold-em-hint-1.aspxAdam Machanichttp://sqlblog.comnoreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-100165183520439152010-04-09T05:58:42.692-07:002010-04-09T05:58:42.692-07:00I think you need a statistician to see how signifi...I think you need a statistician to see how significant the discrepancy between your royal flush experience and the expected royal flush experience is.<br />Stats was not my favorite subject.Michael J. Swarthttps://www.blogger.com/profile/05408240220683534698noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-87287000182356391842010-04-09T05:16:49.161-07:002010-04-09T05:16:49.161-07:00You are insane. A good type of insane, but insane ...You are insane. A good type of insane, but insane nonetheless.<br /><br />I like the idea of doing all these things in SQL. Sets are everywhere, and if we just look, we'll see them.<br /><br />A critique: I find your posts, such as this, confusing. It's like i'm coming along for the ride, but if i don't catch your train of thought, the rest is just a blur. Everything here is explained after the fact "i did this because"..."i didn't do that because", which are great comments inside an SP or VIEW that someone else might need to maintain, but is expected to be comfortable with the context. Here, it takes a moment to get me into your mode of (insane) thinking.<br /><br />I think i'm asking for a little more explanation of the approach, before diving into it. Maybe even showing what doesn't work. (I'm not so clear on the whole thing myself.) Then you can publish the SQL to Mother Goose and Grimm.Brian Tkatchhttps://www.blogger.com/profile/11320700842381820277noreply@blogger.comtag:blogger.com,1999:blog-3000721125799986885.post-37029149719292617272010-04-08T13:03:36.701-07:002010-04-08T13:03:36.701-07:00This is awesome!!! I loved the graphical effects a...This is awesome!!! I loved the graphical effects and the concept of playing poker in SQL. Great job!!Adam Haineshttps://www.blogger.com/profile/16288608920551626835noreply@blogger.com