News for hackers. Stuff that matters.
Re:The Law of Large Numbers, or Why It Is a Bad Idea to Go t... by johnfarrelldev on Sunday May 14, 2023 @11:46AM (#35938829)
I haven't completed or deployed it yet but I wrote a C# API to calculate your chance of winning a hand of poker based on all known cards at the table.

All unknown cards are randomly assigned and it just loops a bunch, reasonably easy to implement and actually is reasonably fast.

https://github.com/JohnFarrellDev/PokerMonteCarloAPI/

With the amount of possible outcomes Bayesian statistics just didn't seem reasonable to implement.

Goes without saying this tool is still fairly basic, it shouldn't be used to inform how much to bet or when to fold as it doesn't take into account information such as how much your opponents are betting.

Re:The Law of Large Numbers, or Why It Is a Bad Idea to Go t... by gmi01 on Sunday May 14, 2023 @12:51PM (#35939313)
I wrote a Haskell version that includes two components:

A very efficient function to rank a set of Texas Hold’em hands.

A Monte Carlo situation that gives you the probability of winning each hand from any known amount of information.

It is available here: https://github.com/ghais/poker

Re:The Law of Large Numbers, or Why It Is a Bad Idea to Go t... by bionsystem on Sunday May 14, 2023 @02:09PM (#35939968)
Not sure if you guys are aware but there are solvers existing (most of which are proprietary) that actually give optimal strategies with every possible hands given a betting pattern. They are used extensively as study tools by professional players.
Re:The Law of Large Numbers, or Why It Is a Bad Idea to Go t... by SnowHill9902 on Sunday May 14, 2023 @02:17PM (#35940044)
Can you link to some projects? Ideally also Haskell or also functional?
Re:The Law of Large Numbers, or Why It Is a Bad Idea to Go t... by bionsystem on Sunday May 14, 2023 @03:05PM (#35940458)
I use GTO+ which is proprietary.

I just tried this one which works like a charm (just run the exe from the zip in github releases ; even comes pre-loaded with a wide amount of preflop ranges, which seem to come from a previous solve) : https://github.com/bupticybee/TexasSolver

Searching with "poker solver haskell" only seem to show very immature projects.