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 | List of all members
OpenSkyNet::AI::KBHashTable Class Reference

#include <AIKBHashTable.h>

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

Public Member Functions

 KBHashTable ()
 
 KBHashTable (int maxRecords_, unsigned int reservedRecords_, unsigned int initParamsSizeOfReservedRecords_)
 
virtual ~KBHashTable ()
 
KB interface methods
virtual bool add (const Record &record_, bool disallowIfPremNameExists_=false)
 
virtual void remove (const Record &record_, bool all_, int numOfParamsToCheck_=-1)
 
virtual const std::list< Record > & find (const Record &record_)
 
virtual bool isEmpty () const
 
virtual void clear ()
 
virtual int size () const
 
virtual float calcStateScore (int stateId_) const
 
- Public Member Functions inherited from OpenSkyNet::AI::KB
 KB ()
 
 KB (int maxRecords_, unsigned int reservedRecords_, unsigned int initParamsSizeOfReservedRecords_)
 

Additional Inherited Members

- Public Attributes inherited from OpenSkyNet::AI::KB
std::vector< Record_reservedRecords
 for constant time (speed-critical) access of Records More...
 
- Protected Attributes inherited from OpenSkyNet::AI::KB
const int _maxRecords
 
- Static Protected Attributes inherited from OpenSkyNet::AI::KB
static const std::list< RecordRECORDS_NOT_FOUND
 

Detailed Description

Hash table implementation of a knowledge base.

Constructor & Destructor Documentation

OpenSkyNet::AI::KBHashTable::KBHashTable ( )
inline
OpenSkyNet::AI::KBHashTable::KBHashTable ( int  maxRecords_,
unsigned int  reservedRecords_,
unsigned int  initParamsSizeOfReservedRecords_ 
)
inline
virtual OpenSkyNet::AI::KBHashTable::~KBHashTable ( )
inlinevirtual

Member Function Documentation

bool KBHashTable::add ( const Record record_,
bool  disallowIfPremNameExists_ = false 
)
virtual

Implements OpenSkyNet::AI::KB.

float KBHashTable::calcStateScore ( int  stateId_) const
virtual

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

Implements OpenSkyNet::AI::KB.

void KBHashTable::clear ( )
virtual

removes all entries EXCEPT for the reserved slots

Implements OpenSkyNet::AI::KB.

const list< Record > & KBHashTable::find ( const Record record_)
virtual

Implements OpenSkyNet::AI::KB.

bool KBHashTable::isEmpty ( ) const
virtual

Implements OpenSkyNet::AI::KB.

void KBHashTable::remove ( const Record record_,
bool  all_,
int  numOfParamsToCheck_ = -1 
)
virtual

Implements OpenSkyNet::AI::KB.

int KBHashTable::size ( ) const
virtual

does NOT include the reserved slots

Implements OpenSkyNet::AI::KB.


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