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

19
LINES

< > BotCompany Repo | #1002417 // Turing Tests: Command Finding

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

Libraryless. Click here for Pure Java version (1902L/14K/43K).

!759

!include #1002412 // Turing

static void tests() {
  cmds();
}

static L<S> allcmds = litlist("load", "save", "run", "go", "quit");

static void cmds() {
  twice {
    L<S> cmds = selectRandom(allcmds, 3);
    int pivot = rand(l(cmds));
    S x = cmds.get(pivot);
    S input = x.substring(0, 1);
    add("If the available commands are " + quote(cmds.get(0)) + ", " + quote(cmds.get(1)) + " and " + quote(cmds.get(2)) + ", which command is " + quote(input) + " likely to mean?", x);
  }
}

Author comment

Began life as a copy of #1002413

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002417
Snippet name: Turing Tests: Command Finding
Eternal ID of this version: #1002417/1
Text MD5: c9b0d0ca731313052ae1375b8f4f52e4
Transpilation MD5: 22c24680f5ec05d1733b36673097ee03
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-23 18:51:15
Source code size: 514 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 1845
Referenced in: [show references]