Please help. Combinatorics and Probability - Analyzing Poker In this assignment,
ID: 3758783 • Letter: P
Question
Please help.
Combinatorics and Probability - Analyzing Poker
In this assignment, you will apply what you have learned about combinatorics and probability to analyze the popular card game of poker.
Specifically, we will simulate a simplified two-player version of "Texas hold 'em" at the end of a round and calculate, given a player's cards and the community cards, the probabilities of the opponent's holding a hand of each possible type as well as the probability of victory.
Simplified rules of Texas hold 'em are provided below; you do not have to know anything more about poker to write this program. Some VBA skeleton code to find the best hand of five cards from the seven in a hand will be provided for you; the important part of this assignment is to learn to calculate (and implement in computer code) the probabilities. If you're writing in another language, this skeleton code may not be available.
Download skeleton code
The Assignment
That is, your program should calculate the probability that your opponent holds each type of hand, as well as the probability your hand is better than your opponent's.
Your program may simplify the usual rules of poker by assuming all hands of equal rank are equivalent, with no "high card" rules. Under this simplification, for example, any two "one pair" hands tie without regard to the rank of the cards, so a pair of aces would be the same as a pair of eights. You may implement the high card rules if they interest you or if you want to have a useful tool handy the next time you play poker, but they aren't required for this assignment. Likewise, we don't need you to implement betting or a GUI here to make a full poker app.
This is the skeleton code: