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

30
LINES

< > BotCompany Repo | #1007812 // Question Maker [include]

JavaX fragment (include)

1  
static S randomNonTechnicalConcept() {
2  
  S b = "";
3  
  for j to 1000: {
4  
    b = randomAIConcept();
5  
    S s = conceptToName(b);
6  
    if (!cic(s, "javax") && !startsWith(s, "->")
7  
      && !containsXYZVariables(s)) break;
8  
  }
9  
  ret b;
10  
}
11  
12  
static Pair<S> randomDifferentConcepts() {
13  
  S a = randomNonTechnicalConcept();
14  
  for i to 10: {
15  
    S b = randomNonTechnicalConcept();
16  
    if (neq(a, b)) ret pair(a, b);
17  
  }
18  
  null;
19  
}
20  
21  
sS makeQuestion() {
22  
  Pair<S> p = randomDifferentConcepts();
23  
  if (p == null) null;
24  
  S adj = randomAdjective();
25  
  ret joinWithSpaces("psrgtxwtfzmfzhsx", p.a, adj, p.b); // is X more Y than Z?
26  
}
27  
28  
sS randomAdjective() {
29  
  ret oneOf(splitAtSpace("dinrgdnbbyfqaogm vyegxexdfpmewhlh bdctgxvpjiavress lrbdjovphoezwgfk ffrmkrbgokesaihw sxewqdexaamizwhd rsabdjeujjzirvzf");
30  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007812
Snippet name: Question Maker [include]
Eternal ID of this version: #1007812/4
Text MD5: ff9e30166f74a86b332a20819534e217
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-20 00:18:42
Source code size: 815 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 553 / 1359
Version history: 3 change(s)
Referenced in: [show references]