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

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

Serving Software Downloads in 956 Categories, Downloaded 50.236.967 Times

Games::Euchre::AI 1.02

  Date Added: July 05, 2010  |  Visits: 1.524

Games::Euchre::AI

Report Broken Link
Printer Friendly Version


Product Homepage
Download (97 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
USER REVIEWS
More Reviews or Write Review


GAMES::EUCHRE::AI RELATED
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  -  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  
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 iCardGames.com.
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  
Card Games  -  Card Game: 1001 1.2
Card Game: 1001 - A very nice card game I used to play with my mom and my sister, when I was a kid. The rules are not hard to learn and there are some nice extras in the game, so I promise it won't get boring. With sound and evaluation. Card...
159 KB  
Card Games  -  Card Game Spiderette Solitaire 1.0
Spiderette Solitaire is similar to spider solitaire, but it plays with only a single deck of cards, instead of two. The goal of the game is to build stacks of cards (from king to ace), causing them to disappear off the screen. Beat Spiderette...
8.65 MB  
Board Games  -  304 card game 0.6.0
This is a card game called 304. 304 is very popular in Jaffna (Sri lanka) region.
4.25 MB  
Card Games  -  A Wizard Card Game 1.1.rc3
This game is a card game which is known to me as 'Wizard'. It is similiar to the game 'SKAT' but not that complex. So it should be easy for children but makes even fun if you're a fullgrown :) This game is a Internet game without any Computer Pl
777.21 KB  
Card Games  -  Duo, a Crazy Eight Card Game 1.0
Duo is a Crazy Eight card game (think Uno) written in Python, translated in many languages. PLEASE NOTE THAT DUO DEVELOPMENT NOW OCCURS ON LAUNCHPAD AND THIS PAGE ONLY EXISTS FOR HISTORY REFERENCE.
533.33 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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 4.0.0
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