-
-
Front-end game, with coach prompts describing the ramification of possible actions
-
Tutorial clickables (same UI look across all 3 learning modes)
-
Home Page
-
Medium mode (pot odds) coach evaluation of decision
-
Description of Learning Module (Kelly Criterion)
-
Evaluation of an incorrect decision according to Kelly Criterion betting analysis
-
Medium mode (pot odds) coach prompts
-
Guessing the playstyle of each bot in Characterize Player (once a hand finishes)
-
Description of Challenge Mode (Characterize Player)
Inspiration
I wanted to build something for this hackathon that would help people cross the barrier between the qualitative and quantitative in poker, since in my poker experience, it was years of playing before I learned about the statistical principles one can use in poker to gain an upper hand. At its core, poker is strategy-based, and this sort of statistical strategy was gatekept from me until I stumbled across it in the community. This project makes it much more accessible for people to learn sound strategies by having players play hands against bots.
What it does
This project teaches users the strategies that professional poker players use. On the main screen, the user can choose from five game modes: Beginner, Proficient, Advanced, Characterize Players, and Free Play. The three learning-based modes will teach poker fundamentals (beginner), pot odds principles (proficient), and the Kelly criterion (advanced) depending on which one the user clicks. The user first is introduced to the respective strategy they will be actively taught, and the user is then placed at a poker table playing against 4 bots. A step-by-step tutorial will take the player through how to use the strategy the mode teaches at a poker table by highlighting buttons and what information on the table is needed for that strategy (in the case of Beginner mode, the tutorial will walk the user through the rules of poker and all possible actions). After every action, a "coach" panel on the right-hand-side of the screen will evaluate their actions retroactively according to their mode's respective strategies. Since the player is not given this evaluation preemptively, it means that players must make decisions with a degree of uncertainty, such that the mathematical reasoning is learned over many simulated hands. The Characterize Players mode will teach players how to read their opponents' playstyles in a coach-less manner across multiple hands, determining whether opponents are tight-aggressive, tight-passive, loose-aggressive, or loose-passive. Free Play mode is simple solo play with no overlays against 4 AI bots that utilize the statistical strategies taught in learning modes.
How we built it
PokerHouse has a TypeScript/React-based front end with a poker game engine handling card dealing, actions, the pot, bot decision-making, equity calculations, hand evaluation, and the respective modes. The bots measure their hand strength in accordance with the Chen Formula to eliminate "trash" hands that humans realistically wouldn't play and also use pot odds to make their decisions. The bots' behavioral profiles, though, have the potential to make actions that are not perfectly aligned with these objective principles due to built-in risk aversion, as long as the difference between expected values of decisions is within a set bound. The coach for pot odds/Kelly criterion modes were created and then integrated into the hands such that they can give retrospective guidance based on what has already happened in the hand. The tutorial system also is integrated into a hand to teach concepts as they become relevant in the game and is what changes from mode to mode, since all game modes run on the same hand advancement engine. To give players time to see decisions, each bot takes 2 seconds to take action.
Challenges we ran into
The biggest challenge was managing the math for pot odds and Kelly criterion calculations in the context of each hand's progression, since as hands went on, the coach was returning incorrect equity/bankroll calculations since opponent bets were being double-counted -- added once for the pot total, and added again in the total calculations. I saw the bug after going through multiple hands, and it took a lot of testing of extreme cases to diagnose. Another challenge was making sure the bots acted rationally, since they originally were playing more bad hands that, in human games, would easily be folded. Using the Chen Formula to easily and objectively measure hand strength made it simple to filter out these hands, which keeps games relatively realistic compared to casino-level poker games. Tuning risk tolerance by changing the decision-making margins bit by bit also took a lot of patience.
Accomplishments that we're proud of
Making a poker suite that a new player can single-handedly use to build up poker experience and learn sound strategies is what I'm most proud of. These concepts can seem more abstract, especially to novices, so I'm proud that others can learn these concepts in an organic situation where the principles are actually applied in real time and your decisions are evaluated in context. The Characterize Players mode also teaches the skill of reading opponents, which is needed for strategy adaptation when human opponents play irrationally or with a more volatile style. In these cases, using both quantitative methodology and qualitative deductions bridges the gap between these two styles.
What we learned
I learned more about the mathematical complexity behind Texas Hold'Em, and also how to translate that complexity into something that is more understandable. I also learned about eliminating bugs through isolation of the functions from the game UI to evaluate the inner workings, since all-in showdowns originally made the game freeze due to anticipated actions that were functionally impossible.
What's next for PokerHouse
I'd like to make the bots adapt to the player's style rather than relying on their own playstyle entirely: real players will do exactly this in poker games, so it would make the games even more realistic. The current modes in PokerHouse only teach basic strategy and can expand to cover the bases of poker terminology more completely (ex: teaching about range, bluffing, position importance).
Built With
- antigravity
- claude
- css
- javascript
- typescript
Log in or sign up for Devpost to join the conversation.