Processing Algorithms

Spud Ai

Processing Algorithms, routines and functions. These are listed in the order they are called in the program with other abbreviations at the end.

CON Connections
This function uses the words connected to the input words to choose the best sentence from a number of sentences. Words in the BD are connected to each other using the In Cell fields. 9 words can be connected to a word, the number in the In Cell field is the cell number of the connected word. When an input is processed these connections are used to set the Connections variable. This variable is then used when scanning multiple sentences. The number of times a connected word is found in a sentence is used to determine the best sentence, where the sentence with the highest count is used. It is hoped that this will extract the best sentence for the output.

The Mode field and field 7 of cell 911 control which words are used.
Mode = 0 words connected to the input words and words whose SC code is in field 7 e.g if field 7 has the SC codes B% then bad words and nouns in the input are also used.
Mode = 1 words whose SC code is in field 7.
If T is in field 7 then this tells the process to add the ST subject and object words, these are the contents of field 7 and 8 of cell 1606.

Processes that use CON are:
SEN The SEN process uses the CON output if the Order field of cell 910 is set to 0
KEY The keyword FileConnections scans files for connections to the input.

SC Sentence Code
The code is created from the words type value. If the word isn't in the Brain Database then the code associated with the word is set to B.

ST Sentence Type
When the input is processed the Sentence Type ST routine creates codes referred to as ST codes. These codes represent meaning extracted from the input. a ST code is two letters and colon eg fq:
words can have codes associated to them to do this put the codes you want associated with the word in the Emotion field. Eg. the emotion field of the word the could look like this: <f:38><ms:>. The tag <ms:> is used by the ST process, its meaning is detailed below. The tag<f:38> is used by the emotion process the number after f is the number of times the word has been found in the input.
If SC and ST learning is ticked in settings then the code is added to the BD if not already there. when codes are added they are given the type number 137

The codes found and created are then searched for in the BD. Cells whose type is set between 135 to 138 are ST codes.
The Type field number controls how the code is matched when searched for in the BD
Type = 135 ST code if the codes are the same but not necessarily in the same order then use the cell
Type = 136 ST Code if the code is in the cell word then use the cell NEEDS CHECKING NOT SURE
Type = 137 ST Code if the codes are the same as the cell word and in the same order then use the cell
Type = 138 ST Code if an exact match of the cell word is found in the ST codes then use the cell

When a match is found in the BD then field 11 is checked and processed. Any ST tags found in field 11 will be converted to there associated word. Eg. if the input is: what is fish and field 11 is: are you talking about a <su:> then the output will be: are you talking about a fish. After processing field 11 then the cell is activated. This means you can set the ToPrint variable and process it using the normal Tags in the Tags field. This could be used to get the details of a word eg. if the inputted word is fish and there is a cell set to su: then field 11 could be: <su:>
then the tags field could be: <lookup-cell><clear><f12-cell:0> the output would be the detail field of the cell associated to fish.
In the tag <f12-cell:0> when the cell is set to 0 then the cell number created by the <lookup-cell> is used.
The first output created is used for the ST process output.

ST codes can be created automatically using the keyword SuffixFind or manually added to the emotion field.
ST codes are defined so as to fit in with the experimental formula of language.
ST codes are in lower case when in the BD.

**** ACTION perform some task
AI: instruction : command or keyword
AF: fact : update brain
AP: preaching or dictating : defensive mode no religion
AA: answer : update brain
AQ: question : reply with an answer
**** CONNECTED TO THE AI LAST OUTPUT subject is set or object ongoing chat could be connected to other things
CR: reply : find something to say
CE: repeat : rephrase the last output
CS: same as reply but said differently, agreeing with the ai's output or yes
CP: rephrase, not quite sure about the last output or no. Rephrase output to double check
**** DISCRIPTOR a word that describes something usually the subject
DI: descriptor describes what the subject is
DD: describes what the subject does or is doing words with ing on the end
DL: location of thing
DP: place in something else
DS: size of the thing
DC: condition of the thing
**** EXTRA means extra switch used by functions for various things.
EX: <ex:1> used by image scan functions to switch variable CPDevide to be sensitive to top part of image
**** F cant use F due to interference with Emotion code
**** GENERAL CHAT reply with interesting and relevant
GA: anecdote or story : try and find similar references relevant to ai and the story
GR: rambling conversation : tell a joke or story
GJ: joke : laugh
GQ: quote : maybe update brain, or ask a question about the quote
**** LEARNING update data base with new information
LI: information : update brain
LO: observation : question the observation maybe update brain
LS: suggestion : question the maybe update brain
**** MODIFY modifies things like subject
MS: modify subject change an RO: to RF:
MO: modify object change RO: to RF:
MA: modify all or any
**** REFERANCE
RY: you referring to the Ai
RM: me referring the in putter
RO: referring to the subject or object
RF: referring to the subjects or objects function
RT: referring to the task action or process
RP: referring to more than one plural
**** SUBJECT
SU: subject first noun found
SO: object second noun found
**** TENCE
TP: past words with ed on the end so words like confused get through these are a state of doing
TN: now , present
TF: future
**** OTHER special function tags
OW: hidden tag that gets set by words that don't have a ST code words are added to the end of the created output only one word is used.
**** USER DEFINED Sentence Codes with a U are user defined there are 9 available. These are useful for singling out a specific word or group of words.
UA: User Defined
UB: User Defined
UC: User Defined
UD: User Defined
UE: User Defined
UF: User Defined
UG: User Defined
UH: User Defined
UI: User Defined
**** V cant use V due to interference with Emotion code

1606 this holds information on the conversation
filed 7 = subject
field 8 = object
field 10 = sentence type codes
in cell fields hold the subject and object nouns cell 1 is the subject cell 2 the object as new words are added the list moves down until dropping of the list

QI Question and Is
If there is a question, word type 34 and the word is, word type 47 in the input then the following word is looked up and the detail field is sent to the output

LM Learning Mode
Creates associations between cells using the prompts in system cell 923

BD Brain Database
The Brain Database is the database used by the Ai for all things.

QNV Question Noun Verb
A question about a noun and its associated verb cause the QNV routine to scan through the various words detail fields to create associations. The resulting words are built into a sentence using the information from cell 909 the output filter for QNV field 8=first bit "i think that" file field=second bit "are" field 10=third bit "with" field 11=fourth part "do"

EI Expected in Input
The routine looks for words in the input that it is waiting for an answer to, set from a previous input. Field 8 the file field hold the two words. Depending on which words are found then the response is in field 10 and field 11. 10 is the response if word in 8 is found and 11 is the response if the word in file field is found. If the type field is set to 68 then the response is put into the input, if type field is 69 then the response is sent to the output. The operation field in entry 811 is the number of times to keep asking for the word before giving up, field 11 is the "I give up phrase".

K Keyword
Keywords are predefined words in the keyword field that perform various functions. Keywords are described in more detail here
The Keywords exitai and restartai are pre defined within the program, all other keywords are activated by any user defined cell word. Some Keywords can only be activated with a pattern.

PR Pattern Recognition, PC Pattern code and SC Sentence Code
The Sentence Code SC is created by using the word type number of the input words. This number corresponds to a character in the ASCII character set. The characters are added together to build the Sentence Code.
If SC learning is ticked in settings then sentence codes created from the input are added to the Brain db.
The type field for a sentence code is 32, the cell is only used if an exact match is found with the inputs sentence code. To turn the SC into a Pattern Code PC the cell type field needs to be changed to 60. Patterns cells are used when the Pattern is found anywhere in the inputs sentence code
Tags in field 11 are used to build an output
<prsendtobrowser>
<prsendtosearchengine>
<prsetname>sets the name variable and if SC learning is ticked in settings then adds the name to the Brain if its not already there. If the name is larger than one word then a dash - is put in between the names. If there is a number in field 10 then that number is used when adding to the Brain type field instead of the usual number 51 which is the type denoting a name. The names with spaces are added to the detail field . The name is that of the person talking to the Ai.
<prshowname>reads out the name variable puts the contents of field 8 in front of the name. If the name is in the brain then the contents of the detail field of the cell holding the name are added to the output
<prwordafter>
<activate> activates the cells neural network, sometimes other cells are activated instead of the pattern cell depending on other tags used
<use7>
adds contents of field 7 to the output variable
<use8> adds contents of field 8 to the output variable
<use10> adds contents of field 10 to the output variable
<{any word type}> any pattern code eg pattern code for a noun is % this is created by f4 of the fish entry in the tf being 2 so if you use the tag <%> then the noun in the input is used. Because the sentence code is scanned words that aren't in the pattern but are still in the sentence code can be used for the output. F11 is used for output with words and tags. eg what is<B>, would use the bad word in the input for the output instead of the tag <B>
f9 is used when there is nothing in f10 this is legacy code and due to change.

EM Emotion
The Emotion field in settings holds tags. These are codes within square brackets eg. <f:12><v:3><tp:>. Processes that use these tags are the ST and EM processes. For ST see above.
EM uses the f: and v: tags. The v: tag holds the Vibe Number (VN) associated to the word, pattern, ST code or RAS code. The number is used by the processes to tell the Ai if the cell has a positive or negative vibe where 1 is very negative, 9 very positive and 5 is ambivalent. The numbers are used to set the Vibe Count (VC). The VN's are added together then divided by the number of v: tags found. The result is converted to binary which is used for the input code of cell 1614. The Emotion function then activates cell 1614. The number with the f: tag is the number of times the word has been found in an input.
Cells used by the emotion processes
cell 935 to cell fields hold the most common words see System cells 935 for more details.
cell 860 field 11 is words moved from cell 935
cell 1614 the input code is the binary representation of the VC.

NN Neural Network, NNE Neural Network Extended, BD Brain Database
The Brain Database is two databases merged together. These databases were the Translation File TF and the Neural Network Extended NNE databases. These were used on previous versions of the Ai program. all references to the TF or NNE now refer to the Brain Database BD.
Each entry in the Brain Database is called a cell each cell can be connected to other cells and grouped together in a matrix of cells. The processing of cells is done using a matrix file, this file holds the numbers of the cells to be activated, each line holds a number and the cells are processed until it reaches the end of the file. Cells can also be activated using a keyword, a Brain event or directly from the database window.
The file names in entry 919 fields 8, file field and field 10 are the file names of the matrix files used. Field 8 is the first to be read, then file field and then field 10. If there is nothing in the field then nothing happens. The file field is usually ...\weights\6PMatrix.txt this file is created by the NNE6P routine. When the Matrix file is created it uses the numbers in the files in the fields 8, file and 10
field 11 is put into the box marked cell action this means the cells can have a default output set when the words are added
Brain cells 800 to 2000 are used for various things by the program look in System Cells for more details
When a cell is activated the cells Neural Network is fed the input code. This is processed through the network and produces the output code. The network is trained using the training data which controls the output produced by the input. The network will always produce an output even if it hasn't been trained with that particular input code.
The input is a 9 bit code consisting of 0 and 1 the output is also a 9 bit code of 0 and 1.
Weights are created when the network is trained, these are stored within the Brain Database in a hidden field in the cell data
The field Cell Action performs actions before Tags are interpreted
cell IN to cell OUT = send input code straight to output code, bypasses processing by the NN
cell OUT to cell IN = feeds the output back into the input
The box's on the right are used to connect the output nodes of the NN to other input nodes in other cells. The input code in the cell is altered and changed to the output node eg. node 6 to node '4' in cell '2' if the output of the cell is 000001000 then counting from the left we can see node 6 is 1 so then if the input code of cell 2 was 010000000 it will now be 010001000 non of the other nodes are changed. If an input code is created by other cells then its important to have the final cell at the end of the list of cells in the matrix file which processes the cells in sequence.
O to TRAIN this button puts the input code and the output code into the training file, the weights filename with .nnt extension
The Tags field is used for function tags which do various things click here for details of Brain Tags

RAS Reference Action Subject
The RAS routine breaks down the input into 3 distinct types. This routine is designed to look at individual words in more depth. The routine utilizes the search routine first looking for the subject word then rescanning for the reference and action words. The assigning of words to different types is dependant on the types of words in the input ie the subject word may be the noun in the sentence and the reference may be the verb in the sentence but if there is no verb and there are 2 nouns then the reference word will be one of the nouns. This routine is particularly useful in finding information that could be in many files. The test, search file, contains over 60 different files from text files to web pages that are searched. The search takes less than a second on 1296mhz laptop. Because the RAS routine breaks down the sentence to 3 words only you would have thought that the meaning in the sentence would be lost but most times this isn't the case consider the question 'please tell me what the capital of england is' RAS=england-tell-capital this quite clearly describes what is wanted, this also means that different ways of talking or asking for something can still produce the correct answer.
If a file that is searched contains 2 or more of the RAS words then the sentence containing the words is sent to the output.
The Brain Database is also searched for the 3 words joined eg. england-tell-capital if found in the database the sentence in field 8 is sent to the output.
The file name in field 11 of entry 819 is the file name of the text file holding file names of files to search when using RAS

SJ Subject
The Subject routine attempts to work out what subject the conversation is about. The most frequently found word in the Short Term Memory STM is compared against key words that define subjects. Cells 840 to 900 are used by the Subject routine. Fields 8, 9 and 10 contain the keywords that the most occurring word in the input is compared with. The sentence in field 8 of the subject match is sent to the output. Words in field 7 are sometimes fed back into the input. This happens when there is no other output or the output is repeated.
Cell 40 is the 'no subject set' response.

SJN Subject New
The new subject routine is designed to better extract meaning from the input. Using a number of words in the input to do this eg. do you like talking, would you like to talk to me, what do you like talking about. The key operators to distinguish between are:
do you like
would you like
what do you like
Subject new uses cells 860 to 900 with the more complicated meanings toward the end, so if there is say 'you like' then this meaning is used if not overwritten by another meaning in following cells if say 'do you like' is a match then this meaning is used. Cell 860 is used by the Emotion routine so the fields order,11 and 8 are sometimes changed. Cells 861 to 900 are user defined. Field 11 is used for the subject words. The cell with the best match is activated. The Subject Reply variable, RQ number 14 in settings is set with the output from cell activation. eg.

field contents
order 3
field 8 if you <'> so
field 11 do what

using order set to 3 uses one of the Brain translation routines which also uses PR Tags. The word type code between brackets is replaced by the word of that type in the input. If a word of that type isn't found in the input then the tag is replaced with a space.

STM Short Term Memory
The STM is some times refereed to as the Data Store. The length of the STM is set in the box called Learning file length in settings. The number is the number of previous inputs to remember and refer to when looking for repeat occurrences of words when trying to work out what we are talking about. The word is first looked for using the Subject routine, if no match is found then the database is searched.
Brain Database cells 35 to 38 are the various default outputs if nothing is in field 11 of the word found most in STM. If SKIP is in 11 then the word is ignored, if NoSTM is in 11 then the previous word is used. 35=STM noun 36=STM verb 37=Word found in STM and TF not a noun or verb 38=Word in STM but not in database

QN rq slider in settings
This is the setting for the depth that the QNV algorithm goes to find an answer, can be heavy on processing power

SM Sum Maths algorithms

P and PAR Parameters
The PAR algorithm attempts to get as much information as it can from the inputs received. The first thing it does is scans the input for nouns the found nouns are compared with nouns found in previous inputs and applies weights to the nouns, the noun that appears the most is treated as the main subject noun. RAS keywords words with 104 in the type field are treated with highest priority. Verbs and Adjectives are then scanned and the verbs and adjectives occurring the most are given highest priority. The words in the priority words field 10 are words associated to the word the main word should also be in this list. The words in this list are the words used when search the information files. The file in the file field is a text file holding the filenames of the files to search for the keywords in field 10.
The first results file created is the results from the main subject word, the first file is searched using the adjective key words or the verb keywords creating the second file which is then researched with a third file being created holding more narrowed down answers.
If the third file is created then full reply quality is assigned RQ weight no.19 in settings, if only 2 results files then RQ = RQ weight / 2 if only one file created RQ = RQ weight / 3.
This routine is very good at pinning down information i use it mainly to find the prices from the price list as it also picks out numbers and you can associate many things to the words. The routine uses the short term memory and will remember the words from previous inputs until replaced by another word this means it will remember what you are talking about.
Because the routine uses information generated by the RAS routine then RAS rq slider 11 in settings must be higher than 0

WSB Wheat Stone Bridge
This processes uses the analogue input from the k8055 card and turns the signal into words. If there is no k8055 card connected then the random number generator is used instead.

In settings the WSB window, DX window and User window, need to be ticked and RQ slider ws needs to be higher than 0. If WSB learning is ticked then new words are added to the BD. The new word is associated to the next available English word in the BD. If in the output a word seems wrong then to change words use the = sign between the word and what it should become e.g. dog=cat will change the word dog to cat when an associated WSB code is found in the incoming signal.

The process starts just before the input is processed and ends a short time after processing. The process can be kept going but it uses a lot of processor power.

I use a circuit called a Wheat Stone Bridge this circuit has the two probes inserted into the soil of a plant pot holding a plant. The WSB circuit is what early lie detectors use. The signal from this circuit is connected to the analogue input of the K8055 card.

There are 3 pieces of information extracted from the signal these are:
Resistance (wsbresistance) The resistance value changes slowly so this value is used to associate to whole sentences, if the plant is moist i.e. just been watered this value is high so the sentence associated is 'I'm feeling damp'.
Resistance variance (wsbvarience) The resistance variance produces two letters the first is the number of times the signal has raised over time the second is the number of times the resistance signal has dropped over time.
Frequency and frequency variance over time (wsbwave) This uses a number of variables that have been set up from information extracted from the signal to create letters and word lengths. These created words are then checked for in the BD and the associated English word is used in the output.

Cell 908 controls how the function works. The input code controls how the data is presented. From left to right:
red green blue purple resistance variance numbers keep_going audio
eg. If the input code of cell 908 is: 010010001 this will show in the DX window the green wave signal, the resistance and make a noise.
The line color represents the following:
red = number of times the signal rises
green = wsbwave
blue = number of times the signal falls
purple = red and blue signals combined
resistance = wsbresistance
variance = wsbvariance
numbers = the raw data, the signal is digitally processed this produces 10 different values
keep_going = keeps the process going
audio = makes a noise, the frequency is altered by the value of the signal

Mode field controls the output filters
mode = 0 wave output
mode = 1 resistance output
mode = 2 resistance variance

Order field controls the maximum length of the words. Normally this is controlled automatically but when using the random number generator word lengths can become long. The smaller the words the quicker the learning process. If set to 2 the random number generated codes will resolve to normal words after about five minutes of training.

Operation field, if 0 the analogue channel 2 is used, if 1 then channel one is used.

Type field controls the number of words in a sentence. The output length is limited to 160 characters.
type = 0 automatic mode, sentence length controlled from the resistance value.
type = 1 upward number of words in sentence.

SE Search Engine and SEN Search Engine New UNDER DEVELOPMENT
Cell 910 controls how this process works
If there is a file name in field 8 then the CON process is used.
If there is a web address in field 8 then the web based resource is used. The switch is http if this is in field 8 then it is assumed to be a web address. This is normally a search engine.
This process sends a search request to a search engine, then uses the search engine results for the output. The process uses the DownLoadFile. The downloaded file called SENew.txt is then processed depending on the control words in field 11.
Field 11 is used for control words:
CheckWords only use words found in the DB in the output file .
ExcludeWords the words in field 7 are excluded from the output.
ExtractWords is a simple html parser, only works on simple web pages.
Words are extracted from the downloaded file and a new file called SENew.txtx is created.
System cell 910 holds the information for the process
Field 7 contains the words to exclude from the output file.
Order field is the line number to use for the output. If set to 0 then the Connections (CON) output is used.
Field 8 is the first part of web address.
Field f10 is the code added after the search string.
The Mode field controls the search string
Mode = 0 then the search string is built up with the input sandwiched between the contents of field 8 and 10.
Mode = 1 then the search string placed in between fields 8 and 10 is built up in one of the 4 ways:
the noun in the input
the noun and the adjective
the noun and the adverb
the noun and the verb
Mode = 2 the RAS code is used the - in the RAS code is replaced with a +
If there is no search word then the process produces no output.

DT Deeper Thought
The Brain Cells of the input words are activated the output code is used to select cells to use for the answer. This means you can use the neural network and train it to use certain words/cells in the output. The input code is the sentence code character numbers added together then converted to the 9 bit binary code used for the input. The thinking behind this routine is to use the full functionality of the neural network and using all the input to work the neural network. This should also help facilitate a feedback look to build better responses by training the network.
If you click in the output box and the answer has been produced by the DT routine then you can edit the output. When you have edited the output press ok. The entries of the original input words have there output nodes connected to cells changed to the new words from the edited output. New training codes are created and the training file for the cell is updated. The training file and weights file if different from, filename created by the cell number then new training and weights files are created using the format <cell number>.txt
The training file is then loaded into the neural network training algorithm and new weights are created and stored in the new weights file associated to the cell.
The DT routines are designed to provide a feed back loop and utilizes the full functionality of the neural network.
The DT routine attempts to incorporate Chaos Theory. The training algorithm uses random numbers for the weights and then tests those weights though the neural network keeps the best outputs and starts the process again. This system is used to choose the best words and by editing the output and changing the words the connected to words are updated with better words and the best words are kept so the principle is the same as the generic algorithm that trains the neural network but its done by the person updating the output rather than randomly.
If the same words are changed allot then the training data builds up leading to longer training sessions as more conditions need to be set. The number of generations is set in the settings dialog. The more generations the better chance of achieving 100% accuracy, if this is reached then the training algorithm is halted and the results written to the weights field used by the cell. The smaller the amount of training data there is then fewer number of conditions need to be set and thus training is quicker. There might be instances where all conditions of the training data cant be set or would require considerable more generations of training to reach 100%. Future development will probably have a sleep option so at times of inactivity the Ai uses the time to train the network.
Created file
the text file NNECCFile.txt is created by the changed cell inputs routine. As the Ai is processing inputs certain functions and algorithms are used these create information, this info is added to the Brain Database. err this needs looking at

6P NNE 6 Points
This routine uses the NNE database. Entries 2000 upwards are used by 6P. Words in the TF are added to the NNE, each new word is linked to the TF, the entry number of the word in the NNE is put into field 1 of the words entry in the TF. The words added are words in the input but they will only be added if the word exists in the TF. When 6P learning is ticked in settings then when an input is being processed the 6P words are scanned and associations are made by adding NNE entry numbers to output node cell numbers 5 and 6. Field 12 TF is scanned for the word being examined and the word in field 6 is added if it exists in the NNE. The keywords sixplearnon and sixplearnoff turn on and of 6P learning each timer loop, this means learning can be done when the Ai is idle and means inputs are processed at the normal speed.
This routine works by making connections to words in the input following associations with other words. Each word has an entry in the NNE the output nodes cell number is used to associate to other words cell number nodes 1 to 6 are used. The word being examined in the input is checked for in the TF if there then it looks to see if it has an entry in the NNE if field 1 is higher than 10 then this tells it to go to the number in the NNE. It then looks at the numbers in the output nodes cell numbers starting at node 1 and follows the entry numbers checking for connections to the other words of the input, if a direct connection is found then the words that took it to the word are used for the output. If no direct route is found then it chooses one of the other answer routes, a bit of filtering is done using grammar and crude associations.
The last 3 bits (righter most) of the input code can be used to force a route
******000 = work your way through all nodes
******100 = follow node 1
******010 = follow node 2
******110 = follow node 3
******001 = follow node 4
******101 = follow node 5
******011 = follow node 6

EB and NNEB Neural Network Extended Backward
This routine uses the keyword from the PAR routine then using the NNE looks for words that connect to the word. Its works in reverse when compared to the NNE6P routine.

EC and NNEC Neural Network Extended Cell numbers at 1
This routine uses the Word Find routine to find a keyword from the input, the WordFind routine uses different criteria than the PAR routine so the word is often different. The Cell in the NNE associated with the word is activated. The output nodes that are set to 1 after activation, if connected to another cell then the TF entry word associated with that cell is added to the output. The input code is the input code generated from the user input.
At the moment this routine only uses one of the words from the input but this routine is proving very good at producing accurate answers and because it uses the full functionality of the NNE it is extremely flexible and also opens up more self learning possibilities.

DID Dig In Deeper
This routine is similar to the 6p routine but follows cell connections to much greater depth. The routine attempts to find connections between inputted words by following the cells that the inputted words are connected to. The 9 Cell node fields contain the cell numbers to follow these numbers are either added manually or automatically by the LM, DT and 6P learning routines. The output generated is the cell words in between or the route taken between the two words. This routine checks all the words in the input for connections to each other.

6P2 second 6p algorithm experimental
This is an experimental routine and produces no output. Results are displayed on the green screen. This algorithm needs a lot of monitoring to see if the idea is any good and worth using as an output.
Similar to six p but used a different method of getting to linked words. Maps data like cd's laid out on floor with each cd representing an entry in the Brain the route is north east west south and words used are those it passes through

BA Best Answer
The Choose Answer routine makes the decision about which output to use. It does this by comparing the reply qualities and previous answers. Aiming to find an output that hasn't been used in the last 9 outputs and with the highest reply quality.

CR Create Reply or Keyword
Look at Keywords for details on the functions

GIT Gap In Time
The amount of time the program takes to process an input is monitored, if there has been a long gap. The operation field in cell 929 is the amount of time in seconds to Waite before triggering the GIT response which is in field 8

HTML web page created
If create html is ticked in settings then a web page is created using the information in cell 832. Look in system cell details for more

IN input from input box
The input from the input box

MSG message
Indicates an incoming message from another program or from the network

OF Output Filter
Performs various filters on the output.
There are 2 main functions used by the filter these are function 2 (FN2) and function 4 (FN4) functions 1&3 are either in experimental mode or have been superceded by another function.
FN2 and FN4 use the SC code of the outputted sentence to re organize the words in the sentence.
FN2 uses a logic algorithm to processes the output
FN4 uses the structure of SC's already in the BD. SC's in the BD are added when SC learning is on or by the keyword SCFromText. SC codes are created from inputs so it is assumed that these inputs are structurally correct as they usually come from a person. The function compares the SC created from the output with found SC's in the BD. A percentage value is created which reflects the accuracy of the output. The threshold value is set by the Order field in cell 1605, if the percentage value is lower then FN2 output is used instead. If the Order value in cell 1605 is 0 then it is assumed that the cell is not set up so the threshold value is set to 50%

OU output sent to output buffer
Outputs sent to the output buffer

OUT Output
Main output from the Ai

Pass number of processes or algorithms used to process the input
The pass number is incremented as it passes through various routines, it gives an idea of how much processing various inputs use.

PLY play mp3 music
Indicates the playing of a mp3 audio file

REP Reprocess Input
If no output is found then sometimes the input is reprocessed

TF Translation File
the name of one of the data bases used by Ai versions prior to the rebuild version AiV016a

Pre set words
Pre set words are words embedded in the program,
exitai
shuts down the Ai program
restartai
shuts down the Ai program and runs the StartAi.exe program
inputkeyword
pops up a messagebox with the words after input keyword in it

Search
The search routine is designed to do different jobs depending and the algorithm that is using it.
RAS uses the routine most so it is advisable to have the number of files searched limited to an acceptable amount depending on how fast the response is required.
The file in cell 819 field 11 is the file name of the file that holds the file names of the files to search each time by the RAS routine.
If you want to have a large number of files searched and don't want the RAS routine to search all files each translation then it is best to use a different search file. If you use the keyword searchinfofile for a pattern then the file in 9 is the file holding the file names that will searched. This allows for different search criteria depending on what has been activated from the translation. You could have a search file full of say html file names that is used when the pattern for say 'search html for fish' is entered into the input.

DLF DownLoad File
Used by the Keywords DownLoadFile and DownLoadFileWait, also used by the separate download file program. Used to download files from the internet.
DLF error codes
error 1, unable to read file: dlf_info.txt
error 2, no local filename
error 3, no online filename
error 4, problem downloading file
error 5, problem creating file

PTL Print To Log
Writes to the log

ISF Image Scan Function

LD Light Dark
value set by ISF

TRD Thread