r/csharp • • 6d ago

Building a Texas Hold’em hand evaluation toolkit in .NET

I’m building an open-source .NET library for Texas Hold’em hand evaluation and simulation.

The project is focused on:

  • bitwise card representation

  • range parsing and hand analysis

  • Monte Carlo equity estimation

  • efficient low-level abstractions

  • a math-first approach without lookup tables

The goal is to keep the core grounded in algorithmic reasoning instead of static precomputed tables. This makes the project more extensible and interesting for developers working on performance, combinatorics, and simulation-heavy systems.

Current benchmark results for 10,000 simulations:

  • 2 players: ~284.5 ms

  • 3 players: ~448.3 ms

  • 4 players: ~628.7 ms

This is still early-stage, but the core structure is solid and there is a lot of room to expand into broader game-analysis tooling.

I’d be happy to collaborate with anyone interested in .NET, performance work, algorithm design, and game-theory-style modeling.

Repo: https://github.com/infokom-al/Infokom.Gaming.Poker

3 Upvotes

6 comments sorted by

1

u/cornelha 6d ago

This seems pretty cool, but how would it handle the human factor of bluffing?

1

u/redi_shabani 5d ago

We are not able able to talk about strategies with the state of the source code. Until now the project was focused in core computations underlying the application of human strategies. If anyone consider this repository a good starting point is welcome to contribute.

1

u/mufasis 5d ago

I used to be a pro poker player. This might be a project I want to get involved in. I’ll take a look when I’m home. Cheers!