RIT Scholar Works
Theses
Thesis/Dissertation Collections
5-21-1988
Microcomputer graphic intelligence
Thomas Tillman Shaffner
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
Recommended Citation
ROCHESTER INSTITUTE
OF
TECHNOLOGY
A
Thesis Submitted
totheFaculty
ofThe College
ofFine
andApplied Arts
in
Candidacy
for
theDegree
ofMASTER
OF FINE ARTS
Microcomputer
Graphic Intelligence
By
Thomas Tillman Shaffner
Advisor: Robert Keough
Date:
C -
]-/Ja
Associate Advisor: James Ver Hague
Date:,
G+A-=~"",~J-:1I.'?~
_
Associate Advisor: Norman Williams
Dare:fp5C
Special Assistant
to
the
Dean for Graduate Affairs: Phillip Bomarth
Date:._ _
G-~f:----j6~;..-:..ff-=---
_
l
Dean, College of
Fine and Applied Arts: Dr. Robert Johnston
Dare:
~'.o.£
\
0.,
~ 9.:.=..&~
_
I,
Thomas
1.
Shaffner
,hereby grant permission to the Wallace Memorial Library
of RIT, to reproduce my thesis in whole or in part. Any reproduction will not be for
commercial use or profit.
THE
BEGINNING
This
thesis
offers evidencethat themarriageofartificialintelligence
andmicrocomputer graphics
is
a mixedblessing. This pairing
willsavetime and effortfor
theoperator
but
thestrain on thecomputermay
destroy
theunion.To begin
with,
artificialintelligence,
orAI,
is
a mysterious companionfor
acomputer program.
A
relatedfield
toAI,
expert systemsis
muchbetter
understood."An
expert system
simply defined is
acomputer programthataidsin solving
complexproblems
thatwouldusually
requireahuman
expert."1Artificial
intelligence
providesthesame service
but for
generic problems.Another
distinguishing
characteristicis
thatanexpert systemcan
only carry
ona gooddialog
about one specifictopic,
andonly in its
ownterms.
An AI
programcandiscuss
its
solutionsin any terms,
withany
user.Be
causeof
its
friendliness,
artificialintelligence
getsan oddreputationnotfrom
confusionwithexpert
systems,
but
withconversationalinterfaces.
Any
program canmimicdialog
in
a generalway,only
a smart onecanlearn from
theinterchange.2If
artificialintelligence
is
somisunderstood,
is it
anecessary
partnertomicrocomputergraphics?
A study
ofcomputergraphicdesigners
shows thatsomething is
needed to
improve
productionquality.Untrained
operators on unintelligent computersystems will make
any
combination of values.Inconsiderate
graphical choicescancombine
toruin acomputergenerated slide:"garbage
in,
garbage out".Professional
designers
need notworry
aboutbeing
replacedby
automation.Al
thoughartificial
intelligence may
protectthe sensibilitiesofthepublic,
a computercan'Excerpt
from
areportonAI
andExpert
Syestems
by
Robert
Keough,
Rochester
Institute
ofTechnology, Rochester,
New
York,
14 April 1987.
2
A
classic example ofa
dialog
processing
programthat
has
nofurther
"intelli
gence"
than
for
conversationis
ELIZA
by
Joseph Weizenbaum. (See Marion
Long,
"Turncoat
oftheComputer
Revolution,"New Age
Journal.
December
1985,
pp.47-78.)
never
be
automated.Artificial
intelligence is
anunusual, necessary,andnon-threatening
thesis topic.For
anMFA degree
however,
theissues
are moreexciting
thantheimagery. While
AI
will
improve design
aesthetics,
thebest
effect will occurthroughsubtle coercion: andsince good
design is transparent,
artificialdesign improvement
willbe invisible. There
fore,
thebest illustration
ofAI in
microcomputergraphicsis
oftheentire processandnotthe
final
effect.The accompanying
exhibitionfor
thisMFA
thesiswasmuch moreadia
grammatical
illustration
thanan aesthetic masterpiece.An
identical
illustration
ofthestructureofa sample
dialog
with acolor smart programis included
here,
aswellas asample conversational
interchange (see figs. 1 &
2.)
This
paper willcontinue toaddresstheimplications
ofthecombinationof artificial
intelligence
and graphicsthroughanaccountofasmart,
design
program.The
listing
included in
thisthesis gives amicrocomputertheintelligence
toassist anoperatorin
C C3
t
CO
.|
cd
I
CD a.t/3
'5
."5 -ij
c
a
o O.'S
s
<-> t/3
S>-> S-l a c x>
cu i-i 3
THE MIDDLE
The
first
thesis
attempt atjoining
computer graphics and artificialintelligence
was on
8-bit,
Apple
IIcomputers.Simple
illustration
andtypography
programs wereenhanced
withautility
thatlearned
theuser's graphicalpreferences, andrelatedtheknowl
edgethrough easieruse.
An introduction
to theAutographix,
aslide-generating,
computer
system,
suggestedthateven thesimplestdesign decisions
canbe
based
on previousinteraction.3
This
thesis's
programmanipulatescolorin
titleslidesin exactly
thesamemanneras
the
Autographix
systembut
withintelligent
support.Both
systems allowtheinde
pendentspecification of color values
for foreground
andbackground design
elements.However,
theAutographix's
closed architectureinhibits
softwaredevelopment,
soAI
reasearch
had
tobe done
onadifferent
machine.An
IBMPC XTwasemployedtogenerate
the
needed graphics withtheavailableintelligence
programmability.The
IBMPC
is
a 16-bitmachinebased
onthe8088
processor.The
XTusedin
thisthesis
has
an80287mathcoprocessor,
extendedgraphics,
windowinterface,
and a graphics
routinelibrary.
The
nativeprogramming
language,
BASIC,
is
adequatefor
themany
tasks addressed.
A
higher-level
language
(LISP,
PROLOG, C,
etc.)
wouldhave
allowed accelerationandsophistication,
but
notthesimple,
flexible
andmethodical nature ofBASIC.The
IBMhas its
goodandbad
qualitiesin
theresearch on artificialintelligence
with graphics.
On
thegoodside,
theextremely
open architectureofthesystem permitsthe additionof mediumresolutioncolorgraphicsto
640
kilobytes
ofRAMand a20mega-3The
Autographixis
amicrocomputerbased,
slide production system.The
equipmentallows
for
rapidproductionofhigh quality
images
through the useof guidelines
toaidthecompositionofinformation
in low
resolution.The data for
theslideis
then senttoa
high
resolutionfilm
recorder.(For
specifications seethe
Instruction Man
byte hard disk. The
hard
drive
contains: awindowenvironment,
graphicsroutines,languages,
DOS,
the thesisprogram and alldata files. On
the
otherhand,
thesemany
concurrenttasks
do
not promoteeasy development. If
oneutility
crashes, thewholesystem goes
down.
Even
thoughit is
an uncompiledlanguage,
BASIC'Shardware
residenceallowsfor
high
execution speed andindigenous
security.While
thelanguage
supports standardstring parsing
instructions,
it has
no realenglishlanguage
control.The lack
oflist
processing in
BASICrequires theconstantuse ofFIELDstatementstosupportrandomaccess
files.
The
graphicsability
ofthe PCis limited
to sixteencolor,
640x480 resolution,raster
display. Type-color
selectionis
pivotalto the program, andthoughthe IBMdoes
not supporttheuse of
its
entire palettefor text,
asupplementary
graphicslibrary
permitsthecreation of graphicaltype
in any
color.All
theseequipmentdetails become secondary in
thepublic's needfor artficially
intelligent
software,
but
thesespecificationshave been listed here
todefine
themany
factors
hindering
thedevelopment
of suchprograms.Just
ascoloravailablity is
crucialto thisprogram's
development,
thedifficulty
in managing
graphics andAI
is
criticaltoTHE PROGRAM
The
next section ofthis thesis
is
devoted
tothecareful explanation ofthecentral,
experimental
program,
MGI.The
software wasdeveloped for
theIBM PC XTandwhencorrectly
entered andsupported,
theresulting
packagewillbe
anartificially intelligent
color selection system
for
word slide production.As
stated, the
recommendedhardware
is
anXT,
but
theprogram will run unaltered
onany
IBM PC.While
ahard drive is
recommended,
it is
notnecessary
to theoperation ofthesoftware.
The
following
supplemental packages are also recommendedfor
use oftheprogram: an80286 coprocessor,
IBM DOS3.10,
Microsoft
Windows,
andMedia
Cybernetics'HALO.
With
alterations,
theessential algorithms ofthis
program canbe
transported
toany
computer.To
makethe
listing
easiertoimplement,
theprogramstructure,
including
the
line
numbers,
has been
typesetin
the simplest possibledesign. The
commandsremainthenative
BASIC
instructions,
but
areuniversaltoalmostallprogramming
languages.
The accompanying
comments and remarksnormally included in
theprogramlisting
itself,
have been
removedto theopposing
pagesfor
easier analysis.The
boldface
section
labels
arestructuralseparators,
notinstructions. Given
theequipment restrictionsandexperimental
deadlines,
thisprogramonly
accepts and repeatsits
education onthreecolor parameters
for
awordslide,
but
withcarefuldevelopment,
thescopeofthe
packageMGI
programInitialize programming
environmentON ERROR
GOTO
3000
KEY OFF
Initialize
graphicalenvironmentGOSUB 4000
DEF SEG=&H3800
BLOAD
"haloi.bin",0
device$="haloibme.dev"
CALL
SETDEV(device$)
Initialize
constants andvariablesDIM
file$(19),
variable$(2),
color%(2),
color$(16),
color(3,5)
doyouwant$="do
you want "color%(0)=l: color%(l)=14: color%(2)=0
COLOR 14,1
Declare
graphicalvariablesDATA
"background
color",
"copy
color",
"drop
shadowcolor"
FOR i=0 TO 2
READ
variable$(i)
NEXTi
Declare
"expert"graphics constants
DATA
0,1,2,3,6,8,
15,14,11,10,9,7,
0,1,2,3,6,8
FOR
i=0 TO 2
FOR
color=0TO 5
READ
color(i,color)
NEXT
colorNEXTi
Declare
english namesfor
colorsDATA
"black",
"blue",
"green",
"cyan",
"red",
"magenta",
"brown",
"gray",
"dark
gray","blue",
"green",
"cyan",
"red",
"magenta",
"yellow",
"white"FOR
i=0 TO 15
READ
color$(i)
11
MGI
standsfor
Microcomputer Graphics Intelligence.
Initialize programming
environmentBefore sending
instructions
to thecomputer,
normalsystem errors mustbe
trapped.
A
simplefault
in any
unit can causethewhole systemtosieze.In
thecase offile
creation, if
an erroris
detected,
a newfile
is
createdfor
thatsession.Initialize
graphical environmentThis
software utilizesMedia
Cybernetics'halographics
library. The
addressesfor
each routine aredefined
in
hexadecimal
order attheendoftheprogram.The
binary
functions
areloaded from disk
residentsoftware,
along
withthe appropriategraphicsdriver,
whichis
theninstalled.
Initialize
constants and variablesHere
theprogram's parameters aredefined. Multiple
variablesaredeclared
asarraystoease repetitive processing.
The keyword "do
youwant"
is
stored as astring
variable,
tofacilitate
dialog
handling. The default
color valuesfor
thebackground,
foreground,
anddrops hadow
colors aredefined. The
textwindow's colors are setto thedefaults.
Declare
graphical variablesIn
thissection,
theenglish namesfor
the threecolorvariablesaredeclared
andstored
in
thearray,
VARIABLES.Of
course,
theseappelations need notbe
english,
they
need noteven
be
words atall.The
computerrelatesits knowledge
aboutthese andotherparameters
independently
oftheirdefinition.
Declare
"expert"graphics constants
The
term"expert"refers to thefact
that thesecolors,
oncedeclared
here in
computer
terms,
areimmutable.
Neither
thecomputer northeusercan alterthesevalues ortheir
order,
withoutaffecting further
program use.The
color valueshave been
groupedaccording
to thecontrolling
color variables.Declare
english namesfor
colorsAgain,
thenames ofthecolors arecompletely
arbitrary,
in
that the stringsthatreplacethemcan
be any
alphanumericcharacters.The duplicatation
ofcolornamesis
areflectionofthe
dual brightness levels
ofthe EGAdisplay
mode.The last
eight colors arehigh
intensity
versions ofthefirst. The
arraysVARIABLES
andCOLORS
canbe
altered atany time,
andwillonly
change subsequentinteractions
withno effect onpreviously
stored
data. The
twodimensional,
realnumberarray
COLOR,
should neverbe altered,
Open
workstationCLS
INPUT"initials:
",initials$
IF
RIGHT$(DATE$,2)="80"THEN
CLS
INPUT
"date:
";date$
DATE$=date$
volume$=LEFT$(initials$,3)+LEFT$(DATE$,2)+RIGHT$(DATE$,2)
Open
volume100
OPEN
volume$FOR INPUT AS #1
IF badfile THEN
CLOSE
GOSUB 200
i=0
INPUT
#l,file$(i)
i,
"new
file"WHILE NOT EOF
(1)
i=i+l
INPUT
#l,file$(i)
i,
LEFT$(file$(i),8), RIGHT$(file$(i),3)
WEND
CLOSE
i+1,
"quit"Which
"+doyouwant$;
INPUT
numberIFnumber=i-i-l
THEN
END
IF
number=0THEN
number=i+l
GOSUB 300
Open
file
file$=file$(number)
OPEN
file$
FOR INPUT
AS
#1
FOR i=0 TO 2
INPUT
#l,color%(i)
NEXTi
13
Open
workstationAt
this point, the
programbecomes
separate procedures andfunctions
ofloops
and subroutines.
This
sectionis
the
log-on
routinefor
computer recognition.The
userenters
his
initials,
orany
three
characters andthecomputeropens an account.If
thesystem
does
nothave
a clock online,
it
asks theuserthedate. This information becomes
concatenated
into
a workstation accounttitle thatcanbe
organizedby
user,
date
orboth.
As
thissystemis date
dependent,
theuserrenewshis
accountevery
month.Open
volumeThe
accountitself is
alist
ofthe user'sclientele andjob
titles.Here,
updating
theaccount
directory
onthescreen,
is
thefirst
part oftheinfinite
loop
that constitutesthemain structure oftheprogram.
All
subsequentinstructions
outsideofthisloop
are subroutines
for
this
loop. The first instruction is
toopenthe accountvolume, andfailing
that,
go to theroutinetocreate one.Another
loop
is
initialized,
withthevariable 'i' astheincrement.
A
nullclientis
appended asthezeroth
client,
withthe titleof"new file". The
clientlist
is
thengatheredfrom
theaccountby
theuse ofawhileloop
that testsfor
theendofthefile. Each
client/job
titlelisting
is
parsed and printed on screen, andthefile
closed attheith listing. The
ith
plus onelisting
becomes
anullclientwiththetitle "quit".
The
useris
thenpromptedtoselectfrom
the above menuoftitles. The
user'schoice,
storedin
thevariable'number,'
is
comparedwith thezeroandith
plus oneincre
ments.
If
the userchooses zero, theprogrambranches
to thefile
creationroutine.If
theuserchooses
ith
plusone,
theprogramexecutes acleanending.Open
file
If
theuseroptstoneither createanewfile,
norterminate thesession,
then theimplied
selectionis
thenumberofthefile
theuser wishes toopen.If
thisis
true,
theprogramopens theappropriate client
file,
andretrieves thefile's
colorparameters.This
Display
selectedconstantsmode%=4
CALL
rNiTGRAPHICS(mode%)
x=0:y=0:x2=l:y2=l
CALL
SETVTEWPORT(x,y^2,y2,color%(0),color%(0)) x=-200:y=-150: x2=200:y2=150CALL
SETWORLD(x,
y, x2,y2)
CALL SETCOLOR(color%(0))
CALL CLR
x%=4: y%=4: path%=0: mode%=0
CALL
SETTEXT(x%,
y%, path%, mode%)x=-107: y=17
CALL
MOVTCURABS(x,y)
CALL
SETTEXTCLR(color%(2),
color%(0))text$="Sample text"
CALL
TEXT(text$)
x=-l
10:
y=20CALL MOVTCURABS(x,
y)
CALL SETTEXTCLR(colorl%,
color0%)CALL
TEXT(text$)
INPUT
answer$CALL
CLOSEGRAPHICS
CLS
GOTO 100
New
volume200
OPEN
volume$FOR OUTPUT AS #1
#1,
"New
file"CLOSE
#1
FOR
i=0 TO 2
OPEN memory
$
AS
#1
LEN=85
FIELD
#1,80 AS branch$,2 AS
yes$,2AS
no$LSET
yes$=MKI$(2)LSET no$=MKI$(4)
PUT #1,1
LSET branch$=doyouwant$+"a
different
"+variable$(i)
LSET
yes$=MKI$(3)LSET no$=MKI$(4)
PUT #1,2
LSETbranch$="07"+doyouwant$+color$(7)
PUT #1,3
color$=RIGHT$(STR$(color%(i)),LEN(STR$(color%(i)))-l)
IF
color%(i)<10THEN
color$="0"+color$
LSETbranch$=color$+doyouwant$+color$(color%(i))
PUT
#1,4
CLOSE #1
15
Display
selectedconstantsOnce
the
client's color preferences aredetermined,
theprogramdisplays
themusing
the
graphicslibrary
that
wasloaded
atthe
beginning
ofthe
program.The many
CALLs
here
areinstructions
to thatbinary
library. The
graphics environmentitself
mustnow
be
initiated,
andthe
viewing
parameters adjusted.The
screenjumps
from
theoperational
text
defaults,
tothe
new graphics colorin
the
client'sfile. The
coordinatesfor
theenvironment and
display
copy
are establishedfrom default
values.Of
course, the
entire operation oftheprogram couldbe handled in
thisenvironment,
but
thedemand
onthelibrary
tohandle
input
and outputwas toomuch experimentation
for
the
deadlines
ofthis thesis.
The
graphicslibrary
supportsmany
other variablesthat
have
notbeen
manipulatedhere.
As
mentionedbefore,
a more completeversionofthis software would
be
a more powerful graphicaltool, but
theneedfor
redundancies andsafeguards,
would makethe
fundamental
algorithmtoocumbersome.Once
theprogramhas displayed
thevaluesfor
thecurrent clientfile,
it
waitsfor
the
usertoacknowledgethedisplay
withakeypress. Upon
response,
theprogramerasesthe
display,
and returnsto the
file
menu atthebeginning
ofthemainloop.
New
volumeNow,
theprogram structurebreaks down
tocomponent subroutines only.This
procedure creates a new account
for every
newoperator,
orfor
a newoperationalmonth.Command
controlis
routedtothis
routineby
way
ofa"file
notfound"
error.
If
auserlogs
onthat the computerdoes
notrecognize,
oran old operator renewshis
account,
thesyntax oftheirnew accountwill so confusethemachine that
it
willbranch
to thisroutinetocreate
the
necessary files.
In
additionto the clientfile,
thissubroutine also creates threememory files. Here
labelled
'i=0
TO2,' thesethreefiles
representthe
infant intelligence
oftheprogram.Each
file
correspondstoa separatefield
ofexperience,
where thename ofthememory
file
is
aconcatenation ofthe'ith' variableandtheoperatorsinitials.
Each memory file is defined
as arandomaccessfile
ofrecordlength
85.
The first
80
charactersofthefile
are reservedfor
question and responsestrings,
whiletheremaining
characters aredevoted
toaffirmativeand negativebranching
integer
pointers.The
first
recordcontainsthedata
ontheentirefile,
including
a recordtotaland a pointerto thelast
record.Questions
are storedstraightforward, as aninterrogative
string,
withtwopointersto
the affirmativeandnegative records.The
answers,
whether yes orno,
are stored as aconcatenationofthenumerical colorvalue,andtheprompt
for
thatcolor.No
pointers areincluded,
as thesebranches
areterminal.Once
theinitial query for
a changeofstateis
recordedwith thenegative value ofthe
default
stateandthestandard affirmative optionoflight
gray, the
file
is
closed andtheroutine
loops
onto
nextcolor variable.Once
all thevariablesaredeclared in
theinfant
intelligence
ofthe machine,the
routinecontinues to thenext set ofinstructions
Append
volume300
OPEN
volume$FOR APPEND AS #1
CLS
INPUT'client:
",client$
IF
LEN(client$)<8 THEN
client$=client$+SPACE$(8-LEN(client$))
CLS
INPUT"title:
",title$
IF LEN(title$)<3
THEN
title$=title$+SPACE$(3-LEN(title$))
file$=LEFT$(client$,8)+"."+LEFT$(title$,3)
#l,file$
CLOSE
New file
FORj=0TO2
CLS
current%=2
OPEN
memory$AS #1 LEN=85
400
FIELD #1,80
AS branch$,2
AS
yes$,2AS
no$GET#l,current%
IF
LEFT$(branch$,l)="0"OR
LEFT$(branch$,l)="l"THEN
GOTO 600
500
question$=branch$GOSUB 2000
IF badanswer
THEN
GOTO 500
previous
%=current%
IF
yesTHEN
current%=CVI(yes$)
IF
noTHEN
current%=CVI(no$)
17
Append
volumeThis
routinecanbe
branched
to
directly,
for
theaddition ofa newfile
toan existing
account.Once
thecomputerhas
a set of rote questions and patanswers,
it
must nowapply
its
newfound
knowledge. In
this section,
theprogram switchesfrom
passivefile initiali
zationto
interactive
file
labelling.
The
computer asksfor,
and processestheclient andjob
titles.
These
values arethenwrittento theuser's accountfile,
whichis
thenclosed.Program flow
goes onto
thefollowing
routine,
ratherthanreturning
to themainloop.
New
file
The
nextstep for
anew useris
thecreation ofthedata for
thenew client.A
three repetitionloop
is
begun,
togatherinformation
aboutthenew client.Each
ofthe threememory
files
aboutcolorare retrieved andFlELDed.The
secondrecordis
gottenandscanned
for
aresulting
color.If
thebranching
string
is
not an answerthenit is
aquestionandthe
string is
sentto theinterrogation
routine.Depending
on theoperator'sresponse,
the
programbranches
to thenextlevel,
orre-asksthe question.If
theusersatisfactorily
answersthe
question,
thepointerto thecurrentbranch
is
adjustedto thepointerspecifiedin
therecordfor
thatresponse.The
programthenloops back
to the FIELDstatementandCheck
end ofbranch
for satisfactory
color600
no2=nocolor%(j)=VAL(LEFT$(branch$,2))
branch$=RIGHT$(branch$,LEN(branch$)-2)
700
question$=branch$-GOSUB 2000
IF badanswer THEN
GOTO
700IF
color%(l)=color%(0)
AND
yesTHEN
GOSUB 1000
GOTO 200
IF
yesTHEN
color$=branch$
CLOSE
NEXTj
Set memory
asidefor
learned
colorFIELD #1,80 AS branch$,2
AS
yes$,2AS
no$GET
#1,1
total%=CVI(yes$)+l
last%=CVI(no$)+2
LSET
yes$=MKI$(total%)
LSET
no$=MKI$(last%)
PUT #1,1
Adjust
binary
structureto
accommodate new colorFIELD #1,80 AS branch$,2 AS
yes$,2AS
no$GET#l,previous%
IF
no2THEN
LSET
no$=MKI$(last%-l)
ELSE
LSET
yes$=MKI$(last%-l)19
Check
end ofbranch
for
satisfactory
colorOnce
theprogramhas
gotten abinary
responsetoacolorquestionthatcorresponds toanexact
color,
thenextstep is
toask whethertheselected coloris
whattheuser wanted.
If
the
userwas giventhis coloras a response toa previous negativestatement,
then
that
resultis
storedin
thetemporary
variable 'no2.'The
numericalvalue ofthecolor andthequestion are stripped
from
thestring,
andtheprogram asks thequestion.The
routinebranches
to theanswer verificationsubroutine,
and returns.If
theuserdoes
not answer
correctly,
theprogramloops back
and re-asksthequestion.If
thechosencolor conflictswithprevious
choices,
then themachinebranches
toawarning
andtheusermust re-enter a
nonthreatening
color.The
conflictwarnedofhere is
whenthecopy
color andthebackground
color areidentical.
Any
expert rule thatcanbe
expressedin boolean
or otherwise mathematicalterms,
canbe
added atthis
point.Also,
thisis
a punishment methodof warning.A
more advanced and active systemmay influence
theusernotthroughrestriction,
but
throughsuggestion.
This
would require a more extensivediagnostic
system,
andwoulddeviate
from
theintention
ofthis thesis.If
thiscoloris
acceptableto thecomputerandtheoperator,
then theroutineloops
to the
next colorvariable.Set memory
asidefor learned
colorHowever,
if
thecomputer'sbest
matchfor
acoloratthis pointis
unacceptable tothe operator,
theprogramFIELDS thefirst
record andfinds
outwhattheindex for
thelast
record
is,
for memory
expansion.The
valuesfor
the total andlast index
ofalltherec ords are storedin
the 'yes' and 'no'fields respectively
ofthefirst
record.The necessary
adjustments are madeto
thesenumbers andthenewvalues arePUTback into
thefirst
record.
Adjust
binary
structureto
accommodate new colorAfter
thehousekeeping
for
thewholefile is
done,
thecomputer mustdetermine
where
in
the
binary
tree toplacethenext color.As
the
last
value wasunsatisfactory, the
nextrecordmustbe located
relativeto thepreviousbranch. If
thepreviousbranch
was alsounsatisfactory, thenits
negative pointerbecomes
theindex
oftherecordthatimme
diately
precededthelatest
record.If
thecolorthatthecomputerpresentsis
bad,
but
therecord
before
was good thentheindex for
thepreviousbranch
is
storedin
therecord'sDisplay
available palette800
CLS-FOR
color=0TO 5
COLOR
color(j,color),7colortj,color);
NEXT
colorIFj=lTHEN
CLS
FOR
color=0TO 5
COLOR
color(j,color),0color(j,
color);NEXT
colorCOLOR
14,1
"which
color"+doyouwant$;
ESTPUT
colorcolor$=color$(color):color%(j)=color
IF
color%(l)=color%(0)THEN
GOSUB 1000
GOTO
800
Learn
preferred colorCLS
FIELD
#1,80
AS branch$,2
AS
yes$,2AS
no$"why
"+doyouwant$+color$;
INPUT
question$LSET
branch$=doyouwant$+question$
900
question$="is thistruefor
"+color$
GOSUB
2000
IF
badanswer
THEN
GOTO
900
IF
noTHEN
LSET yes$=MKI$(current%)
LSET no$=MKI$(last%)
ELSE
LSET
yes$=MKI$(last%)
LSET
no$=MKI$(current%)
21
Display
available paletteNow
that thecomputerknows
whattherelativedescription
ofthe chosen colormust
be,
it
mustfind
outthe
numeric value ofthat
color.To
facilitate
theselection ofthepreferred
color,
thecomputer presents a selected menu ofits
native colors.The
menuis
limited
by
the
preset valuesin
the
DATAstatement atthe
beginning
of
the
program.These
predeterminedvalues representthepassive expertise ofthe system.By
notshowing
the
userthe
entire rangeofmechanicalcolors,
apoorchoiceis
more
difficult. If
the
operators wish touse a colorthatdoes
not appearin
themenu,
they
must enterthevalue
for
that
colorblindly.
The
machineonly
provides assistancefor
rangesofacceptable colors.In
the
case ofthe
brighter
colorsoftheforeground
copy,
a second paletteis
drawn
overthe
other paletteswhichis
also representativeofthepreferred choices.The
menuis
very
simplein
technique,
and restrictedby
thenativeability
ofthe machineto
display
all color valuesin
atextmenu.But,
thedisplay
is
avery
goodexampleof
how
even alittle
expertise addedto thesystem providesfor
more efficientproduction.
Another
expertdefault
exampleis
whenthecomputercompares theuser's colorwiththeothercolor
variables,
for
conflict.Here,
anactivewarning
system,
ratherthan apassive restraint
menu,
is
employed.Like
theearlier use ofthisdevice,
theoperatorcannot
ignore
theadvice ofthemachine.Learn
preferred colorThis
program provides thedefault
expertise,
but
moreimportantly,
learns from
theuseofthepassive and active restraint whattheuser
really
wants.Here
is
wheretheprogram
really
exhibitsits intelligence. This
setofinstructions
askswhy
theuserchose thecolor,
andgoesontoverify
therelationship
ofthe choice versusthecolor value.What
is
notimmediately
obviousis
thatan operatorhas
theability
to choose avaluethat
does
notsatisfy
aparticularqualificationthat thecomputerlearns. This is
distinguished
as acontradictionofthebranching
statement,
andthepointerfor
thelearned
colorindicates
theretrogradedirection
ofthecontradiction.This
actionis
specifiedas aswapping
ofthepointersin anything but
a negativeresponse.
If
thechosen coloris
correct,
relativeto thelearned
reasoning,
then theaffirmative
pointerfor
thatvalueis
placedattheindex
ofthelast
record,
andthe
negativepointer setto thecurrent record.
If
thechosen color goesagainstthelearned
reasoning,
thenthecurrentandlast
pointersare reversed.In
eithercase,
theapproriateinformation
is
PUTaway in
thepreceding
record.As
confusing
as therelationshipsofthebranching
reasonand resultsare,
thebinary
treeseemstoomechanicaltobe
classified as anintelligent
process.Regardless
ofthe
automatic nature ofthe program, thebest
methodofdescribing
the
routineis
as aUpdate
binary
logic
for
newcolorFIELD #1,80 AS branch$,2 AS
yes$,2AS
no$colomumber$=RIGHT$(STR$(color%(j)),LEN(STR$(color%(j))))
IF
color%(j)<10THEN
colornumber$="0"+colomumber$
LSETbranch$=colomumber$+doyouwant$-i-color$
PUT#l,last%
CLOSE
NEXTj
Append file
OPEN
file$
FOR
OUTPUT AS #1
FOR
i=0 TO 2
#l,color%(i)
NEXTi
CLOSE #1
RETURN
Bad
design
warning
1000
COLOR
14,4
CLS
INPUT
"BAD
CHOICE",
answer$RETURN
Check
binary
structure2000
FOR
i=78 TO 1 STEP
-1IF
RIGHT$(question$,i)=SPACE$(i)
THEN
text$=LEFT$(question$,LEN(question$)-i)
NEXTi
CLS
INPUT
answer$badanswer=0:yes=0:no=0
IF
LEN(answer$)=0
THEN
badanswer=l
RETURN
answer$=LEFT$(answer$,
1
)
IF
answer$="Y"OR
answer$="y"THEN
yes=l
ELSE
"
23
Update
binary
logic
for
new colorOnce
thecomputerhas learned
theuser's colorpreference,
thenewknowledge
must
be
committedtomemory.The
associated colorvalueis
setin
atwodigit
syntax,
and
then
concatenated withthe
'doyouwant'string,
andtheenglish name ofthecolor.The
newstring is
PUTinto
the
last
record,
thefile
is
closed,
andif
there are no morecolor variables to
learn,
the
next routineis
run.Append file
Once
theprogramhas completely
exhausted all colorvariablesfor
thejob in
question,
thelearned
colors mustbe
storedin
theassociated clientfile. The
operator'saccount
files
wereclosedin
thelast
routine,
leaving
plenty
ofRAMfor
theclientfile
tobe
opened,
andthevariablesprintedinto
thecorrect sequentialfile. This
processis
accomplished
using
athreerepetitionFOR/NEXTloop,
thefile
is
closed,
andcontrolfinally
RETURNed to the
mainprogramloop.
Bad design warning
In
additiontothe
preceding
multipurposesubroutine,
four
other procedures andfunctions
existtoserve themainloop. The first
oftheseextra routinesis
theactive,
bad-design
warning.This function
interrupts
thenormalinteraction,
anddisplays
ayellowand red
warning
message.The
operator removes thedisplay
with akeypress,
returning
controlto themain program.
Check
binary
structureAnother
crucialfunction is
theinput
andverificationofbinary
answers.This
subroutine takesa
temporary
string
called 'questions' andtruncates thetrailing
spaces.The
mainpurposesfor removing
superfluous characters aremaking
thestring length
oftheuser's
input fit
the random-access, recordlength,
andfacilitate
concatenation.Once
the textstring is truncated, it is
printedonthe screenas aquestion,
prompting
further
userinput.
After
theinput
is
gatheredin
thevariable'answer$'
the threestate
parameters are
initialized
at anull state.The
variables'yes,' 'no,'
and'badanswer' are
boolean
expressions wherethezerostateis
off andany
othervalueis
on.If
theuserinputs
nothing, theprogramRETURNS witha 'badanswer,'forcing
thereasking
ofthequestion'questions.'
Any
otherinput
is
truncatedto
only
thefirst
letter,
which
is
comparedwiththeupperandlower
caseversions oftheletter
"y."If
the'an
swers
'
satisfies the condition, then the
boolean,
'yes'becomes true,
elsethe 'no' caseis
3000
IF ERR=53 THEN
badfile=l
CLOSE
RESUME NEXT
PRINT ERRERL
END
Error
trap
4000
SETCOLOR
SETTEXT
SETTEXTCLR
TEXT
MOVTCURABS
SETVIEWPORT
SETWORLD
SETDEV
INITTCUR
CLOSEGRAPHICS
CLR
INITGRAPHICS
SETFONT
SETSTEXT
SETSTCLR
STEXT
INQSTSIZE
RETURN
Graphic
library
routine addresses25
Error
trap
Another
subroutineis
theerrortrap
function
calledfrom
thebeginning
oftheprogram.
This
setofinstructions
is
criticalto thedevelopment
ofthesoftware,
for any
minor miscarriageofoperation could
completely
destroy
the
integrity
ofthe system.Such
safeguards arenecessary in
the
multitasking
environment artificialintelligence
andgraphics
demands.
Fortunately
such redundancies as errortraps also provide simpler solutionstorepetitive problems.
The
prime exampleofthis
kind
ofalgorithmin
thisprogramis
theuseofanerror
trap
codetodetermine
if
afile
being
called existsor not.If
thiscodeis
encountered,
normal execution continueswiththenextinstruction,
whichin
thisprogram,
is
afile
creationfunction.
If
theerroris
ofsome otherprogram, system,
ormechanical
problem,
program executionis
halted
andtheerror code andoffending line
areprinted.
Graphic
library
routine addressesThe last
procedure,
starting
atline
4000,
is
adirectory
ofthe HALOgraphicalroutines.
While for
thepurposes ofthisthesis
theprogramdoes
notstrictly
require suchintense
graphics asHALO supports,
any
otherincarnation
would.The hexadecimal
addressesofthemachinelanguage
routines arelisted in
ascending
order,
withthe
system's original names.Certainly
Media
Cybernetics'library
is
morethanadequate toreproducethe
features
andfunctions
oftheAutographix,
but
thepurpose
here is
nottoproduce a competitive graphicspackage,
but
todemonstrate
thefeasibility
ofthecombination ofgraphics andAI.
Including
theremainder oftheHALO
addresses wouldfill
three morepages,
but
more
signicantly,
programexecution wouldbe
endangeredby
the additionalfunctional
ity.
At
this
level
ofcomplexity,
operationsfail from
hardware
inadequacy
onetenth toone
fifth
ofthenormallogins. These
figures
are averagesoftheswitching failures
oftheprogram
in
randomdisk
access,
graphicsaddresses,
andprograminstruction. The fail
urestake the
form
ofinconsistent
displays,
string
values,
oroutrightprogramcrashes.The data
comesfrom
extensive testsbeyond
normaldevelopment trials,
and allowsfor
Artificial
intelligence
andgraphics aretwo
ofthe
mostinformation-intensive
fields
ofthe
computerindustry.
A
computer's sole purposeis
toprocess
data,
but
thedemands
ofgraphics,
andenvironmenthave
influenced
theshape ofthemachine atthe
microcomputer
level.
As
graphics programshave become
larger
and more comprehen
sive,
the computer's architecturehas
expanded tohandle
theincreased
load. Microcom
puters can now mimic
multitasking
by
performing
many
simpletasks
in very
rapidsuccession, but pairing AI
and graphics requires suchtremendous
switching
in
the serialoperation ofthecomputer
that
the twofields
arenearly mutually
exclusive.The
use of massmemory
storage andsophisticatedhardware
and softwareinte
gration
have
expeditedthe attemptedwedding
ofAI
and graphics.The
use ofcoprocessors
improves
computationalspeed,
but
by diverting
serialexecution,
notby
distributing
parallel
instructions.
The
singleinformation
channelin
microprocessorsjust
cannotsupport artificial
intelligence
and computer graphics.A
smart,
graphics microcomputermust
be
atrue
parallelmachine,
or a symbiosisofmany
dedicated,
serialmachines.4Must
a computerhave
graphics andintelligence?
As
mentionedbefore,
alongitu
dinal study
of a classofart anddesign
students offers someproofthatAI
is
necessary.In
aninitial
questionnaire(see
fig.
3)
tothe
entirepopulation, only
six offourteen
computer graphics students
(42%)
made color choicesfor
word slidesthat
did
not conflictwithaccepted color
interaction
theory.5At
the endoftheclass,
the studentscould effectively
operate theequipment,
but
theiraveragefor
thequarteronly
roseto57%
(
73acceptable choices of127 total
slides)
in
a controlledobservation.4
See
the section"Limitations
ofaSerial
Machine",
in
Understanding
Computers:
Artificial Intelligence. (Alexandria: Time-Life
Books, 1986),
pp.104-110.
5Additional
rulesfor
correct colordetermination
and usage were adaptedfrom
Joseph
Alber's
The Interaction
ofColor.
(New
Haven:
Yale
University
Press,
1975).
28
The Autographix's
guidelineshave
evolved toenforce theuseofbright
hues,
especially
yellow,
ondark backgrounds (i.e.
blue,
green,
black)
withdark, black,
or nodrop
shadow.6However,
thestudents continuedtoplacecomplementaryhues
ofcopy
and
drop
shadowsofthe same value uponhigh
saturationbackgrounds.Given
mechanical colortemplates andprior
knowledge
of colortheory, nearly
half
ofthesubjectsstilldid
not producequality images
afterthreemonths ofinstruction. When
experiencedgraphics studentswith
dedicated
equipmentmisapply
color, thecomputermust assumemore
responsibility for
thatinformation.
Perhaps
thepresentlow
demand for
artificialintelligence
supportcannotjustify
overcoming
thedifficulties
ofimplementing
algorithms atthemicrocomputerlevel. Cer
tainly
theproliferation of graphicalinformation has
promoted areorganizationofthemedia
involved,
but
thetoolsneedtoassume moreresponsiblity for
thedata
they
supply.Bad design
affectsthelegiblity
ofinformation,
andif
acomputer canlearn
theoperator'spreferences andgovern themwithregardtogood
design,
thedesigner
willbe free
tobe
more
innovative
withthatinformation.
6Software
templates and rules ofthumb
for
equipmentuse arewelldocumented.
AUTOGRAPHIX
COLOR QUESTIONNAIRE
As
you preparetomake yet anotherAutographix
slide,
you'll pick yourpredominant colors
from
themany
possiblecombinations.When
youfinally
makethose
decisions,
please recordthemhere.
1)
What
background
colordid
youchoose?2)
What
type
colordid
you choose?3)
What
drop-shadow
color,
if
any,
did
you choose?If
thecolors youjust listed
areanything like
the colorguidelineslisted
below,
please circleyourchoice.
BU1W GN1W BR1W BK1W
1)
Background DarkBlue
Dark Green Dark Brown Black2)
TypeLight Yellow
Light
YellowLight Blue-Green
Yellow
3)
Drop-shadow BlackNone
Dark Blue-Green NoneIf
your color choicesdon't
matchany
oftheseguidelines,
why
did
you choosethe colors you
listed
above(i.e. "I like 'em
for
their warmth.","They
look
earthy."or
"These
colorsbest
match the manufacturer's PMS colors.")?If
you caretovolunteermoreinformation,
please recordany
otherkinds
ofcolor/type relationships.
What
colorsdid
you usefor
thecopy,
bullets,
legends,
etcetera?
If
thecolors represent someabstract(non-design
related) choice,
whatis
thatscheme?
Are
they
pickedfor legiblity? Is
thereacoloryou'dlike
touse,
that'snot
in
thepalette?How
muchofthecolordo
youuse,
thatis,
how's
yourtype weightversus color
density?
BIBLIOGRAPHY
Albers,
Joseph. Interaction
ofColor
New
Haven:
Yale
University
Press,
1975.
Bolt,
Richard A. The Human Interface. Where People
andComputers Meet. Belmont:
Lifetime
Learning,
1984.
Brand,
Stewart.
The Media Lab. Inventing
theFuture
atMTT. New York:
Viking,
1987.
Comfort,
Alex.
Reality
& Empathy: Physics. Mind,
andScience
in
the21st Century.
Albany: State
University
ofNew York
Press,
1984.
Edwards,
Betty.
Drawing
ontheArtist Within. New York: Simon
andSchuster,
1986.
Godman,
Arthur. Barnes & Noble Thesaurus
ofComputer Science. New York: Barnes
& Noble
Books,
1984.
Haack,
Susan. Deviant Logic: Some Philosophical Issues. London: Cambridge
University
Press,
1974.
Hofstadter,
Douglas R. Godel. Escher. Bach: An Eternal Golden Braid. New York:
Vintage
Books,
1979.
Horn,
Delton
T. Smart
Apples.
31
Artificial
Intelligence Experiments. Blue Ridge
Summit:
Tab Books
Inc.,
1987.
Keough,
Robert P.
Rochester Institute
ofTechnology,
Rochester,
New York.
Reports
andconversations,
1986-1988.
Long,
Marion. "Turncoat
oftheComputer
Revolution."New
Ape,Journal.
December
1985:
pp.47-78.
Mishkoff,
Henry
C.
Understanding
Artificial
Intelligence.
Indianapolis:Howard
W.
Sams &
Co.,
1985.
Schank,
Roger C.
andChilders,
Peter
G.
The
Cognitive
Computer:On
language.
Learning,
andArtificial
Intelligence.
Reading:
Addison-Wesley Publishing, Inc.,
1984.
Shirai,
Yoshiaki
andTsuji,
Jun-ichi.
Artificial
Intelligence:
Concepts.
Techniques
andApplications.
New York: John
Wiley
&
Sons,
1982.
Whitney,
Patrick,
ed.Design
in
theInformation
Environment. New York: Alfred A.
Knopf,
1985.
Wiersma,
William. Research Methods in Education: An Introduction. Boston:Allyn &
Bacon, Inc.,
1986.
Wilson,
Stephen.
Using
Computers
toCreate Art. Englewood Cliffs:
Prentice-Hall,
1986.
Instruction Manual. Theory Manual. Reference Manual. Waltham: Autographix
Inc.,
1982.
Understand!
neComputers: Artificial Intelligence. Alexandria: