Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 32.290.459 Times

Games::Euchre::AI 1.02

  Date Added: July 05, 2010  |  Visits: 1.057


Report Broken Link
Printer Friendly Version

Product Homepage
Download (81 downloads)

Games::Euchre::AI is a Player API for Euchre card game. This class implements a skeletal Euchre player programming interface. Subclasses can be created quite easily as interactive interfaces or AI computer players. If you wish to write your own computer player, I recommend you start with Games::Euchre::AI::Simple. If you wish to write your own human interface, I recommend you start with Games::Euchre::AI::Human. CLASS METHODS new Create and initialize a new Euchre AI. This object is implemented as an empty hash. Subclasses may wish to use this hash for state storage. INSTANCE METHODS Actions The following methods are called in the course of the game where the AI (or human) has to make a decision. The state of the game is always passed in a hashreference. The following fields are always available: name is the name of the current player. This is useful for output messages. names is a hash relating player number to player name for all four players. debug is a boolean indicating if we are debugging game or the AIs. Your AI may wish to provide verbose output if debugging is going on. bid STATEHASH Choose trump or pass. The relevent details of the current state of the game are provided in a hash reference. Here is an example of that data structure: { name => Player 1, names => {1 => Player 1, 2 => P2, 3 => P3, 4 => Fred}, number => 1, turnedUp => KH, passes => 1, ourScore => 2, theirScore => 4, winScore => 10, hangdealer => false, notrump => false, hand => [JS, QH, 9S, KC, AD], debug => false, } turnedUp is the suit and value of the card on the top of the blind. This will be undef on the second round of bidding. passes says how many people have passed so far hangdealer is a boolean saying whether the hang-the-dealer optional rule is in effect notrump is a boolean saying whether the no trump optional rule is in effect This function must return one of: H, D, C, S, N, HA, DA, CA, SA, NA, or undef N means no trump, A means alone, undef means pass. Not all of these are legal at any given round! Use the isLegalBid() method below if you are unsure. pickItUp STATEHASH If this is called, you are the dealer and someone called trump. Choose which card from your hand to discard in exchange for the top card of the blind. The relevent details of the current state of the game are provided in a hash reference. Here is an example of that data structure: { name => Player 1, names => {1 => Player 1, 2 => P2, 3 => P3, 4 => Fred}, number => 1, turnedUp => KH, trump => H, bidder => 2, weBid => false, usAlone => false, themAlone => false, hand => [JS, QH, 9S, KC, AD], debug => false, } This method should return the 0-based index of the card to trade for the turnedUp card. Namely, this in the index of the hand array for the card that you choose. playCard STATEHASH Choose which card from your hand to play on this trick. The relevent details of the current state of the game are provided in a hash reference. Here is an example of that data structure: { name => Player 1, names => {1 => Player 1, 2 => P2, 3 => P3, 4 => Fred}, number => 1, trump => H, bidder => 2, weBid => true, usAlone => false, themAlone => false, trick => 2, ourTricks => 0, theirTricks => 1, ourScore => 2, theirScore => 4, winScore => 10, played => [10H, 9H, QC], playedBy => [2, 3, 4, 1], hand => [JH, AH, AS, KS], debug => false, } playedBy is an arrayref of numbers of the players in the order they will play. Without this, the alone possibility makes it hard to tell who played what. Any needed information not stored here (like who was the dealer, what was the turn-up card, what happened in the first trick) is YOUR responsibility to collect and store in your instance. This method should return the 0-based index of the card to play. Namely, this in the index of the hand array for the card that you choose..

Requirements: No special requirements
Platforms: Linux
Keyword: Ai Api Card Game Gameseuchreai Hand Libraries Player Player Api Programming Statehash
Users rating: 0/10

License: Freeware Size: 21.5 KB
Casino Games  -  Maria Card Game 1.0
Maria Solitaire is a 2 deck solitaire card game for the Windows PC. 36 cards are dealt into 9 piles, and the remainder of the deck is used as a stock pile to keep play going when the player is no longer able to move cards between the piles. The...
3.42 MB  
Casino Games  -  Castle Card Game 1.0
Castle Solitaire is a free solitaire card game for the PC similar to Beleaguered Castle Solitaire. The four aces are used as foundations and the remaining 48 cards are seperated into 8 piles of 6 cards each. The player may buld the piles of cards...
3.33 MB  
Card Games  -  Pig Hearts Card Game 1.1.1
Pig Hearts Card Game is a classic card game in which the object is to score the least amount of points and avoid scoring points. Pig hearts card game is a four player game played with a standard deck of 52 playing cards. At this point the player...
4.15 MB  
Casino Games  -  Spades Card Game 1.0
Spades is a partnership trick-taking card game. Magic Blast Spades is a free PC Spades card game you can download, or play for free, online at
4.28 MB  
Card Games  -  Guess Card Game 1.7
Guess Card Game is a simple card game that lets you guess whether the next random card is lower or higher than the currently shown card. A card game is a game using playing cards as the primary device with which the game is played. It's a perfect...
4.12 MB  
Libraries  -  Games::Euchre 1.02
Games::Euchre is an Euchre card game for humans and computers. SYNOPSIS Simply run my game wrapper: % or write your own: use Games::Euchre; use Games::Euchre::AI::Simple; use Games::Euchre::AI::Human; my $game =...
21.5 KB  
Games  -  Tams11 Hand and Foot
Hand and Foot is an online card game. You and your partner try to outwit, out bluff and out maneuver your opponent to play the cards at just the right time to leave your opponent with as many points in their hands (and feet) as possible. This is...
961 KB  
Games  -  Estimation (Card Game) 2.1
Estimation is a VERY popular trick-based card game in MANY countries all over the world, now available on you iPhone. A game about being smart, calculate your options with the cards in your hand. set a plan on how you could win more tricks,...
17.9 MB  
Casino Games  -  Baroness Solitaire Card Game 1.0
Baroness Solitaire is a freeware solitaire card game for the PC where the player attempts to remove all the cards in the game from play by matching pairs of cards who's rank add up to 13. The player wins when all 52 cards have been removed from play.
3.32 MB  
Casino Games  -  Euchre Solitaire 1.0
Euchre Solitaire is a single player euchre card game where the player plays cards against the deck according to the rules of euchre. The player must take 3 tricks against the deck to win a hand.
3.41 MB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 3.15.3
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB