Post by Admin on Jun 1, 2015 18:08:01 GMT
See Attachment
Brain Database
The Brain Database holds all the information required by the various process within the program. Each entry in it is called a Cell. Each cell in the Brain has a 9 bit neural network which is activated by various processes
Some of the fields in the cell have a specific use and others are used for different things.
The Brain database is a combination of two databases merged together. Ai versions previous to version AiV016a had two databases called TF Translation file, and NNE Neural Network Extended. This is why there are some references to the TF or NNE in keywords and the help file in general. These references will change over time as and when the help file is updated.
cell 1 holds the length of the Brain database
cells 2 to 802 have no set use
cells 802 to 2000 are System Cells and are used by the program for various functions details here BrainSystemCells.htm
cells 2000 upward is data added to the database by various functions
A field either holds a number or text
number or text name Description.
number
1 or 0 previous input Input code used in the previous activation, mostly used by the cell event scanner to see if there has been a change to the input.
number
1 or 0 input code This code is put into the neural network which then loads the associated weights, runs the process and sets the output code. The input code can either be changed by other cells or by processes within the program.
number
1 or 0 output code The output from the neural network.
text training file name Either the training or weights file. Training files have a .nnt extension, weights files have a .nnw extension.
text cell action Used to bypass the processing of the input code by the neural network.
text emotion code this is a code held in tags that is used by the program to store information used by the Emotion routines. Cell 935 holds information used by the emotions routines eg.
<f:42> the number of times the word has been found in an input the number is incremented every time the word is found in the input. If the word count goes above 100 then it is reset to 0. This means the word moves down the list in cell 935.
number node 1 to node
to
node 9 to node
Connects the output nodes to input nodes of other cells. The input node of the target cell is changed when the cell is activated.
number in cell Target cell used when connecting output to input nodes.
text tags During cell activation the tags field is read. Click here for details.
text field 11 General use and extra keywords.
text file File name where required.
text detail The dictionary description of the word.
number mode Controls how the input is processed cell 832 is the default settings for the Ai
3, 2008 learning routines are activated, if cell 832 mode=3 then learning is the default
5, translate, translates the cell word with the word in f7 and adds the word
to the output
6, looks for the sentence word in the detail field and then builds up the output from the cell words. This mode uses the last word found so the words in the description will be the most recently added. The number of times words are found means that an output will always be generated, though this output will be random and be void of intellectual translation.
7, puts input into output, bypasses ProcessInput and goes straight to output.
8, learning mode, when a B sentence code numonic is found, then the
dictionary is checked for the word. If the word is found in
dictionary.txt then the word and is, is put into the input, the timer
turned off whilst awaiting the description of the word to be typed in.
Then press ok. The user dictionary is also checked and if the word is
found in this then the word is ignored.
9, looks for words with no type defined ie. type field = 1 or 0.
number operation Activates a system command, these need a command word which is a word with its type field set to 33 proceeding the operation word
1, System command on the file field, field 10 is the extra parameter if needed for executable, field 8 is the reply
2, copy file to filename in field 10 if the type field is 35 then this enforces an absolute order which will enable copy even if the file exists and will be overwritten
3, show picture whose name only is in the file filed, pictures in ..\Ai\image\
4, delete file in file field, full path
5 ,move file to the file name in field 10 type field must be 24 if you want to replace an existing file
6, show pictures in file field, full path
11, turn ON digital channel output 1
12, turn ON digital channel output 2
13, turn ON digital channel output 3
14, turn ON digital channel output 4
15, turn ON digital channel output 5
16, turn ON digital channel output 6
17, turn ON digital channel output 7
18, turn ON digital channel output 8
21, turn OFF digital channel output 1
22, turn OFF digital channel output 2
23, turn OFF digital channel output 3
24, turn OFF digital channel output 4
25, turn OFF digital channel output 5
26, turn OFF digital channel output 6
27, turn OFF digital channel output 7
28, turn OFF digital channel output 8
number order The order field is a bit like operation field but instead of performing system commands its used to carry out functions like combining files and creating html web pages. Sometimes a function word is needed to activate the function, word type 62
0to2 = unused
2, reply with 7
3, reply with 8, PR Tags can be used to build the output.
4, read file in field 10 in folder ..\Ai\readout\
5, read file in field 10 full path
6, read file in 10 into input full path
7, read file in 10 full path using long file routine. There is a max character limit set at 20000 if the text has 255 characters before a return then a gpf may be caused due to variable overload, this is unlikely to happen and would probably only occur if you were trying to read a file that wasn't a normal text file.
8, like 7 but looks for file in readout directory
9 to 19, unused
20, create html this turns the file into a HTML file so it can be read by a browser like internet explorer.It works by sandwiching the file in-between two other files which carry the html formatting, the lengths of the files needs to be specified so you can use normal web pages that work but still be able to chop off at the point required for insertion into the file. Field 7=top file length length of file in 8, field 8=top file, file field=file to convert, field 10=html output file, field 11=bottom file, detail field=length of file in field 11
21, put output between two files same as cell 31 in the Brain database but using this means you don't need to alter cell 31 which is the Ai default.
Make sure that 3 in 31 is set to 21 !. why...
22, put field 9 in-between the two files
23, same as 21 but if there is anything in 9 then it is added to the beginning of the output
24, used by search routine if 3=24 in entry 19 (Search text file info) then the program adds html coding to the output file at the moment it adds: <p>
25, disable repeat answer allows an output to be repeated
when the number 20 is found in the order field then the HTML page is only created if Create HTML is ticked in settings. Having it like this means that only one page can be created at a time reducing functionality for program stability, this method of web page creation is being tested and might change.
number type This field is used for word type.
Different word types are processed in different ways by the Ai
The Sentence Code (SC) is created according to the word type of a word in the Brain db the number is used to define the character used to represent the word in the SC. Word types are defined here
text cell word The word associated to the cell.
number cell number The number in the database.
text keyword Brain Keywords
text field 7 Used by WSB and as an alternative to field 8.
text field 8 Used by various routines when a sentence output is needed.
text field 10 Used by various routines.
number score, generations, max The score achieved during the last neural network training session, which went though the number of generations up to the maximum number of generations. The more generations the better the score, depending also on complexity of the training data.
text filter Used by FIND the string is searched for in the field.
number 0 and 1 training data The cell training data, this is stored in a text file. When the TRAIN button is pressed the neural network is trained using the data. Weights are created and this data is stored as a hidden field in the cell data.
Buttons
New Data writes the contents of the cell to the text file NewBrainData.txt in the data folder. This text file can then be used to update the Brain of another Ai. Copy the file into the data folder of the Ai to update then run the keyword UpdateBrain
Brain Database
The Brain Database holds all the information required by the various process within the program. Each entry in it is called a Cell. Each cell in the Brain has a 9 bit neural network which is activated by various processes
Some of the fields in the cell have a specific use and others are used for different things.
The Brain database is a combination of two databases merged together. Ai versions previous to version AiV016a had two databases called TF Translation file, and NNE Neural Network Extended. This is why there are some references to the TF or NNE in keywords and the help file in general. These references will change over time as and when the help file is updated.
cell 1 holds the length of the Brain database
cells 2 to 802 have no set use
cells 802 to 2000 are System Cells and are used by the program for various functions details here BrainSystemCells.htm
cells 2000 upward is data added to the database by various functions
A field either holds a number or text
number or text name Description.
number
1 or 0 previous input Input code used in the previous activation, mostly used by the cell event scanner to see if there has been a change to the input.
number
1 or 0 input code This code is put into the neural network which then loads the associated weights, runs the process and sets the output code. The input code can either be changed by other cells or by processes within the program.
number
1 or 0 output code The output from the neural network.
text training file name Either the training or weights file. Training files have a .nnt extension, weights files have a .nnw extension.
text cell action Used to bypass the processing of the input code by the neural network.
text emotion code this is a code held in tags that is used by the program to store information used by the Emotion routines. Cell 935 holds information used by the emotions routines eg.
<f:42> the number of times the word has been found in an input the number is incremented every time the word is found in the input. If the word count goes above 100 then it is reset to 0. This means the word moves down the list in cell 935.
number node 1 to node
to
node 9 to node
Connects the output nodes to input nodes of other cells. The input node of the target cell is changed when the cell is activated.
number in cell Target cell used when connecting output to input nodes.
text tags During cell activation the tags field is read. Click here for details.
text field 11 General use and extra keywords.
text file File name where required.
text detail The dictionary description of the word.
number mode Controls how the input is processed cell 832 is the default settings for the Ai
3, 2008 learning routines are activated, if cell 832 mode=3 then learning is the default
5, translate, translates the cell word with the word in f7 and adds the word
to the output
6, looks for the sentence word in the detail field and then builds up the output from the cell words. This mode uses the last word found so the words in the description will be the most recently added. The number of times words are found means that an output will always be generated, though this output will be random and be void of intellectual translation.
7, puts input into output, bypasses ProcessInput and goes straight to output.
8, learning mode, when a B sentence code numonic is found, then the
dictionary is checked for the word. If the word is found in
dictionary.txt then the word and is, is put into the input, the timer
turned off whilst awaiting the description of the word to be typed in.
Then press ok. The user dictionary is also checked and if the word is
found in this then the word is ignored.
9, looks for words with no type defined ie. type field = 1 or 0.
number operation Activates a system command, these need a command word which is a word with its type field set to 33 proceeding the operation word
1, System command on the file field, field 10 is the extra parameter if needed for executable, field 8 is the reply
2, copy file to filename in field 10 if the type field is 35 then this enforces an absolute order which will enable copy even if the file exists and will be overwritten
3, show picture whose name only is in the file filed, pictures in ..\Ai\image\
4, delete file in file field, full path
5 ,move file to the file name in field 10 type field must be 24 if you want to replace an existing file
6, show pictures in file field, full path
11, turn ON digital channel output 1
12, turn ON digital channel output 2
13, turn ON digital channel output 3
14, turn ON digital channel output 4
15, turn ON digital channel output 5
16, turn ON digital channel output 6
17, turn ON digital channel output 7
18, turn ON digital channel output 8
21, turn OFF digital channel output 1
22, turn OFF digital channel output 2
23, turn OFF digital channel output 3
24, turn OFF digital channel output 4
25, turn OFF digital channel output 5
26, turn OFF digital channel output 6
27, turn OFF digital channel output 7
28, turn OFF digital channel output 8
number order The order field is a bit like operation field but instead of performing system commands its used to carry out functions like combining files and creating html web pages. Sometimes a function word is needed to activate the function, word type 62
0to2 = unused
2, reply with 7
3, reply with 8, PR Tags can be used to build the output.
4, read file in field 10 in folder ..\Ai\readout\
5, read file in field 10 full path
6, read file in 10 into input full path
7, read file in 10 full path using long file routine. There is a max character limit set at 20000 if the text has 255 characters before a return then a gpf may be caused due to variable overload, this is unlikely to happen and would probably only occur if you were trying to read a file that wasn't a normal text file.
8, like 7 but looks for file in readout directory
9 to 19, unused
20, create html this turns the file into a HTML file so it can be read by a browser like internet explorer.It works by sandwiching the file in-between two other files which carry the html formatting, the lengths of the files needs to be specified so you can use normal web pages that work but still be able to chop off at the point required for insertion into the file. Field 7=top file length length of file in 8, field 8=top file, file field=file to convert, field 10=html output file, field 11=bottom file, detail field=length of file in field 11
21, put output between two files same as cell 31 in the Brain database but using this means you don't need to alter cell 31 which is the Ai default.
Make sure that 3 in 31 is set to 21 !. why...
22, put field 9 in-between the two files
23, same as 21 but if there is anything in 9 then it is added to the beginning of the output
24, used by search routine if 3=24 in entry 19 (Search text file info) then the program adds html coding to the output file at the moment it adds: <p>
25, disable repeat answer allows an output to be repeated
when the number 20 is found in the order field then the HTML page is only created if Create HTML is ticked in settings. Having it like this means that only one page can be created at a time reducing functionality for program stability, this method of web page creation is being tested and might change.
number type This field is used for word type.
Different word types are processed in different ways by the Ai
The Sentence Code (SC) is created according to the word type of a word in the Brain db the number is used to define the character used to represent the word in the SC. Word types are defined here
text cell word The word associated to the cell.
number cell number The number in the database.
text keyword Brain Keywords
text field 7 Used by WSB and as an alternative to field 8.
text field 8 Used by various routines when a sentence output is needed.
text field 10 Used by various routines.
number score, generations, max The score achieved during the last neural network training session, which went though the number of generations up to the maximum number of generations. The more generations the better the score, depending also on complexity of the training data.
text filter Used by FIND the string is searched for in the field.
number 0 and 1 training data The cell training data, this is stored in a text file. When the TRAIN button is pressed the neural network is trained using the data. Weights are created and this data is stored as a hidden field in the cell data.
Buttons
New Data writes the contents of the cell to the text file NewBrainData.txt in the data folder. This text file can then be used to update the Brain of another Ai. Copy the file into the data folder of the Ai to update then run the keyword UpdateBrain