# Final Specification KwangMonarchIkhanJamesGraham.

## Presentation on theme: "Final Specification KwangMonarchIkhanJamesGraham."— Presentation transcript:

Final Specification KwangMonarchIkhanJamesGraham

Waitlisted Ideas  Decided to put a few non-essential features of the program on hold until the program itself is working.  Includes networking, bluffing strategy, 3D graphics, variable confidence meter.  Necessary elements of program include Interface/Graphics, Deck randomization, Dealer functions, Computer AI.

Dealer Functions Graham Gimbert James Ceferatti

The Deck -Standard 52 card deck -All players get 2 cards in their hand, and 5 on the table -A maximum of 25 cards dealt in one hand -Total of 21 hand choices per player -Each card consists of a number 1-13, and a type “club” “heart” “spade” and “diamond”

Deck Mechanics When a card is dealt, either to a player or to the table, it must be removed from the deck. The actual deck can be represented as a look-up table, from which values can be taken from until a new hand is dealt. How is a card chosen to be drawn?

Randomization By using a random number generator, we can select cards to be dealt. random.h is more than adequate for our needs. Through modulus division we can restrict the values generated by the random function.

Dealing Algorithm Need connection between dealer and graphics. While dealing cards only the cards of the human player get shown. Cards of the computer players are hidden.

Dealer Functions (Cont) James Cefaratti

General Strategy Use a top-down approach Use a top-down approach Check for the royal flush first and then go down through possible hands checking to see if the player has a certain hand Check for the royal flush first and then go down through possible hands checking to see if the player has a certain hand Once each player’s hand is determined, compare the players hands to see who has the better hand Once each player’s hand is determined, compare the players hands to see who has the better hand

Some Other Rules The algorithm should also check each player’s hand against the best hand currently on the table. There is always the chance of a split pot. The algorithm should also check each player’s hand against the best hand currently on the table. There is always the chance of a split pot.

Determining High Cards Since each card has an explicit value 10, J, Q, K, A = 10, 11, 12, 13, 14. Finding the highest flush, straight or even high card should be fairly straight forward Since each card has an explicit value 10, J, Q, K, A = 10, 11, 12, 13, 14. Finding the highest flush, straight or even high card should be fairly straight forward Simply compare the values Simply compare the values

Special Cases Since the algorithm compares the values on the card to determine high cards, the algorithm will have to take into account the ace, which can also be used as 1 in a straight. Since the algorithm compares the values on the card to determine high cards, the algorithm will have to take into account the ace, which can also be used as 1 in a straight.

Data Structures and Algs The algorithm will have to implement some data structures such as arrays to store information about the hand The algorithm will have to implement some data structures such as arrays to store information about the hand The algorithm will also have to implement a fast sorting algorithm to organize the cards before checking the two hands The algorithm will also have to implement a fast sorting algorithm to organize the cards before checking the two hands

Computer Playing Strategy Kwang Kim Devin Gaines

Computer Playing Strategy Three different strategies for computer opponents. Weak Tight Aggressive Each style has different rules it uses to play Hold’ Em.

Computer Playing Strategy Weak players Play less hands: see less flops Less likely to raise/bet More likely to fold/call Tight players Play less hands than aggressive players, but more than weak players. More likely to bet/raise than weak players, but less than aggressive players.

Computer Playing Strategy Aggressive players Bet/raise the most frequently Least likely to fold, even with marginal hands How to implement these styles?

Computer Playing Strategy Each two card Hold’em hand has a specific strength, they can all be ranked in order from the statistically best hand to the worst hand. We will use these guidelines for the computer to play before the flop comes.

Computer Playing Strategy Example: ~9 th Weak player folds preflop Tight player calls Aggressive player raises

Computer Playing Strategy Playing with community cards: Harder to implement than pre-flop strategy. Different algorithms will be needed for each style. The actions the computer does is based upon the current five card hand that the computer holds.

Computer Playing Strategy Board: Hand: Weak player: check/fold Tight: Bet/Call Aggressive: Bet/raise

Graphics/Interface IkhanMonarch