Basic idea: Connect Java and NL. Example problem: Compare two numbers. We need a MICROTHEORY and a PROGRAM. MICROTHEORY: Two numbers A and B can be compared using "bigint(A).compareTo(bigint(B))". For this microtheory, there will also exist a program that parses and "runs" it. PROGRAM (PSEUDO-CODE): // prepare matchRule("Two numbers $1 and $2 can be compared using $3."); S a, b, code = $1, $2, $3; // answer if (matchInput("Is $1 bigger than $2?")) { int x = evalWith(code, a, $1, b, $2); ret x > 0 ? "yes" : "no"; } And that's it for this example.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002379 |
Snippet name: | How to solve the Turing Test |
Eternal ID of this version: | #1002379/1 |
Text MD5: | 2bef8fe08f4bd948059a617d22bfa726 |
Author: | stefan |
Category: | |
Type: | Document |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-01-14 15:30:09 |
Source code size: | 612 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 637 / 164 |
Referenced in: | [show references] |