Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1017885 // "Enter" Rule [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (12887L/94K).

!7

p-exp {
  L<IfThen> rules = ai_parseRules(mL_raw([["Enter" rules]]));
  print("Got " + n2(rules, "rule"));
  
  final new NLLogicChecker_v3 c;
  c.facts = mL("Random facts");
  
  final new NLLogicChecker_v2.Matching m;
  for (final IfThen rule : rules)
    c.iterate(rule.in, m, r {
      //print("Got matches: " + sfu(m.matches));
      Exp out = c.apply(rule.out, m);
      for (Exp e : nlLogic_unrollAnd(out))
        if (eq(e.text(), "enter"))
          print("Entering. " + out);
    });
}

Author comment

Began life as a copy of #1017829

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017885
Snippet name: "Enter" Rule [dev.]
Eternal ID of this version: #1017885/2
Text MD5: b0e21e4684a5be9e70dc3446b4924894
Transpilation MD5: 47d0cf34147465cc575290b93aa9915d
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-19 10:22:27
Source code size: 517 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 487 / 1253
Version history: 1 change(s)
Referenced in: [show references]