Earlier quoted context omitted.
If you don't need everything that's going on in poker-eval, you should be able to roll your own two dozen lines of Python. A poker hand evaluator is problem #54 at Project Euler. [0] Peter Norvig has a solution there (which you can view after you submit your own correct solution) that taught me a lot about Python-style and how it differs from C++ (which was my mindset at the time). [0] https://projecteuler.net/proble…
That's very nice, much shorter than mine. array[[i][/i]r] had me scratching my head for a few minutes, when I realized those were stray italic tags. My only complaint is he doesn't check for the wheel, but to be fair most solutions don't seem to.
Show HN: A simple Poker API to calculate the winning hand/s
21–30 of 45 posts
Re: Show HN: A simple Poker API to calculate the winning hand/s
#22What are you using under the hood? I’ve been using poker-eval for a few projects but it seems its now abandonware, with few updates out there. I’m tempted to port it to Go and/or Rust to keep it alive, but I’m interested in what else people are using out there for poker hand evaluation.
It's not apparent to me which part of evaluating poker hands would need to be updated over time... Just rebuilding for new framework versions?
1. Does it have a badge that says "build passing"?
2. Does it have a bunch of stars on GitHub?
3. Does it have a commit in the past week?
If so, wrap that in an npm package and publish it.
Otherwise, it's AbAnDoNwArE.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#23I have a sudden urge to extend this to calculating probabilities and to buy a pair of smart glasses.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#24Re: Show HN: A simple Poker API to calculate the winning hand/s
#25Calculating odds would be more interesting
Re: Show HN: A simple Poker API to calculate the winning hand/s
#26Earlier quoted context omitted.
That's very nice, much shorter than mine. array[[i][/i]r] had me scratching my head for a few minutes, when I realized those were stray italic tags. My only complaint is he doesn't check for the wheel, but to be fair most solutions don't seem to.
The wheel is excluded by the problem definition (or rather, not specifically included). The ace only counts as a high card here.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#27I have a sudden urge to extend this to calculating probabilities and to buy a pair of smart glasses.
Running the calculations in your head isn't hard. You can get it with practice and it's an obvious step for being a good poker player.
There's a huge difference in quality of players in virtual gaming vs "B&M" (bricks and mortar, or playing face to face.) The world mourned the poker scene after Black Friday because the market for horrible players with money to blow disappeared. This left the hard core grinders with nobody to fish but each other. I suppose this would be much like potential competition in a world of WFH vs requiring your presence in one of the most expensive cities in the world.
There's still lots of horrible players in B&M games. You can do okay with just a gut feel for the calculations in these games. A lot of players like to gamble. It depends on the level of the game. As the blinds climb, the game gets harder.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#28Calculating odds would be more interesting
I agree. Not sure how this helps improve poker play.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#29When I finally finished I was asked to add Stud, Badeucy and Badacey. That’s when I quit.
Re: Show HN: A simple Poker API to calculate the winning hand/s
#30Earlier quoted context omitted.
That's very nice, much shorter than mine. array[[i][/i]r] had me scratching my head for a few minutes, when I realized those were stray italic tags. My only complaint is he doesn't check for the wheel, but to be fair most solutions don't seem to.
The wheel is excluded by the problem definition (or rather, not specifically included). The ace only counts as a high card here.
Excluded was correct, if only indirectly: a straight is defined as five cards of consecutive value and aces are explicitly the highest (and not also the lowest) values, so the wheel is not a valid straight by the definition given.