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

29
LINES

< > BotCompany Repo | #1012913 // Test demo rule (OK)

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

Download Jar. Libraryless. Click here for Pure Java version (21041L/152K).

!7

p {
  ai_independentSmartBot();
  
  L<JE_CascadeEntry> rule = je_demoRule1();
  
  for trigger to 8: {
    temp newThoughtSpace();
    ai_setVars(null);

    if (bitClear(trigger, 0)) post("a line beginning with \"was ist \"", "is", "in German");
    if (bitClear(trigger, 1)) post("Standard function swic", "is", "safe to call");
    if (bitClear(trigger, 2)) ai_setVars(litmap("#input", "Was ist die Zeit"));
    
    je_checkRule_debug.set(true);
    bool ok = trigger == 0;
    assertEqualsVerbose("Trigger=" + trigger, ok, je_checkRule(rule));
    
    if (ok)
      je_postThens(rule);

    assertEqualsVerbose(ok,
         has("#guessed language", "is", "German")
      || has("#", "guessed", "language is German"));
  }
  
  print("OK");
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012913
Snippet name: Test demo rule (OK)
Eternal ID of this version: #1012913/17
Text MD5: d91367eb31e0567d1795f1f64e12717a
Transpilation MD5: 945b20e7f46b4f42ad1f3290f6232d45
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-16 14:32:32
Source code size: 780 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 576 / 1396
Version history: 16 change(s)
Referenced in: [show references]