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

121
LINES

< > BotCompany Repo | #1002833 // A Thought Engine in JavaX

Document

1  
Hello!
2  
3  
I am the real Stefan Reich (<< insider joke!).
4  
5  
I am making a thought engine in JavaX.
6  
7  
8  
Simplified Natural Language
9  
---------------------------
10  
11  
The engine will support natural language (English).
12  
13  
More precisely, it works with a *modified* version of English called SNL (Simplified Natural Language).
14  
15  
The point of SNL is to make structures explicit. It adds 4 special symbols (<, >, [, ]); the rest is more or less plain English.
16  
17  
If you ignore the extra symbols, you can read SNL like an English text.
18  
19  
SNL example: [i < am < tired]
20  
21  
The arrows are this way to indicate that "I" is the main word.
22  
23  
In SNL, everything must be lower case. Upper case indicates variables.
24  
25  
SNL example with variables: [i < am < X]
26  
27  
If you want to include special words or symbols, quote them.
28  
29  
Example:
30  
  ["Nvidia" < is < a > company]
31  
32  
Oops, there is a right arrow now. Why is that? It indicates that "a" is a minor word that is bound to the major word "company".
33  
34  
Note that the right arrow binds stronger than the left arrow, so the above example is equivalent to this:
35  
36  
  ["Nvidia" < is < [a > company]]
37  
38  
If you get the arrows wrong: Don't worry. The point of making an Artificial Intelligence is that it does these things for us.
39  
40  
In the end, we only want to write English and have the system make SNL automatically.
41  
42  
It's not that hard either. In most cases, the left arrow is perfect. After an "a" or "the", there is usually a right arrow. Same after an adjective when followed by a noun.
43  
44  
The advantages of the arrows is that sentences can be simplified automatically by removing the minor parts.
45  
46  
Example: [i < love < ducks < that < swim < at < night]
47  
48  
This simplifies to, for example: [i < love < ducks]
49  
50  
Or to: [i < love < ducks < that < swim]
51  
52  
53  
Theories
54  
--------
55  
56  
Theories are collections of statements and rules.
57  
58  
A statement is something like [i < am < a > computer]
59  
60  
A rule is something like [if < [i < am < tired] < then < [i < should < go < to < bed]]
61  
62  
63  
Solving
64  
-------
65  
66  
Solving is asking a question and having the system try to answer it (using any number of theories).
67  
68  
Example:
69  
  Question: [i < am < X]
70  
  Theory:   [i < am < tired]
71  
  Answer:   X = tired
72  
73  
There might be multiple answers which can be queried one by one.
74  
75  
Solving is already implemented (see #1002830).
76  
77  
78  
Rewriting
79  
---------
80  
81  
Rewriting is taking a theory and deriving new statements from it automatically.
82  
83  
Example:
84  
  Theory: 
85  
    [
86  
      if   [X < is < a > Y]
87  
      and  [a > Y < has < a > Z]
88  
      then [X < has < a > Z]
89  
    ]
90  
    [ mark < is < a > guy ]
91  
    [ a > guy < has < a > gun ]
92  
93  
  Derived statement:
94  
    [ mark < has < a > gun ]
95  
96  
Rewriting is already implemented (see #1002832).
97  
98  
99  
Native code
100  
-----------
101  
102  
For including native code, we rely on Java and provide simple bindings like this:
103  
104  
SNL:  X = quote(Y)
105  
Java: static S quote(S y) { ... }
106  
107  
For constructing or deconstructing complex terms, there is a very simple tree-like Java class called "Lisp".
108  
109  
110  
Meta-solving
111  
------------
112  
113  
The most important idea is to have the system reason about itself and about theories. To this end, solves and rewrites can be triggered from within SNL and the results can be stored as insights about theories and logic engines.
114  
115  
116  
General direction
117  
-----------------
118  
119  
We should express all ideas as naturally as possible. Just write down the English sentence that is in your mind when thinking about things and put it into a new theory.
120  
121  
If the system can't understand your sentence, we will make a translator for it. We have experience... for example, we've been making lots of translators to convert JavaX (extended/simplified Java) into regular Java.

download  show line numbers   

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

No comments. add comment

Snippet ID: #1002833
Snippet name: A Thought Engine in JavaX
Eternal ID of this version: #1002833/1
Text MD5: c0f8d2e9a4264724a3096de282d947a5
Author: stefan
Category:
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-02 03:35:41
Source code size: 3739 bytes / 121 lines
Pitched / IR pitched: No / No
Views / Downloads: 687 / 127
Referenced in: [show references]