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
Namespaces | Classes | Enumerations | Functions | Variables
OpenSkyNet::AI Namespace Reference

Action selection solvers. More...

Namespaces

 FileIO
 Write/read AI classes to/from binary files.
 

Classes

class  Premise
 
class  Action
 
class  Record
 
class  State
 
class  FSM
 
class  KB
 
class  KBHashTable
 
class  KBSplayTree
 
class  Logic
 
class  Wrapper
 

Enumerations

enum  FSM_IDS { DEFAULT_FSM_ID, FSM_MAX, FSM_NONE }
 
enum  LOGIC_IDS { DEFAULT_LOGIC_ID, LOGIC_MAX, LOGIC_NONE }
 
enum  PREMISES {
  REC_MOVE_TO_WARRIOR, REC_OBSTACLES, REC_ATTACK_WARRIOR, REC_LESS_THAN_QUARTER_END,
  ACT_FIGHT, ACT_FLIGHT
}
 
enum  STATE_INPUTS { GOTO_FLIGHT, GOTO_FIGHT }
 

Functions

void createAllStates ()
 
void createAllFSMs ()
 
void createAllRules ()
 
void initAIEngine (std::ifstream *fin_=0)
 
void destroyAIEngine ()
 
void popAllRecords (bool onlyAddNew_=false, bool removeAll_=false)
 

Variables

OpenSkyNet::Utils::PrecisionTimer g_timer
 
const int FSM_STATE_MAX = 10
 
vector< Stateg_states
 
KBg_kB = 0
 
KBHashTable g_kBImpl (200, 0, 0)
 
std::queue< Recordg_recordQueue
 
FSMg_fSMs [FSM_MAX]
 
Logicg_logics [LOGIC_MAX]
 
FSM DEFAULT_FSM (DEFAULT_FSM_ID)
 
Logic DEFAULT_LOGIC (DEFAULT_LOGIC_ID)
 
bool g_usedHeap
 

Detailed Description

Action selection solvers.

Enumeration Type Documentation

Enumerator
DEFAULT_FSM_ID 
FSM_MAX 
FSM_NONE 
Enumerator
DEFAULT_LOGIC_ID 
LOGIC_MAX 
LOGIC_NONE 
Enumerator
REC_MOVE_TO_WARRIOR 
REC_OBSTACLES 
REC_ATTACK_WARRIOR 
REC_LESS_THAN_QUARTER_END 
ACT_FIGHT 
ACT_FLIGHT 
Enumerator
GOTO_FLIGHT 
GOTO_FIGHT 

Function Documentation

void OpenSkyNet::AI::createAllFSMs ( )
void OpenSkyNet::AI::createAllRules ( )
void OpenSkyNet::AI::createAllStates ( )
void OpenSkyNet::AI::destroyAIEngine ( )
OpenSkyNet::AI::initAIEngine ( std::ifstream *  fin_ = 0)

this function MUST be called before using any finite state machines or Wrapper methods

Parameters
fin_the AI engine file (.cfsm) to read. if 0, then the engine is built using the AI::Manager functions
OpenSkyNet::AI::popAllRecords ( bool  onlyAddNew_ = false,
bool  removeAll_ = false 
)

these params effect ALL records in the queue, so be careful

Parameters
onlyAddNew_is only used during adds - if true, it means to only add new records to a KB
removeAll_is only used during deletes - if true, it means to delete all copies from a KB

Variable Documentation

FSM OpenSkyNet::AI::DEFAULT_FSM
Logic OpenSkyNet::AI::DEFAULT_LOGIC
const int OpenSkyNet::AI::FSM_STATE_MAX = 10
FSM * OpenSkyNet::AI::g_fSMs
KB * OpenSkyNet::AI::g_kB = 0
KBHashTable OpenSkyNet::AI::g_kBImpl
Logic * OpenSkyNet::AI::g_logics
std::queue< Record > OpenSkyNet::AI::g_recordQueue
std::vector< State > OpenSkyNet::AI::g_states

global vector that holds all the states for every FSM

OpenSkyNet::Utils::PrecisionTimer OpenSkyNet::AI::g_timer
bool OpenSkyNet::AI::g_usedHeap