pitch playing agent project for into to ai jody ammeter

8
Pitch Playing Agent Pitch Playing Agent Project for Into to AI Project for Into to AI Jody Ammeter Jody Ammeter

Upload: amice-foster

Post on 03-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pitch Playing Agent Project for Into to AI Jody Ammeter

Pitch Playing AgentPitch Playing Agent

Project for Into to AIProject for Into to AI

Jody AmmeterJody Ammeter

Page 2: Pitch Playing Agent Project for Into to AI Jody Ammeter

The Game of PitchThe Game of Pitch This project is based on Oklahoma, 13-pt, 4-player This project is based on Oklahoma, 13-pt, 4-player

Pitch.Pitch. Players sitting across from each other are partners.Players sitting across from each other are partners. Each player is first dealt 9 cards.Each player is first dealt 9 cards. Then a round of bidding follows. Legal bids 5 – 13.Then a round of bidding follows. Legal bids 5 – 13. Highest bidder chooses suit to be played.Highest bidder chooses suit to be played. Everyone discards all cards of other suits.Everyone discards all cards of other suits. Each player is then dealt enough cards to give them Each player is then dealt enough cards to give them

6 cards in their hand.6 cards in their hand. The hand is then played. The highest bidder leads The hand is then played. The highest bidder leads

on the first trick. Whoever takes the trick leads on on the first trick. Whoever takes the trick leads on the following trick.the following trick.

Only cards of the chosen suit are playedOnly cards of the chosen suit are played Points are totaled at the end of each hand.Points are totaled at the end of each hand. The game ends when a team scores 52 points.The game ends when a team scores 52 points.

Page 3: Pitch Playing Agent Project for Into to AI Jody Ammeter

Card Rank and ScoringCard Rank and Scoring

Cards rank from high to low as follows:Cards rank from high to low as follows: Ace, King, Queen, Jack, Off-Jack, High Joker, Ace, King, Queen, Jack, Off-Jack, High Joker,

Low Joker, 10, 9, 8, 7, 6, 5, 4, 3, Off-3, 2Low Joker, 10, 9, 8, 7, 6, 5, 4, 3, Off-3, 2 Points are awarded as follows:Points are awarded as follows:

1 pt each is awarded to the team who takes 1 pt each is awarded to the team who takes the tricks containing the following:the tricks containing the following:

Ace, Jack, Off-Jack, High Joker, Low Joker, 10Ace, Jack, Off-Jack, High Joker, Low Joker, 10 3 pts each is awarded to the team who takes 3 pts each is awarded to the team who takes

the tricks containing the following:the tricks containing the following: 3, Off-33, Off-3

1 pt is awarded to the team who plays the 21 pt is awarded to the team who plays the 2

Page 4: Pitch Playing Agent Project for Into to AI Jody Ammeter

Agents Bidding MethodAgents Bidding Method

The agent forms a bid using a simple The agent forms a bid using a simple evaluation function. A bid is calculated for evaluation function. A bid is calculated for each suit.each suit.

Face cards, Jokers, and the deuce all have Face cards, Jokers, and the deuce all have assigned point values.assigned point values.

Points are also added for having multiple Points are also added for having multiple cards of the same suit.cards of the same suit.

The total of these points is the agents bid The total of these points is the agents bid for that suit.for that suit.

The highest of these bids is then made in The highest of these bids is then made in the corresponding suit.the corresponding suit.

Page 5: Pitch Playing Agent Project for Into to AI Jody Ammeter

Agents Method of PlayAgents Method of Play

The agent is given perfect information.The agent is given perfect information. Sees other players hands, and knows what Sees other players hands, and knows what

cards have already been played on a given cards have already been played on a given trick.trick.

The agent then builds a search tree for the The agent then builds a search tree for the trick and uses minimax to maximize points trick and uses minimax to maximize points received on that particular trick.received on that particular trick.

Drawback: Does not plan ahead, and Drawback: Does not plan ahead, and therefore does not always play optimally.therefore does not always play optimally.

Page 6: Pitch Playing Agent Project for Into to AI Jody Ammeter

Building the Search TreeBuilding the Search Tree The agents hand becomes the first level of the The agents hand becomes the first level of the

search tree.search tree. The next players hand, Opponent 1, becomes the The next players hand, Opponent 1, becomes the

children of the nodes representing the agents hand.children of the nodes representing the agents hand. The next players hand, Agents Partner, becomes The next players hand, Agents Partner, becomes

the children of each of the nodes representing the children of each of the nodes representing Opponent 1’s hand.Opponent 1’s hand.

The next players hand, Opponent 2, becomes the The next players hand, Opponent 2, becomes the children of each of the nodes representing the children of each of the nodes representing the agent’s partner’s hand.agent’s partner’s hand.

If a player has already played on the trick, his hand If a player has already played on the trick, his hand just consists of the card that was played on this just consists of the card that was played on this trick. trick.

Page 7: Pitch Playing Agent Project for Into to AI Jody Ammeter

Example Search TreeExample Search Tree Agent’s Leading, Possible plays: Ace, High JokerAgent’s Leading, Possible plays: Ace, High Joker Opponent 1: Jack, deuceOpponent 1: Jack, deuce Partner: 8, 3Partner: 8, 3 Opponent 2: Low JokerOpponent 2: Low Joker

A

J

H

J2 2

38 8 3 38

LL LL L

38

LLL

5-6 2-35263

63 2

5

-35 -6 52

6 -3 5

5 -3

5

Max

Min

Min

Max

Page 8: Pitch Playing Agent Project for Into to AI Jody Ammeter

Questions?Questions?