Skip to content

GaillardTom/GameNightPokerAI

Repository files navigation

Game Night Poker AI

UI of the poker webapp

Introduction

This is our repository for the game night challenge hosted during the DCM4 by the British Army. We achieved 2nd place under the name "35SR" during the competition against players from different armed forces around the globe.

Blog Post

Check out this blog post detailing our experience developing it!

The Model

We created the preprocess.py script that takes the raw data from poker hands and creates 6 columns:

  • SuitCount
  • Fullhouse
  • Straight
  • ThreeOfAKind
  • TwoPair
  • Pair

With that, our model located in ./gameServer/players/35rtrans/35rtrans.pkl was able to achieve a 99.9% accuracy in hand detection.

Strategy

This script contains the pre-flop strategy for the poker AI. It determines the appropriate action (call, raise, or fold) based on the hole cards and the betting amounts.

This script contains the post-flop strategy for the poker AI. It determines the appropriate action (call, raise, or fold) based on the current state of the game.

We also created a variety of strategies in the ./gameServer/players/ directory to test them against each other.

Testing

Unit Tests

Only for the pre-flop:

Performance Testing

We also conducted tests that could spin up multiple containers simultaneously and provide a win percentage based on thousands of games. This is a good metric, in our opinion, to evaluate if a strategy is performing better or worse than another one.

Located in: ./gameServer/test_multiple_containers.py

You can also see the results of our in-house duel.

Credits

Big thanks to Jerome and Emile who helped me write the tests and other strategies to battle against each other.

About

🃏🔥Poker AI used in a challenge hosted by the British army. Achieved 2nd place🥈!

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •