DEV Community

Cover image for Building a math-first poker engine in .NET
Redjan Shabani
Redjan Shabani

Posted on

Building a math-first poker engine in .NET

This started as a solo engineering project, and it has grown into something much more interesting than a simple side experiment.

I’ve been building a Texas Hold’em toolkit in C# focused on:

  • bitwise data manipulation
  • Monte Carlo equity estimation
  • extensible game-state abstractions
  • a low-level math-first design without relying on lookup tables

The core idea is not just to compute odds, but to build a reusable platform for poker analysis and strategy modeling with clean abstractions and strong performance characteristics.

The project already includes:

  • low-level card and rank primitives
  • Texas Hold’em-specific logic
  • CLI tooling for range-vs-range estimation
  • benchmark projects for performance validation

Current benchmark results for 10,000 Monte Carlo simulations:

  • 2 players: ~284.5 ms
  • 3 players: ~448.3 ms
  • 4 players: ~628.7 ms

This is still early, but the foundation is solid and there is a lot of space to evolve into deeper GTO-style work, more advanced equity modeling, and broader tooling.

This project is now open for collaboration and contributors; if you are interested in:

  • poker math
  • algorithmic optimization
  • C# / .NET
  • simulation systems
  • performance engineering
  • open-source game-analysis tools

I’d love to connect and build this further together.

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

Top comments (0)