Brain Keywords

Spud Ai

Keywords The Keyword field is used to associate a Keyword to a Cell Word. When the Cell Word is found in the input then the Keyword function is triggered.
To stop a cell word being used in the output then set the Type field to 40.
If a cell with a keyword is activated then the keyword is only used if there is a keyword tag in the tags field.
If there is more than one keyword in the input then the fist keyword is the one used.
If the keyword call comes from a cell activation using the tag <keyword-if >then the keyword of the cell will be used even if the keyword variable is already set.
The phrase UNDER DEVELOPMENT next to a keyword means the function may not work as expected or the way it works may change. It could also mean the function is out of date and other functions have superceded it.

AiWindowHide hides the Ai so its only visible as a process.
AiWindowShow restores the Ai window NOTE if you have no communication with the hidden Ai then you wont be able to access it. The only way to close it is to end the process in Task Manager.
Alarm field 7 = alarm time, format: HH:MM
The cell is activated if the time is found. Cell 940 in cell fields hold the cell numbers of cells with an Alarm Keyword only 9 alarms can be set. This is done like this to cut down on processor usage. Cell 940 is updated when the SaveBrain process is activated or when update is pressed.
AlarmSet This keyword like alarm is activated if the time is the same as the value in field 7. Field 7 is set from information in the input. If in the input there is a word with the keyword AlarmSet then the two numbers in the input are used to set the alarm. The first number is used to set the hour and the second sets the minutes, the two numbers are then used to set the alarm time in field 7. The words after the numbers are assumed to be the message and these words are inserted into the words-ifa tag which is then put into the tags field followed by the contents of field 11. When the alarm time in field 7 is met then the cell is activated. If there are no numbers in the input then field 7 and the tags field are cleared.
E.g. if the input is:
alarmset 14 42 alarm time
then the fields are set thus, note the keyword and field 11 aren't altered
field 11 <sayprint>
keyword AlarmSet
tags <words-ifa:alarm time><sayprint>
field 7 14:42
AllowRepeat allows an answer to be repeated, works the same as f3 TF = 25, this gives another way of repeating the output.
AlwaysAnswerOff turns off Auto Ai on bad RQ.
AlwaysAnswerOn activates Auto Ai on bad RQ default is off.
AOutNNEOff turns off Brain to analog outs.
AOutNNEOn the input code of cell 1603 and 1604 is used to control the analog output value a1 and a2 on the k8055 card.
AutoIt autoit.exe must be in the path and .aut associated to it, then field 8 is the autoit script to run, field 7 is the reply if script is found. This performs a system command on field 8 and looks in the scripts folder for the AutoIt script to run.
AutoLearn this keyword uses the DownloadFile and ExtractWords processes when a bad word is found. The file ALFile.txtx is created from the download and extract process. See System Cells cell 931 for more details on how this works.
The Order field is a secondary control if Order = 1 the contents of the ToPrint variable is used if it holds something this overrides other things.
Here are settings for Wikipedia.

field contents
tags <keyword-ifa>
mode 4
operation 10
keyword AutoLearn
field 8

Beep file field is the frequency field 10 is the duration, processing stops whilst the sound is produced.
counts the number of bright spots on the image sends the answer to output, start of the find brightest area in a room when viewing with a web cam.
BrightSpotCompair compares the number of brightspot's with the number generated by a BrighSpot keyword if there are more bright spots then field 10 is put
into the input if there are less brightspot's then field 11 is put into the input.
The input code of the cell is changed to the results of the function
000001111 means there are exactly the same number of bright spots
000000011 means there are less bright spots
000001100 means there are more
BulkWrite writes cell data to a text file. Like pressing the TO TEXT button but this keyword bulk writes the data from cell number in field 7 to the cell number in field 10. The file field holds the name of the file to write to. A new file is created and the data added to it but if the filename is NewBrainData.txt which is the file used by the TO TEXT button then the cell data is added to the file without creating a new file.
ChangeGetStartPath converts <getstartpath> found in the BD to the proper address.
ChangeToGetStartPath converts address in the BD to <getstartpath> only address that contain the start path will be converted.
CheckFix activates the CheckAndFix routine that normally runs when the Ai builds a BD when no existing BD is present in the data folder. If run as a keyword only system cells not set will be updated. The cells updated are:
809 f9 to o-o
810 set to spud ai web site
815 set f7,f8,f10,f11
818 f8,f10
819 STF
822 RQ defaults
841 SJ Subject
860 Emotion
861 SJN Subject New
910 SEN
920 6p
922 LM
923 LM
924 NNE exclude
931 LM web add
932 LM RAS
2001 set to "is" for QI
2002 set to "what" for QI
2003 set to "indexfiles"
2004 UpdateBrain Keyword
indexfiles is activated to give RAS and PAR something to work with
CleanNode resets a in cell field to 0. Sometimes words start to appear that aren't wanted this is sometimes caused by repeat references to words CleanNode is a way of removing these words by removing the connections to them.
CleanTrainFiles this removes unused training files. Cells with <f: in the emotion field are assumed to be used so are left out, also cells with three or more lines of training data and files lower than 2001 are left out of the filtering process. Other files are deleted. Every time a new word is added to the BD then a new training file is created these can build up to large numbers and if unused aren't needed. a new file will be created if the cell is trained for any reason.
ClearAllDigital clears all digital channels.
ClearDigital1To4 this clears digital channels 1 to 4 at the end of the processing cycle this enables faster switching. If ClearDigital1To4 is in Keyword field of the word that turns the channel on then it will stay on for a shorter time.
ClearDigital5to7 clears digital channels 5 to 7.
ClearDigital1to4Immediatley clears channels immediately as soon as this key word is found.
ClearDigital5to7Immediatley clears channels immediately as soon as this key word is found.
ClearInputs clears all input buffers including all PutInInput variables.
ClearPutInInput clears PutInInput variables.
ClearTagOnce clears the tag once variable.
ClearToPrint clears the ToPrint variable which is used to hold the output.
CloseWindow close the window name in field 9.
ConnectToInternet uses the InternetAttemptConnect command in wininet.dll.
The File field is the source file, field 10 is the output file. This works in the same way as cell 831 but uses the information in the cell instead of cell 831. The tags are placed in the source file and are acted upon when read by the program.
<aioutput> this tag is changed for the output from the Ai
<cell=1234> activates the brain cell number following cell= the tag is replaced with the output from the cell.
<file=filename> where filename is the full path of the file to insert, usually a text or html file. The tag is replaced with the contents of the file if it exists.
These tags can be inserted in other text which isn't changed. Best practice is to use only one tag in a line.
DateTimeToFile writes the date and time to the file name in file field.'
DebugMini sends the scroll output to the debugger only.
DebugOff turns off outputs to debugger.
DebugOn turns on outputs to debugger you need to have a debugger program running. Information sent to the debug program is more detailed and includes many messages that don't appear any ware else.
DInActivateOff de-activates cell 1176 activation on digital in.
DInActivateOn activates cells 1155 or 1154 or 1176 when K8055 digital channels 1,2,3,4 or 5 are activated. Input code of 1176 is altered according to the digital ins rightmost node = d5.
DisconnectFromInternet disconnects internet connection.
DoesConnectionExist does internet connection exist if yes field 10 if no field 11 if Operation or Type fields are 68 then the output is put into the input.
DoesWindowExist if the window name in file field exists then field 10 is used for the output, if not then field 11 is used. If Operation or Type field is set to 68 then the output is sent to the input.
DOutNNEOn allows the input nodes 1 to 8 of cell 1504 to activate digital outputs 1 to 8.
DOutNNEOff turns off Brain to digital outs.
DTLearn uses a keyword to trigger the DT learning routine. The keyword is removed from the input then the input is put into the output box and the DT learning routine is activated. The Ai continues to process the input after the DT learning routine has finished. This is used so you can update using DT from the input box rather than typing directly into the output box useful when training the Ai remotely through a web page or other input. If there is an entry if field 7 then this is removed from the input as apposed to Cell Word, this is useful when activating using say a pattern code.
If "is the sentence code for" was in the previous output then field 8 of the sentence code or pattern is changed instead.
DumpSTM writes the short term memory to the file DumpSTM.txt found in the Ai directory.
Encript this changes the contents of the ToPrint output variable using the encripter function. Normal text will be encripted, encripted text will be decripted. Field 7 is the key. The function checks its output, if there is a problem then it attempts up to 5 times to encript if it fails then the scrole output will say error.
EventActivate activates the cell if an event occurs.
ExpectedInInput this tells the Ai to look for the words in field 8 or file field in the next input.
ExportBrainToCSV exports the BD to a spreadsheet. Entries 2000 upward are exported.
ExtractWords extracts the words and numbers from a document holding tags or scripts like a web page. It works as a simple parser for web pages so the document can be used as source material by the Ai. A lot of web pages these days are made up of scripts and objects that source data directly from databases, these type of pages have very little real text so the process sometimes produces a blank page. Words are extracted from the file name in the file field. The new file is the same name but with x added to the extension.
If the Operation field is set higher than 0 then the extracted file is scanned and the number of lines down as specified by the Operation field is sent to the output. ExtractWords also sets up the variable used by the KnownWordsTwo keyword.
F7ActivateF10Millisec activates the cell number in field 7 in field 10 milliseconds. This function uses its own timer.
F8ActivateF10Millisec activates the cell number in field 8 in field 10 milliseconds. This function uses its own timer.
F8ToInputF10Millisec starts the timer to the value in field 10, in millisecond then puts contents of field 8 into input when the timer is up.
Face goes directly to face drawing routine using the cell number that activated the keyword. The output code is used to move the eyes and mouth. Each node operates an element of the face.
As your looking at the face the eyes pupil are moved to the position using the output code in the following way
node 1 pupils to bottom right
node 2 bottom middle
node 3 bottom left
node 4 middle right
node 5 middle middle looking straight at you
node 6 middle left
node 7 top right
node 8 top middle
node 9 top left
the mouth is made up of 4 elements which are either up or down
node 1 left top line left 0=down 1=up
node 2 left top line right 0=down 1=up
node 3 right top line left 0=down 1=up only if left top line right is in same place, stops the mouth looking weard
node 4 right top line right 0=down 1=up
node 5 left bottom line left 0=up 1=down
node 6 left bottom line right 0=up 1=down follows node 7
node 7 right bottom line left 0=up 1=down follows node 6
node 8 right bottom line right 0=up 1=down
The expressions and the associated code might be used as the emotion variable which is a new idea to give more information on words.
FaceOn turns on face drawing in image window.
FaceOff turns off face drawing.
FastScript turns off the main Ai timer and reads the script file name in file field into the Ai if file field is empty then the file name in field 8 is used. It is assumed that the script is in the scripts folder this is for compatibility with older Ai databases. Normal processing continues after the script has been read. If timer: followed by a number is in the script then the value is the time between each read of the line the default setting is 500ms.
FileConnections this uses the CON process this scans files for sentences with the best match to connections with the input. The File field is an index file, this file contains file names which are opened and read. The lines of text are then scanned against the words in the Connection variable and if a match is found then the count is increased. The sentence with the highest count is used for the output.
copies the file in the file field to the folder in field 11, a new filename is created using the number in field 7 which is incremented after the file has been created. If field 11 is empty then the file is copied to the Ai folder. If the file already exist then it is over written. The file extension remains the same.
FileDownload The external program dlf.exe is used to download the file from the server name in field 10 to the file in the file field. Using downloadfile allows the Ai to continue processing if you want processing to stop whilst the download is happening then use the keyword DownLoadFileWait. The file dlf_output.txt holds the results of the download.
FileDownloadWait Field 10 is the full web address of the file to down load. If mode = 1 then the contents of the ToPrint variable are added to the address in field 10. The program waits for the download to finnish before continuing processing. Field 7 is the cell to activate when the download completes. dlf_output.txt is deleted before the download starts. The process causes the Ai to freeze during the download which is useful if the AI then acts on the downloaded file but if you want the AI to continue processing use the FileDownload instead. This keyword uses the external program dlf.exe to download the file.
FileExist checks to see if the filename in the File field exits, if yes then the contents of field 7 is used, if the file doesn't exist then field 8 is used. If Mode = 1 then the output is sent to the Ai output otherwise the output is put into the input.
FileGetSort down loads the file in field 10 to the file name in File field then runs the FileSort process and then copies the resulting file back to the file in the File field. Field 11 is used for extra commands CheckWords and ExcludeWords
CheckWords only uses words that are in the BD
ExcludeWords exclude words in Field 7.
FileIndex sets up a search file that can be used by FileIndexSearch or as a play list. The filename in field 10 is created, this contains the filenames of the files in the folder. File field holds the folder to start the search, with the wildcard *.* instead of a filename eg. C:\temp\Ai\*.*
Field 11 holds the type of files to include eg. doc DOC txt TXT etc.
FileIndexAppend like FileIndex, but instead of creating a new file it adds indexes files to the existing filenames file in field 10. File field is the folder to start searching for files, field 11 is the file types to include.
FileIndexSearch The File field contains the filename of the Index file. An Index file is a file containing a list of file names which are searched. The contents of the ToPrint variable is searched for in the indexed files.
FileRead this process apples some filtering functions before reading the file to the input or output.
Mode 1 = read to output.
Mode 0 = read to input.
Field 7 is the line in the file to start reading from if empty or 0 then nothing will happen.
if CheckWords is in field 11 then the words in the file are checked for in the BD. Words not found in the BD are rejected from the output.
Field 10 is the cell to activate after the file has been read the TimerLength variable is altered to give enough time for the readout script to finnish before the next line is read. The length of the output is multiplied by 70 to give the timerlength in milliseconds. TimerLength is returned to its original value once file read completes.
FileReadLine reads lines in a file sequentially until the end of the file. field 7 is incremented. Field 7 is set to one and the output set to field 8 if it reads past the end of the file. Each line is read every time the keyword is found. If Mode = 1 then it is assumed that the text is a number and the associated cell number is activated, the cell will only activate if the number is higher than 1 and no larger than the last entry in the BD.
FileSafe this function reads and adjusts a file making it safe to read by other processes. This checks line lengths which can overload variables. There is still a limit in line length this is 1000000 characters if more than this then a GPF will be caused. The text is converted to lower case and full stops comers and semi colons are removed.
FilesSafe this uses the index file in the file field to make safe multiple files. The index file contains the file names to make safe. This uses the FileConnections function so the Connection variables are also set.
FileScanForNew Field 11 is the extension to look for eg. .txt. The file field is the filename to search for eg. C:\temp\ftp\*.*
FileScanForNewJPG looks in a folder to see whether an new .jpg (picture file) has been added, if it has it is copied to the image folder and called newimage.jpg all the jpg pictures in the folder are then deleted so the next image that appears will be the correct one to copy when monitoring a picture folder that is receiving images from say a motion detecting web cam. The file name in file field needs to have *.* at the end eg. C:\temp\ftp\*.*
If there is a new file then field 8 is put in the input if not then field 10 is put in the input.
FileSearch searches for the word in field 10, if field 10 is empty then the cell word is used.
File = filename of file to search the last found entry is used for the output.
Type = 68 then the output is sent to the input.
Mode = 1 then the output is used for the search. The output is changed to the result if found. If multiple outputs are found then they are also added to the output up to a maximum length of 200 characters.
Field 7 = words to exclude from the output, used to filter out things like web code or trigger words.
FileSearchF7 the word in field 7 is searched for in the filename in the file field.
FileSort uses the FileSafe function before sorting the file. Using FileSort is another way of extracting information from say a web page. This is normally done using AutoLearn but this keyword uses a simple parser to process web pages, the parser is not capable of extracting text from complicated pages. Using FileSort extracts the known words from the file without parsing the file. The file in the file field is sorted into another file with the same name but with an x added to the filename extension. Words in the read file are joined together so new lines of text are of a similar length.
If CheckWords is in field 11 then the words are checked for in the BD and only know words are written to the file.
If ExcludeWords is in field 11 then words in field 7 are excluded from the output. This is useful if random bits of web code get through the filtering process.
FileWrite puts the contents of field 8 into the file in the file field.
FileWriteInput writes the input and the contents of field 10 to the file in the file field. Mode controls the file writing process.
Mode = 0 append text to the file.
Mode = 1 create a new file with the text.
FileWriteOutput writes the contents of the ToPrint variable and field 10 to the file in the file field. Mode controls the file writing process.
Mode = 0 append text to the file.
Mode = 1 create a new file with the text.
If there is a colon in the filename then it assumed it is a full path filename if there is no colon then it is assumed to be a filename only and the file is in the main ai folder.
FindDouble this finds double entries created by the evolution bug the file name in the ai folder called FDFile.txt holds the words with double entries in the BD.
FolderIndex scans the folder and sub folders starting at the folder in file field and writes the folder names to text file 'DirNames.txt' which can be found in the data folder, use wildcard *.* at the end of name. E.g. c:\temp\*.* This means all files in the folder are read and directories are picked out and added to the list without the *.* the keyword wont work properly.
FolderSearch sets up a search file that can be used by FileIndexSearch. The file searchtemp.txt is created in the data folder, this contains the filenames of the files in the folder. Field 10 holds the type of files to include. File Field holds the folder to search *.* is required if all files in folder are to be included eg. c:\temp\*.* will search all files in temp any files with an extension present in field 10 will have there name added to the searchtemp.txt file. The extensions are case sensitive so if you are looking for say zip files make sure you include ZIP in field 10 as well. If nothing is in field 10 then all filenames and folder names are added to the list.
FTP File Transfer Protocol. Field 7 is the password, Field 8 is the user id and field 10 is the ftp address.
HostToIP field 10 is the host name to find the IP number of, field 8 is the IP number found. This function uses some of the UDP processes so Enable UDP needs to be ticked in settings. To Enable HostToIP but disable UDP un-tick RX and TX.
If8Or9Do10Or11 if the word in field 8 is in the next input do field 10. If the word in field 9 is in the next input do field 11. Sometimes referred to as expected in input two. Field 4 can be used to control where the output goes if field 4 = 68 then field 10 or field 11 is sent to input, if field 4 = 69 field 10 or field 11 is sent to the output.
ImageCompair scans the display and compares the collected data with the data from a previous ImageScan.
ImageCompairZone similar to imagecompair but isolates the zone of most change and sends the name of the zone to the input. At present there are 3 zones
zone0 = little or no change error count < 10, zone2 left half of image zone3 right half of image. The code for 5 zones is embedded in the program but in order to make it work with the USB K8055 card moving a web cam the zone routine has been desensitized!
If this keyword is invoked from a cell activation then the timer may need to be stopped first. The timer can interrupt processes and cause things to go weard. If the keyword is invoked from an inputted word then the timer is automatically stopped before the input is processed.
ImageInstructions this keyword is used to create instructions from an image. Its used by the robot to draw an image. The process uses information created from ImageScanFunctions.
field 11 is the ISF functions to use note they need to have also been used by the ImageScanFunctions keyword to work.
Mode = left start position
Operation = top starting position
Order = number of pixels down
Type = number of pixels along
File = filename of the created text file which consists of instructions that can be read by say the ReadLine keyword.
Field 7 = draw a dot instruction
Field 8 = leave blank
Field 10 = end of column
detail field = step number, due to the lack of fields the detail field is used. The step number moves the read pointer along by the value, in effect it reduces the number of pixels read and thus the number of instructions, a bit like zoom.
ImageLoad this keyword loads an image into the DX Window. Direct X (DX) is a way for programs to use the resources of the graphics card. The Ai uses the DX window to process images doing it this way speeds up processing time. The keywords ImageLoadScan and ImageScanVertical use the DX functions if the DX window is open if not then they use the normal image window. The robot uses ImageLoadScan and ImageScanVertical using the DX window reduces image processing time on my machine from 4 seconds to under a second.
ImageLoadScan file field is the filename of the image to load if empty then the existing image is used. The image is scanned and loads the image variable which can then be used by other functions like ImageScanFunctions. If the DX window is open then DX functions are used to scan the image, if closed then the scanning process is done in a separate thread which scans the normal image window. Using the DX window is much faster.
Normally the image is displayed in the image window and the DX window the Mode field changes the way the image is displayed.
Mode = 1 load image into DX window only.
ImageScan scans the display and retains information on the image.
ImageScanFunctions this is a collection of image processing functions. They use the DX window which needs to be ticked in settings to work.
The Operation field is the intersection value, this is the maximum number of times the intersection can happen before an intersection is counted this effects the input code.
Order field is the sensitivity control for the function.
The Type field is the intersection line, the point in the image that the intersection occurs.
Field 11 is used by auto calibrate, if there is a number here then this is used as the auto calibrate count, if empty then the count is set to 100. This only applies to the keyword ImageScanFunctionsCalibrate
The Mode field is used to control which function to use:
mode = 0 color swopper, field 7 represents the red color, field 8 the green and field 10 blue. The name of the color in the field will be used instead of its normal colors eg if field 8 says "red" then the green element of the image will be changed to the red value. If clear is in one of the fields then that color element is removed from the image. This function affects the main image variable.
mode = 1 all the colors of the pixel are set to the average, makes the image black and white.
mode = 2 any pixel with any red in it is set to red.
mode = 3 any pixel with any green in it is set to green if operation is set to 1 then any color with no green is set to white.
mode = 4 any pixel with any blue in it is set to blue.
mode = 5 if red is higher than the average of all 3 colors plus the value in the order field then highlight the red.
mode = 6 if green is higher than the average of all 3 colors plus the value in the order field then highlight the green.
mode = 7 if blue is higher than the average of all 3 colors plus the value in the order field then highlight the blue.
mode = 11 sets a light dark split point. The number in field 11 is the split point this is a number between 1 and 255.
Pixels are split into there red green blue parts then averaged, if the average of the colors is higher than the split point then the colors are increased by the value in the order field. If the average is lower than the split point then the colors are decreased by the value in the order field. This is used to increase the image definition or contrast which means other ISF functions work better. The change affects the main image variable.
mode = 12 this function reduces the number of colors in the image. The order field controls the level of effect. The main image variable is altered. This function is useful to decrease the resolution before using another function helps remove scatter, another way of putting it is it alters the contrast!
mode = 13 compares the image with the previous image and highlights the changes, sensitivity is controlled by order where 1 is very sensitive. Operation is the clumping threshold, this highlights clumps of pixel movement the red box is drawn round the pixels that pass the threashold.This function is being designed to highlight objects moving in the field of view where the camera is static.
mode = 14 same as mode 13 but shows the speckle, this is pixels that have changed but not reached the threshold
mode = 18 this uses the gray scale to make decisions the input codes of cells 1607 1608 1609 are used to control which area of the gray scale to highlight with 0 meaning don't highlight and 1 meaning do. The grayscale is 255 divided by 27 with each bit representing 9 degrees of grayscale. The color of the pixel is changed from red to blue as the pixel gets brighter.
mode = 19 using the gray scale this function looks for edges of objects similar to scan vertical but done in a different way. The input code of cell 1610 controls the density, the first 4 bits control the vertical density and the last four control the horizontal density. The order field of the cell that activated the function controls the sensitivity.
mode = 20 using the RGB code in field 7 this highlights the pixels matching the rgb information
e.g. field 7 = rgb:170,0,0 this will highlight pixels that have red at 170 green at 0 and blue at 0 the number in the order field is added to increase the range so if order is at 7 then red pixels whose red is between 170 and 177 will be highlighted.
mode = 21 using the RGB code in field 7 this highlights the pixels matching the rgb information similar to mode 21 but this works on the average of the pixels colors and is set to highlight if any of the conditions are set, as apposed to all three needing to be set before highlighting.
mode = 22 using the rgb code in field 7 the red green and blue are increased by the amount in the order field. If the rgb codes are all the same then the overall brightness of the image is increased. The effect is written to the main image variable so repeat activations of the function will increase the brightness by degrees as set by the value of the order field.
mode = 23 same as mode 22 but in reverse so pixels colors are reduced by the amount in the order field.
Note a color may be highlighted but not necessarily with the actual color.
mode = 24 using the rgb value in field 7 this function takes the proportions of red green and blue and highlights pixels matching the proportions. This is an attempt to compensate for different brightness.
mode = 25 this function allows a number of functions to be used simultaneously. The numbers in field 11 are the functions to use. Other settings taken from the order, type and operation fields are used for each function.
A code is generated from the function. If the function has registered something in the image then this is compared to the previous 10000 codes generated, if a match is found then cell 1611 is activated. The input code of cell 1611 is changed to the number of times the code has been found in memory.
The output code is made up in the following way:
ISF code: isf5m32o2w12759

isf 32o 5m 2w 12759
id mode order CBStop unique number generated using some math

id is the identifier telling anything using the code that its an isf code
mode the number of the function that generated the code
order the sensitivity or order value
CBStop this is a code generated by the outline process 1=no where to else to go 2=coordinates are the same as the start so the outline is complete. 3=width value has moved out of range. 4=height value is out of range. 5=outline draw process maxed out at 6000 6=outline process bypassed.
The code created is put in the SwopVar variable, use the tag <toprint=swopvar> to use the code. The input code is created from the red lines that appear in the image when objects have been detected highlighted and also pass the threshold value set by the Operation field. The yellow lines are created when an object has passed the intersection line that is set by the Type field. To use the input code use another cell with the tag <i=cell:n> where n is the cell number of the cell with ImageScanFunctions keyword. You can then use the information to do other things like controlling robots.
ImageScanVertical The process scans the image variable for vertical lines after it has been set up by ImageLoadScan. This is used by the robot to locate objects that have sharp edges. What information is displayed and returned is controlled and held in cell 936.
ImageScanVerticalCalibrate calibrates the image.
ImportFromCSV WARNING this will replace the entries in the BD. Entries 2000 upward are replaced.
InputFilter activates the input filter function.
IPAutoRXOff turns off auto IP if settings is opened then the original value is set.
IPAutoRXOn turns on auto RX IP. If settings is opened then the original value is set.
IPRXAuto closes down UDP and restarts it setting auto IP RX in settings, finds local IP number.
IPRXFromFile reads file field and uses the found IP number for sending to then restarts UDP routine. If there is a word in field 10 then the HtmlExtractor routine is used. The IP number is assumed to be after the keyword until < is found. This tells the routine that a html tag has been found. HtmlExtractor is used when getting the IP number from an online source i use or
these create a web page that can be used when downloaded using download file.
IPRXToFile writes IP number of local machine to file in file field.
IPTXFromFile same as IPRXFromFile but changes the TX IP number.
KnownWords extracts words from the file in file field and creates a results file with the same name and extension except with an x on the end of the filename extension. The words are not in the same order as the words from the original file. This routine is useful if still getting gobbledygook words after the ExtractWords process.
KnownWordsTwo extracts the known words from the data created by ExtractWords and writes the results to the file: KWNFile.txt in the main Ai folder. The first 200 extracted words are sent to the output. To exclude words that are known but not wanted in the output, set the words Mode field to 1.
Only words in the highest defrag area of the BD are used.
LastCellNumber sets the variable NNELastEntry to the number of the last entry in the BD. This is normally done automatically but could be useful if adding data using cell activations.
LookInLog look in today's log for the word/s, 40 must be in field 11 and a pattern must be used to trigger the search.
LowPower turns of WSB and SE processing so saving on system resources.
MapCreate clears existing data and rebuilds the map database UNDER DEVELOPMENT.
MapPlace field 7 is the direction the robot is facing. This is a number between 1 and 60 like a clock. This works out what the robot can see from information from the map. Map data is held in the LocationFile.dat UNDER DEVELOPMENT.
MapShow shows the map in the image window UNDER DEVELOPMENT.
MessageBox field 8 are the words in the message box, field 11 is the caption.
MessageBoxYesNo field 8 are the words in the message box, field 11 is the caption UNDER DEVELOPMENT.
NameFound activates the name process UNDER DEVELOPMENT.
NewSum resets maths variable to 0 same as the cancel button on a calculator see also ShowSum.
NextSong moves to the next track on the play list.
NNA1In reads the USB analogue 1 input, converts it to a NN code (9 bit binary) and sets the NN input code.
NNA2In reads the USB analogue 1 input, converts it to a NN code (9 bit binary) and sets the NN input code.
NNActivateCell activates the Brain cell number in field 11.
NNChangeCellInput change the input code of the cell in file field to the input code of the cell in field 10.
NNChangetoCodeIn7 changes the input code to the code in field 7.
NNEEventOff turns off Brain cell 1601 activation on Brain event.
NNEEventOn turns on activation of cell 1601 when a Brain event change is noticed to a cells input.
The file NNECCNewFile.txt is created in the program folder. This file records the nne entries that have changed.
To stop a cell's change being recognized as an event use the tag <eventno> in the cell, to exclude it from the event scan.
If the Tag <eventactivate> is in a cell that records an event then the cell is activated.
System cells 1000 to 2000 are scanned for changes.
NNEInToBase10 converts the Input code of the cell number in Field 11 to a base 10 number. Sets the ToPrint variable with the output.
NNEOutToBase10 converts the Output code of the cell number in Field 11 to a base 10 number. Sets the ToPrint variable with the output.
NNEOnLoopOff turns off activation of cell 1507 on timer loop.
NNEOnLoopOn turns on cell 1507 activation on timer loop.
NNEOnTimerOff turns off activation of cell 1505 on timer.
NNEOnTimerOn turns on cell 1505 activation on timer.
NNEOnUDPOff turns off activation of cell 1506 on new udp or window message.
NNEOnUDPOn turns on cell 1506 activation on new udp or window message.
NNEScanImage Brain cell 921 holds information for this keyword look at system cells cell 921 for more information.
NNESetInputs sets the Brain inputs, changes the input code to that of field 7 does entries from number in file field to number in field 10.
NNTrain trains the NN using the training file in the file field.
NNTrainInputF7 this uses the input code and the contents of field 7 for the training data which is added to the cells training data.. The code in field 7 is the output code.
If the Order field = 1 then the cells neural network is trained after the data has been written to the training data file.
NNWeightsSave saves the NN weights to filename in the file field.
NNWeightsLoad loads the weights into NN filename in file field.
NNWorkMatrix activates the matrix file in the file field.
OutputToClipboardOff turns off the output to the clipboard.
OutputToClipboardOn turns on sending output to clipboard.
PauseSong flip flop function, pauses the song that's playing or starts the song playing if its been paused.
PlayPlaylist the file field holds file name of the file that holds the file names that are played by the mp3 sound routine. The Play list number in settings is the position in the file to start reading the names from the play list will play constantly till the end of the list unless stopped. Play lists can be created using indexfiles. The default play list is called TempPlaylist.txt and can be found in the Data folder.
PlaySong plays the song in the file field full path recognized types .mp3, .wav, .kar, .mid.
PlayWAVSound plays the WAV file in the file field, the wav file must be in the 'sounds' folder, mostly used for system sounds.
PutInInput puts the contents of field 8 into the Ai input, Operation must be 0
Put7InInput this is a field 11 keyword it puts the contents of field 7 into the input. UNDER DEVELOPMENT.
Put8InInput this is a field 11 keyword it puts the contents of field 8 into the input. UNDER DEVELOPMENT.
Put9InInput puts the contents of the file field into the input.
R2D2Off turns off r2d2 vocalization.
R2D2On turns on r2d2 vocalization makes a noise a bit like r2d2 from star wars.
RestartUDP restarts UDP
ScanDownload file field is file name of file to search for word/s in field 8.
ScanImageFull image scanning and analysis routine. An attempt to get more information from an image, work out what the image is and what objects in the image are.
SCFromText reads a text file containing correctly structure sentences, these sentences are converted into sentence codes (SC) and if not already present added to the BD. If a word in the sentence is not present or the type value for the word isn't set then the sentence is rejected. This is a fast way of adding SC's which are used by the Output Filter function 4.
Scroll sends the contents of ToPrint variable to the scroll output screen. This is normally used from a cell activation using the keyword <keyword-ifn> where n is the function eg: <keyword-ifa> note repeat outputs to the scroll process are ignored.
ScrolOutput turns on the scrole output to the USB K8055 card.
SendMessageToWindow sends field 8 to the window name in the file field. To get the Ai to receive messages it need extra code on the end o-i
pw:=password and the end of message marker, 1234=Ai password o-i=where to put the message
If the tag <toprint> is in field 8 then the contents of the ToPrint variable is used if the tag <swopvar> is in field 8 then the contents of the SwopVar variable is used.
If using the character AiChar.exe program add pw: to the end of the message in field 8.
example to send a message to AiChar.exe

field contents
file AiChar
keyword sendmessagetowindow
field 8 this is a message pw:

Cell 918 is the default settings used when send message to window is ticked in settings
If for some totally inexplicable reason this keyword fails to work try MessageToWindow this peculiar bug was spotted on an XP machine running a robot.
sends an order to the window name field 10 is the window to send to field 8 is the order at the moment the only order is close which closes the window.
SendToBrowser sends commands to the browser program, sends contents of field 10 to URL bar.
<refresh> sends the instruction to refresh the page. some mode switches can also be used used.
If mode = 0 just send field 10 to browser.
If mode = 1 send field 10 add the output.
If mode = 2 send field 10 add the input.
SendToIP changes the send to IP number in settings to the number in field 10 and then resets UDP.
SendToTray send the Ai program to the system tray.
SetFocus sets the Ai as focus and brings the Ai window to top using the script SetFocus.aut.
SetFontsColours see cell 816 for details.
SetRQWeights used to set the RQ's. The numbers in field 11 sets the RQ's in order, look in settings for more.
ShowBadWords bad words from input are sent to the output.
ShowSongName outputs the name of the song currently playing.
ShowSongNameFull outputs the full path filename of the song currently playing.
ShowStatsOff turns of statistics display in Image window.
ShowStatsOn turns on statistics display in Image window.
ShowSubject sends the subject description to the output.
ShowSum show the maths result cell 818 field 8 is put in front of the answer.
ShowVersion sends the ai version to the output.
SixPClean resets in cell fields 5 and 6 to 0. These are the fields that 6p learning sets up.
SixPLearnOff turns off 6P learning each timer loop.
SixPLearnOn turns on 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.
SoundToOff turns off sound to light.
SoundToOn turn on sound to light, uses the analogue input from the k8055 card then sends signals to DMX channels 1 to 3, this causes the Ai to run at about 50% processing power. inputting something into the Ai stops the process.
SRFOff turns off SR filter.
SRFOn turns on SR filter.
StartTimer starts the main timer.
StopDownload stops file download.
StopSong stops a song started with the PlaySong or PlayPlaylist keyword.
StopSongAtNext stops at the end of the track playing.
StopTimer stops main program timer.
STTags sets the ToPrint variable to the results of the STTags filter which translates the contents of field 11. The ST codes need to be set. If the tag is in the code then the tag is replaced with the associated word.
STTags-Activate same as STTags but the cell is then activated.
SuffixCopy this creates a file called SFCFile.txt this file holds the words that have a ST code in there emotion field. If mode = 1 then all found codes are added to the file. If mode = 0 then only words with codes added manually are added.
SuffixFind looks for suffix on the end of words then if found adds the associated ST code to the emotion code.
System file field is the program to run, field 10 is the extra command to send to the program being run.
TimeInputCode this converts time elements from the computers clock into the cells input code. Mode field controls which element to use.
Mode = 0 convert hours to input code.
Mode = 1 convert minutes to input code.
Mode = 2 convert seconds into input code.
UDPF8F9Send sends via UDP field 8 using the code in the file field as opposed to using entry 809 BD which is the default UDP entry.
This is also used when sending remote BC activation, eg. field 8 = in:000001111 ac:2376 f9=pw:1234do:o-o
where 1234 is the password of the remote ai and o-o tells the receiving Ai what to do with the information. The IP number and en: is added to the end of he packet by the program . The receiving Ai also looks for the keywords ac: and in:, ac:=activate cell, in:=input code. If there is no input code then the cells input code is used.
UDPF8F9SendForce if f8 is empty then the output is used
UDPRestart restarts the UDP connection.
UpdateSettings reloads the settings file.
UpDateBrain updates the Brain from a text file. The file in the file field is used, if empty then the file used is NewBrainData.txt in the data folder. The button New Data adds the cells data to the NewBrainData.txt this is used for moving data from one Ai to another.
USBOff turns off USB K8055 card.
USBOn turns on USB.
USBStopDInF10ms turns off digital after F10 milliseconds.
UWSave this saves cells with user window tags to a text file which can then be used by the UpdateBrain keyword. The file name in the file field is created, if empty then the tag details will be added to the default new data file.
WipeEmotion clears the emotion field of cells in the last part of the BD.
wsbShow show WSB window.