Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
OpenSkyNet::AI::KB Class Referenceabstract

#include <AIKB.h>

Inheritance diagram for OpenSkyNet::AI::KB:
OpenSkyNet::AI::KBHashTable OpenSkyNet::AI::KBSplayTree

Public Member Functions

 KB ()
 
 KB (int maxRecords_, unsigned int reservedRecords_, unsigned int initParamsSizeOfReservedRecords_)
 
virtual bool add (const Record &record_, bool disallowIfPremNameExists_=false)=0
 
virtual void remove (const Record &record_, bool all_, int numOfParamsToCheck_=-1)=0
 
virtual const std::list< Record > & find (const Record &record_)=0
 
virtual bool isEmpty () const =0
 
virtual void clear ()=0
 
virtual int size () const =0
 
virtual float calcStateScore (int stateId_) const =0
 

Public Attributes

std::vector< Record_reservedRecords
 for constant time (speed-critical) access of Records More...
 

Protected Attributes

const int _maxRecords
 

Static Protected Attributes

static const std::list< RecordRECORDS_NOT_FOUND
 

Detailed Description

KB is the knowledge base (memory) interface for AI::Wrapper objects.

Constructor & Destructor Documentation

KB::KB ( )
KB::KB ( int  maxRecords_,
unsigned int  reservedRecords_,
unsigned int  initParamsSizeOfReservedRecords_ 
)

parameterized constructor

Parameters
maxRecords_-1 means an unlimited # allowed
reservedRecords_the number of Records in the knowledge base to reserve for quick access
initParamsSizeOfReservedRecords_the # of starting parameters for each reserved Record

Member Function Documentation

virtual bool OpenSkyNet::AI::KB::add ( const Record record_,
bool  disallowIfPremNameExists_ = false 
)
pure virtual
virtual float OpenSkyNet::AI::KB::calcStateScore ( int  stateId_) const
pure virtual

iterates through the KB, totaling the badGoodScaleValue of each Record that has _stateIdAtCreation == stateId

Implemented in OpenSkyNet::AI::KBSplayTree, and OpenSkyNet::AI::KBHashTable.

virtual void OpenSkyNet::AI::KB::clear ( )
pure virtual

removes all entries EXCEPT for the reserved slots

Implemented in OpenSkyNet::AI::KBSplayTree, and OpenSkyNet::AI::KBHashTable.

virtual const std::list<Record>& OpenSkyNet::AI::KB::find ( const Record record_)
pure virtual
virtual bool OpenSkyNet::AI::KB::isEmpty ( ) const
pure virtual
virtual void OpenSkyNet::AI::KB::remove ( const Record record_,
bool  all_,
int  numOfParamsToCheck_ = -1 
)
pure virtual
virtual int OpenSkyNet::AI::KB::size ( ) const
pure virtual

does NOT include the reserved slots

Implemented in OpenSkyNet::AI::KBSplayTree, and OpenSkyNet::AI::KBHashTable.

Member Data Documentation

const int OpenSkyNet::AI::KB::_maxRecords
protected
std::vector<Record> OpenSkyNet::AI::KB::_reservedRecords

for constant time (speed-critical) access of Records

const std::list< Record > OpenSkyNet::AI::KB::RECORDS_NOT_FOUND
staticprotected

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