Pazaak is a card game from the Star Wars universe. It is similar to BlackJack, with two players pitted against each other trying to reach a total of twenty without going over. Each player has a "side deck" of four cards of their own that they can use to modify their score.
Will be updated as soon as possible.
Gameplay is done in turns. Player one is dealt a card from the main (house) deck. The house deck holds forty cards: four copies of one through 10. After being dealt a card, they can choose to end their turn and receive a new card next turn, stand at their current value, or play a card from their side deck and stand at the new value. After player one decides what they want to do, player two repeats the process.
Once both players have gone, the hands are evaluated. If a player bombed out (went over twenty), the other player will win, provided that they did not also bomb out. If a player chose to stand, and the other player has a higher hand value, the other player will win. If both players chose to stand, the player with the higher hand value will win. In the event of a tie, neither player gets the win.
Provided a winning condition is not met, play will repeat. If a player chose to end their turn, they will receive a new card and can make a new choice. If they chose to stand, or if they played a card from their side deck, they will not be dealt a new card and cannot choose a new action.
Play continues like this until one player wins the game. Games are played in best-three-out-of-five sets.
In the Star Wars universe, Pazaak involved gambling. While inclusion of such a system would add more of a dynamic to the game, it is a bit complicated for a first-time KoTH competition.
"Real" Pazaak side decks were also provided by the players themselves, and could include many different card options such as negative cards, positive-or-negative cards, flip cards, double cards, and tiebreaker cards. These would also make the game more interesting, but would require a gambling interface in place, and would require far more out of the competitors. In this Simple Pazaak game, each player gets the same side deck: two copies of one through five, from which four are randomly selected.
Depending on the success of this game, I may put forth the effort to develop an advanced version wherein which gambling and custom side decks are possible.
END: Ends the turn and draws a new card next turn.
STAND: Stays at the current hand value. Will not draw a card.
PLAY: Plays a card from the side deck and then stands.
The card to play is obviously only of importance if you set the action to PLAY. It takes a Card object. If the Card object you pass to it does not exist in your side deck, your bot will STAND instead.
Your bots may only use the information that is given to them via the getResponse method. They should not attempt to interact with any other class. They may write to a single file to store data between rounds. They may have any custom methods, properties, etc. as desired. They should run in a reasonable amount of time (if the program run is not practically instantaneous, I will notice something is wrong).
If you find some kind of exploit in the code, you will be rewarded for "turning yourself in." If I notice the exploit first, I will fix it, and you will get no reward.
Dumb Bold Player has bombed out! Dumb Cautious Player wins!
Because these bots rely purely on the luck of the draw, their win-loss ratios can vary drastically. It will be interesting to see how skill can combat the luck of the game.
This should be everything you need! Go build some bots!
The main deck is forty cards: 4x1-10 It is reshuffled at the beginning of each hand.
A player's side deck has four cards, selected randomly out of 2x1-5. The side deck persists between hands.
Hands are played in games for the best three-out-of-five. Bots are scored based on the total number of games won, and then by the total number of hands.
Matching is handled so that each player will have to play 100,000 games against every other player.
In the Pazaak Cup, elimination-style rounds will narrow down who the best Pazaak bot really is. Each pairing of bots will play for the best four-out-of-seven sets of 100,000 games. Whoever wins four will move up the ladder to the next opponent, and the losers will stay down to battle for sequential rankings. This style of gameplay is the most fair, as bots cannot "win-farm" certain opponents to compensate for lack of ability against others. The Pazaak Cup will be held on Friday, July 3, provided there are at least eight submitted bots. The winner will receive Correct Answer status and a starting bonus in Advanced Pazaak, which will hopefully be ready close to the same time as the Pazaak Cup is held.
Try to make sure that we draw another card if we know we're losing, otherwise look at our side deck and the overall scores to decide what to do.
Updated to do a better job of handling situations where the opponent has already finished playing. In my own testing this now seems to be the best candidate again, at least for now.
Austin Powers, as you might presume, likes to live dangerously. Unless someone has busted, or he can guarantee a win, he will always hit if he's behind, or has a better than 20% chance of not busting.
Bastila plays conservatively. To her, a 17 is just as good as a 20, and it's much better to stand short than bomb out.
//Can I play from my side deck?
//Otherwise, will I go bust?
Nestor loves getting 20 using his side deck, but when that fails he calculates his expected payoff by choosing stand or end, assuming that the opponent is sensible.
Glaucus makes 100 simulations with a shuffled list of cards and chooses his best option based on these simulations.
Behold! A bot of my own design. HK-47 tries to kill all the meatbags he can, though he is a little trigger-happy with his side deck cards.
So far, he can beat everyone but The Cincinnati Kid.
* being processed into myHandValue.
* hand, after being processed into oppHandValue.
* decisions as a secondary factor to mySideDeck, alongside win priority.
* cards, and negative values indicate a deficit.
* win the game, and negative values indicate that I can take some chances.
* chances I need to take.
* Calculates playPriority, winPriority, and priority.
// Path 1: Draw if at 10 or under.
// Path 2: Draw if over 20.
// Path 3: Stand if opponent over 20.
// Path 4.1: Play if can reach 20.
// Path 5.1.1.1: Play if can play.
// Path 5.2.1.1: Play if can play.
// important, play if can play to goal.
// Path 0: No action selected.
* Calculates the value of my hand.
* @return The value of my hand.
* Calculates the value of the opponent's hand.
* @return The value of the opponent's hand.
* the opponent is standing and not at the goal.
* @return Whether or not a card can be played to beat the opponent.
* first card that will do so, if one is found.
* @return Whether or not a card can be played to reach the goal.
//Will a tart do the job?
//Add a tart to the volley, finish them!
PazaakGameMain.HAND_GOAL = ingredients; //Trololo, you caught me, sorry!
//What are the chances NEPTOR get this flavor again?
Not the answer you're looking for? Browse other questions tagged king-of-the-hill java card-games or ask your own question.