33 namespace OpenSkyNet {
54 int serialize(std::ofstream& fout_)
const;
55 int assemble(std::ifstream& fin_, std::vector<int>& nextStateIds_);
75 static bool _areGlobalStatesSerialized;
76 static bool _areGlobalStatesAssembled;
78 bool _isInitialStateSet;
132 _areGlobalStatesSerialized =
false;
133 _areGlobalStatesAssembled =
false;
141 int serialize(std::ofstream& fout_)
const;
159 int serialize(std::ofstream& fout_,
const std::vector<State>& stateVector_);
168 int assemble(std::ifstream& fin_, std::vector<State>& stateVector_);
bool addState(State &currState_, int input_, State &nextState_)
Definition: AIFSM.cpp:92
vector< State > g_states
Definition: AIFSM.cpp:64
bool setInitialState(State &initialState_)
Definition: AIFSM.cpp:83
State *& getInitialState()
Definition: AIFSM.h:109
const int FSM_STATE_MAX
Definition: AIConsts.h:26
int serialize(std::ofstream &fout_) const
Definition: AIFSM.cpp:136
State * getNextState(int input_)
Definition: AIFSM.cpp:9
int serialize(std::ofstream &fout_) const
Definition: AIFSM.cpp:18
int serialize(std::ofstream &fout_, const std::vector< T > &vector_)
Definition: AIBase.h:193
int _stateId
Definition: AIFSM.h:44
State(int stateId_, const std::vector< Action > &actions_)
Definition: AIFSM.h:50
std::vector< int > _inputs
Definition: AIFSM.h:46
std::vector< State * > _next
Definition: AIFSM.h:47
int assemble(std::ifstream &fin_, std::vector< T > &vector_)
Definition: AIBase.h:218
State * getStateById(int Id_) const
Definition: AIFSM.cpp:129
FSM_IDS
Definition: AIConsts.h:28
static void initAIFSMFileIO()
Definition: AIFSM.h:131
FSM(FSM_IDS fSMId_)
Definition: AIFSM.cpp:71
FSM_IDS getFSMId() const
Definition: AIFSM.h:92
Premise, Action, and Record.
State(int stateId_=-1)
Definition: AIFSM.h:49
std::vector< Action > _actions
Definition: AIFSM.h:45
int assemble(std::ifstream &fin_)
Definition: AIFSM.cpp:165
int assemble(std::ifstream &fin_, std::vector< int > &nextStateIds_)
Definition: AIFSM.cpp:39