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).

1  
!7
2  
3  
p {
4  
  ai_independentSmartBot();
5  
  
6  
  L<JE_CascadeEntry> rule = je_demoRule1();
7  
  
8  
  for trigger to 8: {
9  
    temp newThoughtSpace();
10  
    ai_setVars(null);
11  
12  
    if (bitClear(trigger, 0)) post("a line beginning with \"was ist \"", "is", "in German");
13  
    if (bitClear(trigger, 1)) post("Standard function swic", "is", "safe to call");
14  
    if (bitClear(trigger, 2)) ai_setVars(litmap("#input", "Was ist die Zeit"));
15  
    
16  
    je_checkRule_debug.set(true);
17  
    bool ok = trigger == 0;
18  
    assertEqualsVerbose("Trigger=" + trigger, ok, je_checkRule(rule));
19  
    
20  
    if (ok)
21  
      je_postThens(rule);
22  
23  
    assertEqualsVerbose(ok,
24  
         has("#guessed language", "is", "German")
25  
      || has("#", "guessed", "language is German"));
26  
  }
27  
  
28  
  print("OK");
29  
}

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: 577 / 1398
Version history: 16 change(s)
Referenced in: [show references]