SECTION BRIEF - In this section you will return to the Design Control
Module (DCM) to improve your cybertank’s Artificial Intelligence (RI) through the
Use of the AI Module.
From the ECM. select DESIGN CYBERTANK from the DESIGN menu, as you did in Section
2.0, “DESIGNING A CYBERTANK." The OSI/CACD remembers the last cybertank design worked
on in the DCM, ALPHA. ALPHA's Al is automatically loaded, and you are transferred
to the AI Module.
NOTE: There are several instances in which the OSI/CACD will not load the cybertank
design you last worked on. This usually occurs when the OSI/CACD is not able to
locate the cybertank design in any of the available access slots. If ALPHA does
not load automatically, you must load it manually by selecting LOAD from the CYBERTANK
menu.
The AI Module is used to enter and modify Al designs. You can add new instructions,
remove old ones, change their order, etc. The AI Module provides great flexibility
for the cybertank engineer.
The material in this section uses terminology which may or may not be familiar
to you. The following definitions Will aid in your understanding.
The edit window is the large area that displays the AI. characters are letters,
digits, punctuation, or spaces. Text refers to the characters within the edit window.
To insert is to add characters to the text; to delete is to remove characters from
the text. Editing is the process of altering the text. The Insertion Cursor (IC)
is the thin vertical bar in the edit window.
You are currently in the AI Module, and ALPHAS s AI is visible in the edit window.
The IC is currently in the upper left-hand corner of the edit window, next to the
word “Start.” The IC can be moved using either a mouse/joystick or the keyboard
as discussed below.
Using a Mouse/Joystick: Using a mouse/joystick, move the pointer, the small triangular
arrow, to a position just after the word “Start,” and click. Notice that the IC
has moved to the pointer’s position. Move the pointer and click to move the IC anywhere
in the edit window.
Using the Keyboard: You can move the IC with the following CURSOR keys:
The CURSOR-LEFT key normally moves the IC one character to the left. If the IC
is already at the beginning of a line, CURSOR-LEFT moves it to the end of the previous
line.
The CURSOR-RIGHT key normally moves the IC one character to the right. If the
IC is already at the end of the line, CURSOR-RIGHT moves it to the beginning of
the next line.
The CURSOR-UP key normally moves the IC to the beginning of the current line.
If the IC is already at the beginning of the line, CURSOR-UP moves it to the beginning
of the previous line.
The CURSOR-DOWN key normally moves the IC to the end of the current line. If
the IC is already at the end of the line, CURSOR-DOWN will move it to the end of
the following line.
The IC indicates the point in the text at which characters can be inserted or
deleted.
Move the IC just to the right of the words "Do Seek.” Now type the letters "i",
“n” and “g”. “Seek” becomes “Seeking.” You have just inserted the three characters...
i, n, and g. Type several spaces and notice how the IC moves.
Text can be inserted between any two characters. Move the IC between the letters
“t” end "a" of the label “Start.” Type “u” and “Start” becomes ‘“Stuart.”
Text can be removed (deleted) one character at a time using the DELETE key. Move
the IC between the letters “s” and ‘t’ of the word ‘Destroy” in the line “00 Destroy”.
Press DELETE three times. ” Destroy” becomes “troy.” Notice that each time you press
DELETE, the character to the left of the IC is removed. The IC, and each of the
characters to right of it, move left to fill in the space.
Move the IC to the end of the text (just after the word ‘“Destroy”) and press
RETURN. The IC moves to the next line. Type “New Line” and press RETURN, New lines
can be added anywhere in the text.
Labels, such as “Start” (now ‘“Stuart”), always begin in the far left column.
Other lines, however, are indented. Since labels are less common than other lines,
the AI Module automatically indents each new line for you when you press RETURN.
Type “Other Line” and press RETURN.
To move the IC from the indentation column to the far left column (i.e., remove
the indentation), press DELETE. To move the IC from ‘the far left column to the
indentation column (i.e., indent), press TAB.
Press RETURN to skip a line. Press DELETE to move the IC to the left column.
Type “Label” and press RETURN. It is a good practice to add blank lines above labels
- it makes the AI easier to read.
Some AI commands will not fit on a single line. Without pressing RETURN, type
this sentence: “This is an example of a line which is too long.” The AI Module automatically
wraps your sentence to the next line. Notice that the continuation line is indented
further than the original line. This feature also helps to make AI easier to read.
At present, the text you are editing fits entirely within the edit window. As
you add more commands, the text will. eventually outgrow the size of the edit window.
Press RETURN. Notice that the label “Stuart” is no longer on the screen. Type
three or four more lines, ending each one with a RETURN. One line disappears from
the top of the edit window each time a new line is added at the bottom.
Although some of your lines of AI are no longer visible, the AI Module is still
keeping track of them. You can see any Part of the AI using scrolling.
Scrolling can be thought of as moving the edit window up and down to examine
different parts of the text. You can scroll with either a mouse/joystick or the
keyboard. The two methods are discussed below.
Using a Mouse/Joystick: You can scroll the text by clicking anywhere on the scroll-bar
located directly to the right of the edit window. Clicking directly on the scroll-bar
will scroll the text several lines. Clicking on the small arrows directly above
and below the scroll-bar will scroll one line. By clicking on the small plaque (or
“thumbprint” as it is often called), you can drag the plaque to any location in
the scroll-bar. This thumbprint represents the location of the text currently visible
in the edit window. For example, if the edit window is displaying the first few
tines of text, then the thumbprint will be at the very top of the scroll-bar. On
the other hand, if the edit window is currently displaying the last few lines of
text, then the thumbprint will be at the very bottom of the scroll-bar.
Using the Keyboard: You can always scroll text using the SCROLL keys. See the
OSI/CACD System 2 Reference Card to determine which keys to use on your terminal.
The Al Module lets you modify sections of text, such as a words, lines, or paragraphs.
You must first select the text. When selected, a section of text appears highlighted.
Text can be selected using either a mouse/joystick or the keyboard. The two methods
are discussed below.
Using a mouse/Joystick: To select text, move the pointer to the beginning of
the text you wish to select, press and hold the button down, and move the pointer
to the end of the text section you wish to select. Once selected, release the button.
Using the keyboard: To select, move the IC to the beginning of the text you wish
to select, press the MRRK key, then move the IC to the end of the section of tent
(see the OSI/CACD System 2 Reference Card to determine the MARK key for your particular
terminal type).
In either case, the text is highlighted as it is selected. Try Selecting “Branch
To” now.
Selected text is deselected when the IC is mooed. If using the keyboard, the
text is not deselected until the MARK key is pressed a second time.
Experiment with selecting and deselecting words, lines, and paragraphs. Notice
that you can also select text “backwards.” In other words, you can begin selecting
from either end of the text section.
When editing AI, you will occasionally want to delete a section of text. You
could move the IC to the end of the section and press DELETE marry times to remove
the section, but there is an easier method.
To delete a section of text, simply select the tent in the manner previously
described, then press DELETE. To demonstrate, select “an example of” and press DELETE.
The Sentence “This is an example of a line which is too long" now reads “This is
a line which is too long.”
It is often desirable to replace a section of tent (typically a word) with something
else. You could delete the old text and begin inserting new text, but, once again,
there is a better method.
To replace a selection of text, select it and type the replacement text. There
is no need to press DELETE. For example, select “too long” and then type "short"
to replace it. The sentence now reads: “This is a line which is short.”
There will also be times when you need to rearrange text. The Al Module allows
a section of text to be removed (Cut) from one location and placed (Pasted) in another.
To cut, select and highlight the text. Next, select CUT from the EDIT menu. The
selected text is removed from the edit window and temporarily stored internally
by the Al Module.
NOTE: Only the last cut or copied section of text is stored.
To paste, move the IC to the beginning of the new location for the stored text.
Select PASTE from the EDIT menu. Paste inserts the stored tent at the current location
of the IC.
Sometimes it is desirable to duplicate, or copy, a section of text. The AI Module
allows a section of tent to be Copied (without removing it) and Pasted to another
place.
To Copy, select the text to be copied. Select COPY from the EDIT menu. The AI
Module internally stores a copy of the selected text, without removing the selected
text from the edit window.
To paste, move the IC to the beginning of the new location for the stored tent.
Select PASTE from the EDIT menu. A copy of the internally stored tent is inserted
at the current location of the IC. Each time you select PASTE, stored text is inserted.
As you can see, it is easy to make multiple copies of a section of text.
There will be times when you mistakenly delete Portions of AI and your suddenly
realize the error of doing so. If you immediately select the UNDO option from the
EDIT menu, then your last action will be undone. Please note that this only works
if you immediately select UNDO.
Congratulations! You now know almost everything there is to know about the Al
Module and are probably curious about the plaques below the edit window. Relax.
Those will be covered soon. For now, let’s get on with editing ALPHA.
The editing exercises you completed in previous sections left ALPHA’s AI in an
unusable state. Reload ALPHA's AI by selecting LOAD from the CYBERTANK menu. The
File Modification Panel (FMP) appears and tells you that unsaved changes have been
made to the current cybertank design. It will ask if you want to "SAVE CHANGES TO
ALPHA?”
Select the No button if you select Yes, your good copy of ALPHA will be overwritten
(replaced) by the edited one.
The OSI/CACD always informs you of current work that has not been saved to disc.
When another cybertank is loaded, it will replace whatever is currently being edited.
At present, this is desired since the current design is unusable.
After selecting the Yes button, the File Retrieval Panel (FRP) appears and you
can reload ALPHA.
One of the advantages of semicustom design is that significant changes in the
cybertank’s behavior can be easily incorporated using different Library Capsules.
You may have noticed that one problem in ALPHA's behavior is that it spends so
much time moving that it does not have much time to scan. The result is that ALPHA
often misses “seeing” things.
The Seek routine currently used was designed to move a cybertank fairly quickly.
Search, another routine available as a Library Capsule, puts more emphasis on scanning.
Modify ALPHA's AI by replacing Do Seek with Do Search. You can do this by replacing
a section of tent (“Seek”) as discussed in Section 4.3.3.
Each time a cybertank undergoes design modification, the changes must be authorized.
Re-authorize ALPHA by selecting AUTHORIZE from the CYBERTANK menu. Oops, an error.
The Cybertank Authorization Module (CAM) reports a problem: " The label SEARCH was
not found in the following line: Do Search.”
Select the Continue button to look for additional errors. After the CRM examines
the rest of the AI, you are then transferred to the Al Module where you can make
corrections to the problem.
What happened? There is nothing wrong with the command “DO Search”, but the routine
Search is nowhere to be found. it is only available in the Library Capsule named
Search and that has not been included in ALPHA's AI. To solve the problem. replace
the line “Include Seek” with the line ‘“Include Search”.
At this point, verify that ALPHA's AI is identical to the following. If necessary,
edit the Al to make it match. It should be pointed out that the case of the letters
does not matter (i.e., START is equivalent to Start).
Start
Do Search
Do Destroy
Branch to Start
Include Search
include Destroy
Before authorizing your cybertank, save it to disc. This time, select SAVE AS
instead of SAVE from the CYBERTANK menu. By selecting SAVE AS, you are able to choose
a new name for your cybertank design. Choose the name BETA by typing BETA and pressing
RETURN. YOU have now created an entirety new cybertank design named BETA. Notice
that the name plaque at the top of the edit window displays BETA. ALPHA has not
been replaced; it is still on the disc and can be recalled at any time.
Authorize your new cybertank, BETA, by selecting AUTHORIZE from the CYBERTANK
menu. If the authorization is successful, as it should be, return to the External
Control Module (ECM) by selecting the ECM button. If the authorization is unsuccessful,
please refer back to Section 4.4.4 to verify your cybertank’s AI.
You have now designed your first two cybertanks, ALPHA and BETA.
|