27 namespace OpenSkyNet {
51 int serialize(std::ofstream& fout_)
const;
56 std::vector<Rule> _rules;
59 void checkPremises(
const std::list<Record>& premsToCheck_,
int& antecIndex_,
float& timeStamp_);
64 bool antecCheck, allAntecsCheck, doChangeState, ruleCheck, returnVal;
65 int countFound, findThisMany, rulesSize, premsSize, stateInputsSize;
100 const std::vector<int>& numOfParamsInAntecsToCheck_,
101 int consequentStateInput_,
102 const std::vector<int>& timesFound_,
103 const std::vector<bool>& acceptOnlyNewSinceStateChange_,
104 const std::vector<float>& secondsOld_,
105 const std::vector<Premise>& conseKBPrems_,
106 const std::vector<Premise>& remKBPrems_,
107 const std::vector<bool>& remAll_);
117 bool includeGlobalKB_=
false);
124 int serialize(std::ofstream& fout_)
const;
142 int serialize(std::ofstream& fout_,
const std::vector<Logic::Rule>& ruleVector_);
151 int assemble(std::ifstream& fin_, std::vector<Logic::Rule>& ruleVector_);
int serialize(std::ofstream &fout_) const
Definition: AILogic.cpp:231
KB * g_kB
Definition: AIManager.cpp:10
std::vector< int > _numOfParamsInAntecsToCheck
Definition: AILogic.h:42
int serialize(std::ofstream &fout_, const std::vector< T > &vector_)
Definition: AIBase.h:193
std::vector< Premise > _conseKBPrems
Definition: AILogic.h:47
int assemble(std::ifstream &fin_)
Definition: AILogic.cpp:32
std::vector< float > _secondsOld
each float is how many secs ago to accept premises for this antec
Definition: AILogic.h:46
bool createDerivationRule(const std::vector< Premise > &antecedents_, const std::vector< int > &numOfParamsInAntecsToCheck_, int consequentStateInput_, const std::vector< int > ×Found_, const std::vector< bool > &acceptOnlyNewSinceStateChange_, const std::vector< float > &secondsOld_, const std::vector< Premise > &conseKBPrems_, const std::vector< Premise > &remKBPrems_, const std::vector< bool > &remAll_)
Definition: AILogic.cpp:53
std::vector< bool > _remAll
for each premise to be removed, remove all of its type?
Definition: AILogic.h:49
int assemble(std::ifstream &fin_, std::vector< T > &vector_)
Definition: AIBase.h:218
int serialize(std::ofstream &fout_) const
Definition: AILogic.cpp:13
std::vector< bool > _acceptOnlyNewSinceStateChange
Definition: AILogic.h:45
Logic(LOGIC_IDS logicId_, const int maxRules_=-1)
Definition: AILogic.cpp:51
LOGIC_IDS getLogicId() const
Definition: AILogic.h:82
std::vector< Premise > _remKBPrems
Definition: AILogic.h:48
LOGIC_IDS
Definition: AIConsts.h:32
std::vector< Premise > _antecedents
Definition: AILogic.h:41
bool performLogic(State *&state_, KB *&kB_, float &timeStamp_, bool includeGlobalKB_=false)
returns true if state_ changed, false otherwise
Definition: AILogic.cpp:144
std::vector< int > _timesFound
Definition: AILogic.h:44
int assemble(std::ifstream &fin_)
Definition: AILogic.cpp:241
int _consequentStateInput
Definition: AILogic.h:43