Download Jar. Libraryless. Click here for Pure Java version (13559L/76K).
1 | !7 |
2 | |
3 | p-exp {
|
4 | BakedBot bot = bakedBotWithRules([[ |
5 | [id: yes, trumps unknown] i(is $x $y?) && fact($x is $y) => o(yes) |
6 | |
7 | [id: no, trumps unknown] i(is $x $y?) && fact($x is not $y) => o(no) |
8 | |
9 | [id: unknown] anyInput() => o(unknown) |
10 | ]]); |
11 | set(bot.factsBot(), standardGrouper := func(S s) -> S {
|
12 | ai_groupSimplestNounPhrasesIfUngrouped(s) |
13 | }); |
14 | |
15 | for (S s : tlft(mL_raw("Program 1"))) {
|
16 | L<S> l = splitAtSingleArrow(s); |
17 | if (l(l) == 2) {
|
18 | bot.answerAuthed("!groupFacts");
|
19 | bot.pcheck(first(l), second(l)); |
20 | } else |
21 | bot.addFact(s); |
22 | } |
23 | |
24 | bot.printTestStats(); |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018194 |
| Snippet name: | Interpret Program 1 [OK] |
| Eternal ID of this version: | #1018194/11 |
| Text MD5: | a203848918df4ae1d51e6343865b96a7 |
| Transpilation MD5: | 77d13824d9edfae380d5e38833be4ab9 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-09 19:05:57 |
| Source code size: | 633 bytes / 25 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 614 / 1296 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |