PitchHut logo
Poker Hand Evaluator
High-performance Texas Hold’em poker hand evaluator built with .NET 8.
Pitch

Poker Hand Evaluator is an advanced web application designed for evaluating Texas Hold’em poker hands. Powered by .NET 8, this robust engine performs over 100 million evaluations per second, making it an ideal tool for developers interested in algorithmic optimization and .NET performance engineering.

Description

Poker Hand Evaluator - High-Performance .NET 8 Engine

Poker.net is a high-performance poker hand evaluator tailored for Texas Hold’em, developed using ASP.NET Core Razor Pages and optimized for .NET 8. This repository presents a modern implementation of poker hand evaluation, focusing on efficiency and performance.

Key Features

  • Rapid Evaluation: Benchmark tests reveal performance exceeding 100 million 7-card evaluations per second, illustrating the engine's capabilities in executing hand evaluations efficiently using pure C#, without the need for lookup tables or unsafe code.
  • Real-time Calculation: Dynamic evaluations ensure that results are calculated instantly, making it ideal for real-time gaming applications.
  • Comprehensive Functionality: The application simulates a complete poker experience, including shuffling, dealing, and determining winning hands for up to 9 players. Users can view detailed results following each game round.

Architecture and Performance

The project re-engineers the original Cactus Kev’s Poker Hand Evaluator, maintaining the integrity of the logic yet enhancing it for better performance with managed data structures and .NET 8 optimizations. The core algorithms preserve the original evaluation methods, promoting fidelity to classic evaluation strategies while leveraging modern programming techniques.

Performance Overview

The implementation's EvalEngine achieves:

  • Mean Evaluation Time: Approximately 1.645 microseconds per 7-card hand processed.
  • Efficiency: The application performs best-of-21 evaluations for 9 players with minimal memory allocation, showcasing its efficiency compared to traditional lookup table methods.
MethodMean (µs/op)Alloc/opEstimated 5-card evals/sec*
End-to-End (9 players • best-of-7)9.5746.2 KB≈ 20 million/sec
Engine-only (7-card → best-of-21)1.6450.9 KB≈ 115 million/sec

*Derived performance figures are based on extensive benchmarking conducted in Windows environments.

Getting Started

For developers interested in diving deeper into algorithm optimization or .NET performance engineering, benchmarks can be reproduced locally using BenchmarkDotNet. The repository includes detailed instructions on setting up an evaluation environment.

For those interested in exploring the application, a live demo is available at Poker Calculator Demo.

Conclusion

Poker.net exemplifies a cutting-edge solution for poker game evaluation, focusing on speed, efficiency, and accuracy. This project not only serves as a practical tool for poker enthusiasts but also provides developers a comprehensive study into efficient coding practices and algorithm performance within the .NET ecosystem.

0 comments

No comments yet.

Sign in to be the first to comment.