AIBase Class Reference

#include <aibase.h>

List of all members.


Detailed Description

This is the abstract interface for the way a computer player would play a card in a game. This can be thought of as the "brain" of a player, it holds all the knowledge of each game the AI knows how to play.

Author:
John Schneiderman

Public Member Functions

 AIBase ()
virtual int decision (const QString &game, const CardSequence &playSequence, const RuleBase &rules, const CardSequence &hand, const GameInformation &specialInformation, int score) const =0
virtual QString name () const =0
virtual Player::SkillLevel skillLevel (const QString &game) const =0
virtual CardSequence whichCards (const QString &game, const CardSequence &playSequence, const RuleBase &rules, const CardSequence &hand, const GameInformation &specialInformation) const =0
virtual ~AIBase ()

Constructor & Destructor Documentation

AIBase::AIBase (  ) 

Default constructor.

AIBase::~AIBase (  )  [virtual]

Default destructor.


Member Function Documentation

virtual int AIBase::decision ( const QString &  game,
const CardSequence playSequence,
const RuleBase rules,
const CardSequence hand,
const GameInformation specialInformation,
int  score 
) const [pure virtual]

This gives a decision on the game being played and the strategy the AI uses.

Parameters:
game is the name of the game or game phase the AI player is currently in. This information should be used to determine what the player needs to do.
playSequence is the current play sequence of cards in the game.
rules is the rules for the current game.
hand is the cards in the AI players hand.
specialInformation is the game state information normally known to a human player.
score is the players current score.
Returns:
the legal decision the players wishes to make, usually specified in the rules of the game.

virtual QString AIBase::name (  )  const [pure virtual]

An accessor to the name of our AI player.

Returns:
the name of our AI.

virtual Player::SkillLevel AIBase::skillLevel ( const QString &  game  )  const [pure virtual]

This gives the skill level for the AI Player for a particular game.

Parameters:
game is the game we want to know how well the AI player can play.
Returns:
is the skill level of the player based on the SkillLevel in Player .

virtual CardSequence AIBase::whichCards ( const QString &  game,
const CardSequence playSequence,
const RuleBase rules,
const CardSequence hand,
const GameInformation specialInformation 
) const [pure virtual]

This selects a number of cards based on the game being played and the strategy the AI uses.

Parameters:
game is the name of the game or game phase the AI player is currently in. This information should be used to determine what the player needs to do.
playSequence is the current play sequence of cards in the game.
rules is the rules for the current game.
hand is the cards in the AI players hand.
specialInformation is the game state information normally known to a human player.
Returns:
the cards the player selects.


The documentation for this class was generated from the following files:

Generated on Tue Aug 12 23:24:00 2008 for KardsGT by  doxygen 1.5.5