Libraryless. Click here for Pure Java version (1902L/14K/43K).
1 | !759 |
2 | |
3 | !include #1002412 // Turing |
4 | |
5 | static void tests() { |
6 | cmds(); |
7 | } |
8 | |
9 | static L<S> allcmds = litlist("load", "save", "run", "go", "quit"); |
10 | |
11 | static void cmds() { |
12 | twice { |
13 | L<S> cmds = selectRandom(allcmds, 3); |
14 | int pivot = rand(l(cmds)); |
15 | S x = cmds.get(pivot); |
16 | S input = x.substring(0, 1); |
17 | 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); |
18 | } |
19 | } |
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: | 587 / 1940 |
Referenced in: | [show references] |