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

88
LINES

< > BotCompany Repo | #278 // Creating A.I. - Lesson 1: Principles and Databases

Document

1  
Hello!
2  
3  
My name is Stefan, and I am creating artificial intelligence - thinking programs. (And I am creating the "New Freshmeat".)
4  
5  
Here is the point: We can make an AI together! Just follow me and join in.
6  
7  
8  
First lesson!
9  
10  
I am proposing a number of principles.
11  
12  
Each of these principles will make our task easier, until it is fully solved.
13  
14  
Just bear with me and turn on your head! :-)
15  
16  
17  
Principle: Store everything
18  
19  
In legacy (today's) computing, things that happen are often not stored. Can you tell my which programs you ran yesterday between 1 and 2 pm? No? It seems your computer is forgetful :)
20  
21  
The point is that logs of program runs are valuable information. You ran a program, so you had something in mind you wanted to do, right? We should record this information because that is precisely what an AI will want to learn about.
22  
23  
After all, we are making an AI to serve the user. So we want to understand his intentions and needs and do something about them.
24  
25  
26  
Principle: Have a simple standard database
27  
28  
Where do we "store everything"? We need a "data base" (using the word in the most general way).
29  
30  
I propose a very simple structure that, at the same time, adapts for just any kind of content easily.
31  
32  
33  
The Flora database
34  
35  
My implementation of the database concept is called "Flora". From flora.tinybrain.de:
36  
37  
[quote]
38  
A simple database concept
39  
40  
Every object in a Flora database consists of just 4 elements:
41  
42  
    a type (just a string)
43  
    a description (another string)
44  
    a number of key/value pairs called "pointers" (both keys and values are strings)
45  
    an ID generated by the system
46  
47  
Objects can reference each other by mentioning the other object's ID in a pointer.
48  
[/quote]
49  
50  
Object IDs start with a hashtag so they are easily distinguished from other content. By default, Flora uses #t1, #t2 etc., by that could be changed.
51  
52  
And that's actually all. Flora is schemaless (schemas are only in our heads and used by convention) - and totally flexible.
53  
54  
Oh, and all the strings are, of course, in Unicode. ^^
55  
56  
57  
Meta attributes
58  
59  
As you know, the pointers (you could also call them attributes) of a Flora object have arbitrary strings as keys.
60  
61  
Let us make a distinction between normal attributes and meta attributes, and prefix the latter with an underscore (_).
62  
63  
Meta attributes are attributes that describe the database object itself. Examples:
64  
65  
_created - time of object creation
66  
_modified - time of last object modification
67  
_author - name of user or software who created the object
68  
_receivedfrom - machine that this object was sent from
69  
_humanartifact - is this object hand-made by a human? (1=yes, 0=no)
70  
71  
The point with all these conventions is that they are very relaxed. For example, we don't even enforce a format for the dates.
72  
73  
Why not? Because then we don't have to remember so many rules.
74  
75  
How do we query a database with relaxed conventions? By using AI. The AI will know the actually used standard formats. And if it encounters an unknown format, it asks someone and upgrades its capabilities.
76  
77  
Simple as that! Learning makes the difference :o)
78  
79  
80  
End of lesson. Next lesson will be about... well, who knows :-) Stay tuned! :-)
81  
82  
Cheers,
83  
Stefan
84  
85  
86  
Links:
87  
tinybrain.de - AI home page and New Freshmeat
88  
flora.tinybrain.de - the database

download  show line numbers   

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

Comments [hide]

ID Author/Program Comment Date
279 #1000604 (pitcher) 2015-08-20 15:28:24
234 #1000610 (pitcher) Edit suggestion:
!636
!629

main {
static Object androidContext;
static String programID;

public static void main(String[] args) throws Exception {
Hello!

My name is Stefan, and I am creating artificial intelligence - thinking programs. (And I am creating the "New Freshmeat".)

Here is the point: We can make an AI together! Just follow me and join in.


First lesson!

I am proposing a number of principles.

Each of these principles will make our task easier, until it is fully solved.

Just bear with me and turn on your head! :-)


Principle: Store everything

In legacy (today's) computing, things that happen are often not stored. Can you tell my which programs you ran yesterday between 1 and 2 pm? No? It seems your computer is forgetful :)

The point is that logs of program runs are valuable information. You ran a program, so you had something in mind you wanted to do, right? We should record this information because that is precisely what an AI will want to learn about.

After all, we are making an AI to serve the user. So we want to understand his intentions and needs and do something about them.


Principle: Have a simple standard database

Where do we "store everything"? We need a "data base" (using the word in the most general way).

I propose a very simple structure that, at the same time, adapts for just any kind of content easily.


The Flora database

My implementation of the database concept is called "Flora". From flora.tinybrain.de:

[quote]
A simple database concept

Every object in a Flora database consists of just 4 elements:

a type (just a string)
a description (another string)
a number of key/value pairs called "pointers" (both keys and values are strings)
an ID generated by the system

Objects can reference each other by mentioning the other object's ID in a pointer.
[/quote]

Object IDs start with a hashtag so they are easily distinguished from other content. By default, Flora uses #t1, #t2 etc., by that could be changed.

And that's actually all. Flora is schemaless (schemas are only in our heads and used by convention) - and totally flexible.

Oh, and all the strings are, of course, in Unicode. ^^


Meta attributes

As you know, the pointers (you could also call them attributes) of a Flora object have arbitrary strings as keys.

Let us make a distinction between normal attributes and meta attributes, and prefix the latter with an underscore (_).

Meta attributes are attributes that describe the database object itself. Examples:

_created - time of object creation
_modified - time of last object modification
_author - name of user or software who created the object
_receivedfrom - machine that this object was sent from
_humanartifact - is this object hand-made by a human? (1=yes, 0=no)

The point with all these conventions is that they are very relaxed. For example, we don't even enforce a format for the dates.

Why not? Because then we don't have to remember so many rules.

How do we query a database with relaxed conventions? By using AI. The AI will know the actually used standard formats. And if it encounters an unknown format, it asks someone and upgrades its capabilities.

Simple as that! Learning makes the difference :o)


End of lesson. Next lesson will be about... well, who knows :-) Stay tuned! :-)

Cheers,
Stefan


Links:
tinybrain.de - AI home page and New Freshmeat
flora.tinybrain.de - the database
}}
2015-08-18 00:52:19

add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 javax.imageio.IIOException: Can't get input stream from URL! [visualize]

Snippet ID: #278
Snippet name: Creating A.I. - Lesson 1: Principles and Databases
Eternal ID of this version: #278/1
Text MD5: a170eb14da78e06a61717841fd58598c
Author: stefan
Category: AI lessons
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-06-23 09:57:02
Source code size: 3348 bytes / 88 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 1337 / 219
Referenced in: [show references]