Skip to content

A 2-player (computer-vs-human) python bot for the card game Donkey. Donkey is a deterministic combinatorial game of perfect information (players can see the opponent's cards)

Notifications You must be signed in to change notification settings

kannanmavila/donkey-game-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to play

Objective

lose all your cards before the opponent does

Gameplay

The game consists of rounds. Every round consists of a player playing a card, and the opponent playing a reply to that card. The player who plays first can choose any card in her possession. The second player must reply with a card of the same suit. If the second player does not possess a card of the same suit, she can "strike" with a card of her choice. In case of a strike, the first player has to take back both cards on the table. Otherwise, the round ends and the two cards are set aside (lost), never to return to the game.

Who plays first:

A random player is chosen to start the first round. In every subsequence round, the player who played the higher value (same suit, hence no tie) in the previous round, plays first. The exception is when there is a strike. In that case, the player who played first in the previous round (the player who got back the cards) plays first.

FAQ

  1. Can there be a tie? No. For a tie, both players have to lose all their cards. Cards are lost only in pairs of the same suit. Since each suit has an odd number of cards, there will be at least four cards (one in every suit) left that cannot be paired.

  2. How do I choose which card to strike with? How about the card you hate the most? Or even better, the card that the opponent would hate the most to have.

  3. What if my opponent lies about not having a suit? This is a game of perfect information - both players can guess the other's cards. In the beginning of the game, what you don't have, your opponent does. For clarify, this game is designed such that the computer will (happily) show you all her cards, at all times. However, you can choose not to show your cards.

How to install

It's very simple; download all files to a folder and run python driver.py from shell.

Requirements

python2.7 (get it here)

About

A 2-player (computer-vs-human) python bot for the card game Donkey. Donkey is a deterministic combinatorial game of perfect information (players can see the opponent's cards)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages