final specification kwangmonarchikhanjamesgraham

Post on 17-Dec-2015

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Final SpecificationFinal Specification

KwangKwangMonarchMonarchIkhanIkhanJamesJamesGrahamGraham

Waitlisted IdeasWaitlisted Ideas

Decided to put a few non-essential Decided to put a few non-essential features of the program on hold until the features of the program on hold until the program itself is working.program itself is working.

Includes networking, bluffing strategy, 3D Includes networking, bluffing strategy, 3D graphics, variable confidence meter.graphics, variable confidence meter.

Necessary elements of program include Necessary elements of program include Interface/Graphics, Deck randomization, Interface/Graphics, Deck randomization, Dealer functions, Computer AI.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 Dealer Functions (Cont)(Cont)

James CefarattiJames Cefaratti

General StrategyGeneral Strategy

Use a top-down approachUse a top-down approach Check for the royal flush first and then Check for the royal flush first and then

go down through possible hands go down through possible hands checking to see if the player has a checking to see if the player has a certain handcertain hand

Once each player’s hand is Once each player’s hand is determined, compare the players determined, compare the players hands to see who has the better handhands to see who has the better hand

Some Other RulesSome Other Rules

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

Determining High CardsDetermining High Cards

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

Simply compare the valuesSimply compare the values

Special CasesSpecial Cases

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

Data Structures and AlgsData Structures and Algs

The algorithm will have to implement The algorithm will have to implement some data structures such as arrays some data structures such as arrays to store information about the handto store information about the hand

The algorithm will also have to The algorithm will also have to implement a fast sorting algorithm to implement a fast sorting algorithm to organize the cards before checking organize the cards before checking the two handsthe two hands

Computer Playing Computer Playing StrategyStrategy

Kwang KimKwang Kim

Devin GainesDevin Gaines

Computer Playing StrategyComputer 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 StrategyComputer Playing Strategy

• Aggressive players

• Bet/raise the most frequently

• Least likely to fold, even with marginal hands

• How to implement these styles?

Computer Playing StrategyComputer 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 StrategyComputer Playing Strategy

• Example: ~9th

• Weak player folds preflop

• Tight player calls• Aggressive player

raises

Computer Playing StrategyComputer 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 StrategyComputer Playing Strategy

Board:

Hand:

Weak player: check/fold

Tight: Bet/Call

Aggressive: Bet/raise

Graphics/InterfaceGraphics/Interface

IkhanIkhan

MonarchMonarch

top related