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

40
LINES

< > BotCompany Repo | #1012858 // Find Bot Triples (User-Bot Interactions)

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

Download Jar. Libraryless. Click here for Pure Java version (20304L/144K).

1  
!7
2  
3  
sclass CandidateMsg {
4  
  S symbol, text;
5  
  int secs; // seconds after last post
6  
  Bool bot;
7  
}
8  
9  
p-tt {
10  
  ai_alternativeSmartBot();
11  
  
12  
  temp ActualThoughtSpace ts = newThoughtSpace();
13  
  
14  
  new LL<CandidateMsg> candidates;
15  
  
16  
  for (S prefix : ll("Chat line", "Smart bot's chat line"))
17  
    for (L<S> t : ai_all_threeInARow(prefix)) {
18  
      L<CandidateMsg> l = makeCandidateMsgs(t);
19  
      continue unless isFalse(l.get(0).bot) && isTrue(l.get(1).bot) && isFalse(l.get(2).bot);
20  
      candidates.add(l);
21  
      for (CandidateMsg m : l)
22  
        print((isTrue(m.bot) ? "[B]" : isFalse(m.bot) ? "[U]" : "[?]") + " " + m.symbol + ": " + quoteBorderless(m.text) + " [" + m.secs + " s]");
23  
      print();
24  
    }
25  
    
26  
  print(n2(candidates, "candidate"));
27  
}
28  
29  
static L<CandidateMsg> makeCandidateMsgs(L<S> t) {
30  
  new L<CandidateMsg> l;
31  
  for (S s : t) {
32  
    new CandidateMsg m;
33  
    m.symbol = s;
34  
    m.text = ai_chatLineText(s);
35  
    m.secs = (int) ai_chatLineTimeDiff(s)/1000;
36  
    m.bot = ai_chatLineSentByBot(s);
37  
    l.add(m);
38  
  }
39  
  ret l;
40  
}

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: #1012858
Snippet name: Find Bot Triples (User-Bot Interactions)
Eternal ID of this version: #1012858/17
Text MD5: d1f9a41baa9b4570571d46c37cd68641
Transpilation MD5: c279bf4cc9e8ba5d607ed1b3732fed94
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-26 18:07:56
Source code size: 1068 bytes / 40 lines
Pitched / IR pitched: No / No
Views / Downloads: 565 / 1229
Version history: 16 change(s)
Referenced in: [show references]