PokerFace Github Report

Realization of a complete Texas Hold'em Poker game with artificial intelligence.
Java, Swing

The purpose of this project was to create an offline poker game with AI bots. The challenge of this project was to incorporate realistic behaviors for the bots. We simulated various player profiles such as aggressive, prudent, etc., and also included other behaviors like bluffing. The intelligence of the bots is based on real-time computed statistics (using Monte Carlo estimations and distributing the simulations across all processor cores) and combined with 4D functions that determine the probability of each possible action. Additionally, random factors are included to ensure dynamic and less predictable behaviors.

The Project

Artificial intelligence

During a game, a user can play with a maximum of nine artificial players. We have designed an intelligence based on 4D functions, one for each phase of the game. Each function takes the probability of winning, the ratio of the bet to their bankroll, and the money already invested in the game as parameters. The output is the probability to follow. Afterward, the agent decides whether to raise the bet or simply follow based on another function we have designed.

Statistics with Monte Carlo estimations

One of the inputs of our intelligence is the probability of winning. To approximate this value, we run Monte Carlo estimations using 20,000 simulations for each phase of the game, distributed across all the cores of the computer. This allows us to utilize all the computer's resources while the player is playing normally. When it is the player's turn to play, the simulations stop (if not yet finished) to show the results.

High-level technical specification with extreme requirements

To ensure the validation of the software engineering module, we were tasked with executing a flawless pre-project phase. We conducted thorough work on defining classes, elaborating sequence diagrams, reflecting on use cases and scenarios, and managing the project. Although the exercise was primarily for practice rather than a real-world objective, we successfully completed the project development in three steps, employing a project management approach akin to the renowned SCRUM method.


Type Semester project
Degree B.Sc. HE-Arc, 2nd year
Course Semester project coupled with software engineering course
Duration ~100 hours
Supervisor Prof. Aïcha Rizzotti, Prof. Yassin Aziz Rekik
Co-developers Alexandre Perez, Danick Fort