• No results found

Microcomputer graphic intelligence

N/A
N/A
Protected

Academic year: 2019

Share "Microcomputer graphic intelligence"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

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

[email protected].

Recommended Citation

(2)

ROCHESTER INSTITUTE

OF

TECHNOLOGY

A

Thesis Submitted

tothe

Faculty

of

The College

of

Fine

and

Applied Arts

in

Candidacy

for

the

Degree

of

MASTER

OF FINE ARTS

Microcomputer

Graphic Intelligence

By

Thomas Tillman Shaffner

(3)

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.

(4)

THE

BEGINNING

This

thesis

offers evidencethat themarriageofartificial

intelligence

andmicro

computer graphics

is

a mixed

blessing. This pairing

willsavetime and effort

for

the

operator

but

thestrain on thecomputer

may

destroy

theunion.

To begin

with,

artificial

intelligence,

or

AI,

is

a mysterious companion

for

acom

puter program.

A

related

field

to

AI,

expert systems

is

much

better

understood.

"An

expert system

simply defined is

acomputer programthataids

in solving

complexprob

lems

thatwould

usually

requirea

human

expert."1

Artificial

intelligence

providesthe

same service

but for

generic problems.

Another

distinguishing

characteristic

is

thatan

expert systemcan

only carry

ona good

dialog

about one specific

topic,

and

only in its

ownterms.

An AI

programcan

discuss

its

solutions

in any terms,

with

any

user.

Be

causeof

its

friendliness,

artificial

intelligence

getsan oddreputationnot

from

confusion

withexpert

systems,

but

withconversational

interfaces.

Any

program canmimic

dialog

in

a generalway,

only

a smart onecan

learn from

theinterchange.2

If

artificial

intelligence

is

so

misunderstood,

is it

a

necessary

partnertomicro

computergraphics?

A study

ofcomputergraphic

designers

shows that

something is

needed to

improve

productionquality.

Untrained

operators on unintelligent computer

systems will make

any

combination of values.

Inconsiderate

graphical choicescancom

bine

toruin acomputergenerated slide:

"garbage

in,

garbage out".

Professional

designers

need not

worry

about

being

replaced

by

automation.

Al

thoughartificial

intelligence may

protectthe sensibilitiesofthe

public,

a computercan

'Excerpt

from

areporton

AI

and

Expert

Syestems

by

Robert

Keough,

Rochester

Institute

of

Technology, Rochester,

New

York,

14 April 1987.

2

A

classic example ofa

dialog

processing

program

that

has

no

further

"intelli

gence"

than

for

conversation

is

ELIZA

by

Joseph Weizenbaum. (See Marion

Long,

"Turncoat

ofthe

Computer

Revolution,"

New Age

Journal.

December

1985,

pp.47-78.)

(5)

never

be

automated.

Artificial

intelligence is

anunusual, necessary,and

non-threatening

thesis topic.

For

an

MFA degree

however,

the

issues

are more

exciting

thanthe

imagery. While

AI

will

improve design

aesthetics,

the

best

effect will occurthroughsubtle coercion: and

since good

design is transparent,

artificial

design improvement

will

be invisible. There

fore,

the

best illustration

of

AI in

microcomputergraphics

is

oftheentire processandnot

the

final

effect.

The accompanying

exhibition

for

this

MFA

thesiswasmuch morea

dia

grammatical

illustration

thanan aesthetic masterpiece.

An

identical

illustration

ofthe

structureofa sample

dialog

with acolor smart program

is included

here,

aswellas a

sample conversational

interchange (see figs. 1 &

2.)

This

paper willcontinue toaddressthe

implications

ofthecombinationof artifi

cial

intelligence

and graphicsthroughanaccountofa

smart,

design

program.

The

listing

included in

thisthesis gives amicrocomputerthe

intelligence

toassist anoperator

in

(6)

C C3

t

CO

.|

cd

I

CD a.

t/3

(7)

'5

."5 -ij

c

a

o O.

'S

s

<-> t/3

S>-> S-l a c x>

cu i-i 3

(8)

THE MIDDLE

The

first

thesis

attempt at

joining

computer graphics and artificial

intelligence

was on

8-bit,

Apple

IIcomputers.

Simple

illustration

and

typography

programs wereen

hanced

witha

utility

that

learned

theuser's graphicalpreferences, andrelatedthe

knowl

edgethrough easieruse.

An introduction

to the

Autographix,

a

slide-generating,

com

puter

system,

suggestedthateven thesimplest

design decisions

can

be

based

on previous

interaction.3

This

thesis

's

programmanipulatescolor

in

titleslides

in exactly

thesamemanner

as

the

Autographix

system

but

with

intelligent

support.

Both

systems allowthe

inde

pendentspecification of color values

for foreground

and

background design

elements.

However,

the

Autographix's

closed architecture

inhibits

software

development,

so

AI

reasearch

had

to

be done

ona

different

machine.

An

IBMPC XTwasemployedtogener

ate

the

needed graphics withtheavailable

intelligence

programmability.

The

IBM

PC

is

a 16-bitmachine

based

onthe

8088

processor.

The

XTused

in

this

thesis

has

an80287math

coprocessor,

extended

graphics,

window

interface,

and a graph

ics

routine

library.

The

native

programming

language,

BASIC,

is

adequate

for

the

many

tasks addressed.

A

higher-level

language

(LISP,

PROLOG, C,

etc.)

would

have

allowed ac

celerationandsophistication,

but

notthe

simple,

flexible

andmethodical nature ofBASIC.

The

IBM

has its

goodand

bad

qualities

in

theresearch on artificial

intelligence

with graphics.

On

thegood

side,

the

extremely

open architectureofthesystem permits

the additionof mediumresolutioncolorgraphicsto

640

kilobytes

ofRAMand a20

mega-3The

Autographix

is

amicrocomputer

based,

slide production system.

The

equipmentallows

for

rapidproductionof

high quality

images

through the useof guide

lines

toaidthecompositionof

information

in low

resolution.

The data for

theslide

is

then senttoa

high

resolution

film

recorder.

(For

specifications see

the

Instruction Man

(9)

byte hard disk. The

hard

drive

contains: awindow

environment,

graphicsroutines,

languages,

DOS,

the thesisprogram and all

data files. On

the

other

hand,

these

many

concurrenttasks

do

not promote

easy development. If

one

utility

crashes, thewhole

system goes

down.

Even

though

it is

an uncompiled

language,

BASIC'S

hardware

residenceallows

for

high

execution speed and

indigenous

security.

While

the

language

supports standard

string parsing

instructions,

it has

no realenglish

language

control.

The lack

of

list

processing in

BASICrequires theconstantuse ofFIELDstatementstosupportrandom

access

files.

The

graphics

ability

ofthe PC

is limited

to sixteen

color,

640x480 resolution,

raster

display. Type-color

selection

is

pivotalto the program, andthoughthe IBM

does

not supporttheuse of

its

entire palette

for text,

a

supplementary

graphics

library

permits

thecreation of graphicaltype

in any

color.

All

theseequipment

details become secondary in

thepublic's need

for artficially

intelligent

software,

but

thesespecifications

have been listed here

to

define

the

many

factors

hindering

the

development

of suchprograms.

Just

ascolor

availablity is

crucial

to thisprogram's

development,

the

difficulty

in managing

graphics and

AI

is

criticalto
(10)

THE PROGRAM

The

next section of

this thesis

is

devoted

tothecareful explanation ofthe

central,

experimental

program,

MGI.

The

software was

developed for

theIBM PC XTandwhen

correctly

entered and

supported,

the

resulting

packagewill

be

an

artificially intelligent

color selection system

for

word slide production.

As

stated, the

recommended

hardware

is

an

XT,

but

theprogram will run unal

tered

on

any

IBM PC.

While

a

hard drive is

recommended,

it is

not

necessary

to the

operation ofthesoftware.

The

following

supplemental packages are also recommended

for

use oftheprogram: an

80286 coprocessor,

IBM DOS

3.10,

Microsoft

Windows,

and

Media

Cybernetics'

HALO.

With

alterations,

theessential algorithms of

this

program can

be

transported

to

any

computer.

To

make

the

listing

easierto

implement,

theprogram

structure,

including

the

line

numbers,

has been

typeset

in

the simplest possible

design. The

commands

remainthenative

BASIC

instructions,

but

areuniversaltoalmostall

programming

languages.

The accompanying

comments and remarks

normally included in

theprogram

listing

itself,

have been

removedto the

opposing

pages

for

easier analysis.

The

boldface

section

labels

arestructural

separators,

not

instructions. Given

theequipment restrictions

andexperimental

deadlines,

thisprogram

only

accepts and repeats

its

education onthree

color parameters

for

aword

slide,

but

withcareful

development,

thescopeof

the

package
(11)

MGI

program

Initialize programming

environment

ON ERROR

GOTO

3000

KEY OFF

Initialize

graphicalenvironment

GOSUB 4000

DEF SEG=&H3800

BLOAD

"haloi.bin",0

device$="haloibme.dev"

CALL

SETDEV(device$)

Initialize

constants andvariables

DIM

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

graphicalvariables

DATA

"background

color",

"copy

color",

"drop

shadow

color"

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=0

TO 5

READ

color(i,color)

NEXT

color

NEXTi

Declare

english names

for

colors

DATA

"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)

(12)

11

MGI

stands

for

Microcomputer Graphics Intelligence.

Initialize programming

environment

Before sending

instructions

to the

computer,

normalsystem errors must

be

trapped.

A

simple

fault

in any

unit can causethewhole systemtosieze.

In

thecase of

file

creation, if

an error

is

detected,

a new

file

is

created

for

thatsession.

Initialize

graphical environment

This

software utilizes

Media

Cybernetics'

halographics

library. The

addresses

for

each routine are

defined

in

hexadecimal

order attheendoftheprogram.

The

binary

functions

are

loaded from disk

resident

software,

along

withthe appropriategraphics

driver,

which

is

then

installed.

Initialize

constants and variables

Here

theprogram's parameters are

defined. Multiple

variablesare

declared

as

arraystoease repetitive processing.

The keyword "do

you

want"

is

stored as a

string

variable,

to

facilitate

dialog

handling. The default

color values

for

the

background,

foreground,

and

drops hadow

colors are

defined. The

textwindow's colors are setto the

defaults.

Declare

graphical variables

In

this

section,

theenglish names

for

the threecolorvariablesare

declared

and

stored

in

the

array,

VARIABLES.

Of

course,

theseappelations need not

be

english,

they

need noteven

be

words atall.

The

computerrelates

its knowledge

aboutthese andother

parameters

independently

oftheir

definition.

Declare

"expert"

graphics constants

The

term"expert"refers to the

fact

that these

colors,

once

declared

here in

com

puter

terms,

are

immutable.

Neither

thecomputer northeusercan alterthesevalues or

their

order,

without

affecting further

program use.

The

color values

have been

grouped

according

to the

controlling

color variables.

Declare

english names

for

colors

Again,

thenames ofthecolors are

completely

arbitrary,

in

that the stringsthat

replacethemcan

be any

alphanumericcharacters.

The duplicatation

ofcolornames

is

a

reflectionofthe

dual brightness levels

ofthe EGA

display

mode.

The last

eight colors are

high

intensity

versions ofthe

first. The

arrays

VARIABLES

and

COLORS

can

be

altered at

any time,

andwill

only

change subsequent

interactions

withno effect on

previously

stored

data. The

two

dimensional,

realnumber

array

COLOR,

should never

be altered,

(13)

Open

workstation

CLS

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

volume

100

OPEN

volume$

FOR INPUT AS #1

IF badfile THEN

CLOSE

GOSUB 200

i=0

INPUT

#l,file$(i)

PRINT

i,

"new

file"

WHILE NOT EOF

(1)

i=i+l

INPUT

#l,file$(i)

PRINT

i,

LEFT$(file$(i),8), RIGHT$(file$(i),3)

WEND

CLOSE

PRINT

i+1,

"quit"

PRINT

"

Which

"+doyouwant$;

INPUT

number

IFnumber=i-i-l

THEN

END

IF

number=0

THEN

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

(14)

13

Open

workstation

At

this point, the

program

becomes

separate procedures and

functions

of

loops

and subroutines.

This

section

is

the

log-on

routine

for

computer recognition.

The

user

enters

his

initials,

or

any

three

characters andthecomputeropens an account.

If

the

system

does

not

have

a clock on

line,

it

asks theuserthe

date. This information becomes

concatenated

into

a workstation accounttitle thatcan

be

organized

by

user,

date

or

both.

As

thissystem

is date

dependent,

theuserrenews

his

account

every

month.

Open

volume

The

account

itself is

a

list

ofthe user'sclientele and

job

titles.

Here,

updating

the

account

directory

onthe

screen,

is

the

first

part ofthe

infinite

loop

that constitutesthe

main structure oftheprogram.

All

subsequent

instructions

outsideofthis

loop

are sub

routines

for

this

loop. The first instruction is

toopenthe accountvolume, and

failing

that,

go to theroutinetocreate one.

Another

loop

is

initialized,

withthevariable 'i' asthe

increment.

A

nullclient

is

appended asthezeroth

client,

withthe titleof

"new file". The

client

list

is

thengathered

from

theaccount

by

theuse ofawhile

loop

that tests

for

theendofthe

file. Each

client/

job

title

listing

is

parsed and printed on screen, andthe

file

closed atthe

ith listing. The

ith

plus one

listing

becomes

anullclientwiththe

title "quit".

The

user

is

thenpromptedtoselect

from

the above menuof

titles. The

user's

choice,

stored

in

thevariable

'number,'

is

comparedwith thezeroand

ith

plus one

incre

ments.

If

the userchooses zero, theprogram

branches

to the

file

creationroutine.

If

the

userchooses

ith

plus

one,

theprogramexecutes acleanending.

Open

file

If

theuseroptstoneither createanew

file,

norterminate the

session,

then the

implied

selection

is

thenumberofthe

file

theuser wishes toopen.

If

this

is

true,

the

programopens theappropriate client

file,

andretrieves the

file's

colorparameters.

This

(15)

Display

selectedconstants

mode%=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=150

CALL

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=20

CALL MOVTCURABS(x,

y)

CALL SETTEXTCLR(colorl%,

color0%)

CALL

TEXT(text$)

INPUT

answer$

CALL

CLOSEGRAPHICS

CLS

GOTO 100

New

volume

200

OPEN

volume$

FOR OUTPUT AS #1

PRINT

#1,

"New

file"

CLOSE

#1

FOR

i=0 TO 2

OPEN memory

$

AS

#1

LEN=85

FIELD

#1,80 AS branch$,2 AS

yes$,2

AS

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)<10

THEN

color$="0"+color$

LSETbranch$=color$+doyouwant$+color$(color%(i))

PUT

#1,4

CLOSE #1

(16)

15

Display

selectedconstants

Once

the

client's color preferences are

determined,

theprogram

displays

them

using

the

graphics

library

that

was

loaded

at

the

beginning

of

the

program.

The many

CALLs

here

are

instructions

to that

binary

library. The

graphics environment

itself

must

now

be

initiated,

and

the

viewing

parameters adjusted.

The

screen

jumps

from

theopera

tional

text

defaults,

to

the

new graphics color

in

the

client's

file. The

coordinates

for

the

environment and

display

copy

are established

from default

values.

Of

course, the

entire operation oftheprogram could

be handled in

thisenviron

ment,

but

the

demand

onthe

library

to

handle

input

and outputwas toomuch experimen

tation

for

the

deadlines

of

this thesis.

The

graphics

library

supports

many

other variables

that

have

not

been

manipulated

here.

As

mentioned

before,

a more completeversionof

this software would

be

a more powerful graphical

tool, but

theneed

for

redundancies and

safeguards,

would make

the

fundamental

algorithmtoocumbersome.

Once

theprogram

has displayed

thevalues

for

thecurrent client

file,

it

waits

for

the

usertoacknowledgethe

display

witha

keypress. Upon

response,

theprogramerases

the

display,

and returns

to the

file

menu atthe

beginning

ofthemain

loop.

New

volume

Now,

theprogram structure

breaks down

tocomponent subroutines only.

This

procedure creates a new account

for every

new

operator,

or

for

a newoperationalmonth.

Command

control

is

routedto

this

routine

by

way

ofa

"file

not

found"

error.

If

auser

logs

onthat the computer

does

not

recognize,

oran old operator renews

his

account,

the

syntax oftheirnew accountwill so confusethemachine that

it

will

branch

to thisroutine

tocreate

the

necessary files.

In

additionto the client

file,

thissubroutine also creates three

memory files. Here

labelled

'i=0

TO2,' thesethree

files

represent

the

infant intelligence

oftheprogram.

Each

file

correspondstoa separate

field

of

experience,

where thename ofthe

memory

file

is

aconcatenation ofthe'ith' variableandtheoperators

initials.

Each memory file is defined

as arandomaccess

file

ofrecord

length

85.

The first

80

charactersofthe

file

are reserved

for

question and response

strings,

whiletheremain

ing

characters are

devoted

toaffirmativeand negative

branching

integer

pointers.

The

first

recordcontainsthe

data

ontheentire

file,

including

a recordtotaland a pointerto the

last

record.

Questions

are storedstraightforward, as an

interrogative

string,

withtwopointers

to

the affirmativeandnegative records.

The

answers,

whether yes or

no,

are stored as a

concatenationofthenumerical colorvalue,andtheprompt

for

thatcolor.

No

pointers are

included,

as these

branches

areterminal.

Once

the

initial query for

a changeofstate

is

recordedwith thenegative value of

the

default

stateandthestandard affirmative optionof

light

gray, the

file

is

closed and

theroutine

loops

on

to

nextcolor variable.

Once

all thevariablesare

declared in

the

infant

intelligence

ofthe machine,

the

routinecontinues to thenext set of

instructions

(17)

Append

volume

300

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)

PRINT

#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$,2

AS

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

yes

THEN

current%=CVI(yes$)

IF

no

THEN

current%=CVI(no$)

(18)

17

Append

volume

This

routinecan

be

branched

to

directly,

for

theaddition ofa new

file

toan exist

ing

account.

Once

thecomputer

has

a set of rote questions and pat

answers,

it

must now

apply

its

new

found

knowledge. In

this section,

theprogram switches

from

passive

file initiali

zationto

interactive

file

labelling.

The

computer asks

for,

and processestheclient and

job

titles.

These

values arethenwrittento theuser's account

file,

which

is

thenclosed.

Program flow

goes on

to

the

following

routine,

ratherthan

returning

to themain

loop.

New

file

The

next

step for

anew user

is

thecreation ofthe

data for

thenew client.

A

three repetition

loop

is

begun,

togather

information

aboutthenew client.

Each

ofthe three

memory

files

aboutcolorare retrieved andFlELDed.

The

secondrecord

is

gottenand

scanned

for

a

resulting

color.

If

the

branching

string

is

not an answerthen

it is

aquestion

andthe

string is

sentto the

interrogation

routine.

Depending

on theoperator's

response,

the

program

branches

to thenext

level,

orre-asksthe question.

If

theuser

satisfactorily

answersthe

question,

thepointerto thecurrent

branch

is

adjustedto thepointerspecified

in

therecord

for

thatresponse.

The

programthen

loops back

to the FIELDstatementand
(19)

Check

end of

branch

for satisfactory

color

600

no2=no

color%(j)=VAL(LEFT$(branch$,2))

branch$=RIGHT$(branch$,LEN(branch$)-2)

700

question$=branch$-GOSUB 2000

IF badanswer THEN

GOTO

700

IF

color%(l)=color%(0)

AND

yes

THEN

GOSUB 1000

GOTO 200

IF

yes

THEN

color$=branch$

CLOSE

NEXTj

Set memory

aside

for

learned

color

FIELD #1,80 AS branch$,2

AS

yes$,2

AS

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

structure

to

accommodate new color

FIELD #1,80 AS branch$,2 AS

yes$,2

AS

no$

GET#l,previous%

IF

no2

THEN

LSET

no$=MKI$(last%-l)

ELSE

LSET

yes$=MKI$(last%-l)
(20)

19

Check

end of

branch

for

satisfactory

color

Once

theprogram

has

gotten a

binary

responsetoacolorquestionthatcorre

sponds toanexact

color,

thenext

step is

toask whethertheselected color

is

whatthe

user wanted.

If

the

userwas giventhis coloras a response toa previous negative

statement,

then

that

result

is

stored

in

the

temporary

variable 'no2.'

The

numericalvalue ofthe

color andthequestion are stripped

from

the

string,

andtheprogram asks thequestion.

The

routine

branches

to theanswer verification

subroutine,

and returns.

If

theuser

does

not answer

correctly,

theprogram

loops back

and re-asksthequestion.

If

thechosen

color conflictswithprevious

choices,

then themachine

branches

toa

warning

andthe

usermust re-enter a

nonthreatening

color.

The

conflictwarnedof

here is

whenthe

copy

color andthe

background

color are

identical.

Any

expert rule thatcan

be

expressed

in boolean

or otherwise mathematical

terms,

can

be

added at

this

point.

Also,

this

is

a punishment methodof warning.

A

more advanced and active system

may influence

theusernotthrough

restriction,

but

through

suggestion.

This

would require a more extensive

diagnostic

system,

andwould

deviate

from

the

intention

ofthis thesis.

If

thiscolor

is

acceptableto thecomputerandthe

operator,

then theroutine

loops

to the

next colorvariable.

Set memory

aside

for learned

color

However,

if

thecomputer's

best

match

for

acoloratthis point

is

unacceptable to

the operator,

theprogramFIELDS the

first

record and

finds

outwhatthe

index for

the

last

record

is,

for memory

expansion.

The

values

for

the total and

last index

ofalltherec ords are stored

in

the 'yes' and 'no'

fields respectively

ofthe

first

record.

The necessary

adjustments are made

to

thesenumbers andthenewvalues arePUT

back into

the

first

record.

Adjust

binary

structure

to

accommodate new color

After

the

housekeeping

for

thewhole

file is

done,

thecomputer must

determine

where

in

the

binary

tree toplacethenext color.

As

the

last

value was

unsatisfactory, the

nextrecordmust

be located

relativeto theprevious

branch. If

theprevious

branch

was alsounsatisfactory, then

its

negative pointer

becomes

the

index

oftherecordthat

imme

diately

precededthe

latest

record.

If

thecolorthatthecomputerpresents

is

bad,

but

the

record

before

was good thenthe

index for

theprevious

branch

is

stored

in

therecord's
(21)

Display

available palette

800

CLS-FOR

color=0

TO 5

COLOR

color(j,color),7

PRINT

colortj,color);

NEXT

color

IFj=lTHEN

CLS

FOR

color=0

TO 5

COLOR

color(j,color),0

PRINT

color(j,

color);

NEXT

color

COLOR

14,1

PRINT

"which

color

"+doyouwant$;

ESTPUT

color

color$=color$(color):color%(j)=color

IF

color%(l)=color%(0)

THEN

GOSUB 1000

GOTO

800

Learn

preferred color

CLS

FIELD

#1,80

AS branch$,2

AS

yes$,2

AS

no$

PRINT

"why

"+doyouwant$+color$;

INPUT

question$

LSET

branch$=doyouwant$+question$

900

question$="is thistrue

for

"+color$

GOSUB

2000

IF

badanswer

THEN

GOTO

900

IF

no

THEN

LSET yes$=MKI$(current%)

LSET no$=MKI$(last%)

ELSE

LSET

yes$=MKI$(last%)

LSET

no$=MKI$(current%)

(22)

21

Display

available palette

Now

that thecomputer

knows

whattherelative

description

ofthe chosen color

must

be,

it

must

find

out

the

numeric value of

that

color.

To

facilitate

theselection ofthe

preferred

color,

thecomputer presents a selected menu of

its

native colors.

The

menu

is

limited

by

the

preset values

in

the

DATAstatement at

the

beginning

of

the

program.

These

predeterminedvalues representthepassive expertise ofthe system.

By

not

showing

the

user

the

entire rangeofmechanical

colors,

apoorchoice

is

more

difficult. If

the

operators wish touse a colorthat

does

not appear

in

the

menu,

they

must enterthevalue

for

that

color

blindly.

The

machine

only

provides assistance

for

rangesofacceptable colors.

In

the

case of

the

brighter

colorsofthe

foreground

copy,

a second palette

is

drawn

over

the

other paletteswhich

is

also representativeofthepreferred choices.

The

menu

is

very

simple

in

technique,

and restricted

by

thenative

ability

ofthe machine

to

display

all color values

in

atextmenu.

But,

the

display

is

a

very

goodex

ampleof

how

even a

little

expertise addedto thesystem provides

for

more efficient

production.

Another

expert

default

example

is

whenthecomputercompares theuser's color

withtheothercolor

variables,

for

conflict.

Here,

anactive

warning

system,

ratherthan a

passive restraint

menu,

is

employed.

Like

theearlier use ofthis

device,

theoperator

cannot

ignore

theadvice ofthemachine.

Learn

preferred color

This

program provides the

default

expertise,

but

more

importantly,

learns from

theuseofthepassive and active restraint whattheuser

really

wants.

Here

is

wherethe

program

really

exhibits

its intelligence. This

setof

instructions

asks

why

theuserchose the

color,

andgoesonto

verify

the

relationship

ofthe choice versusthecolor value.

What

is

not

immediately

obvious

is

thatan operator

has

the

ability

to choose a

valuethat

does

not

satisfy

aparticularqualificationthat thecomputer

learns. This is

distinguished

as acontradictionofthe

branching

statement,

andthepointer

for

the

learned

color

indicates

theretrograde

direction

ofthecontradiction.

This

action

is

specifiedas a

swapping

ofthepointers

in anything but

a negative

response.

If

thechosen color

is

correct,

relativeto the

learned

reasoning,

then theaf

firmative

pointer

for

thatvalue

is

placedatthe

index

ofthe

last

record,

and

the

negative

pointer setto thecurrent record.

If

thechosen color goesagainstthe

learned

reasoning,

thenthecurrentand

last

pointersare reversed.

In

either

case,

theapproriate

information

is

PUT

away in

the

preceding

record.

As

confusing

as therelationshipsofthe

branching

reasonand results

are,

the

binary

treeseemstoomechanicalto

be

classified as an

intelligent

process.

Regardless

of

the

automatic nature ofthe program, the

best

methodof

describing

the

routine

is

as a
(23)

Update

binary

logic

for

newcolor

FIELD #1,80 AS branch$,2 AS

yes$,2

AS

no$

colomumber$=RIGHT$(STR$(color%(j)),LEN(STR$(color%(j))))

IF

color%(j)<10

THEN

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

PRINT

#l,color%(i)

NEXTi

CLOSE #1

RETURN

Bad

design

warning

1000

COLOR

14,4

CLS

INPUT

"BAD

CHOICE",

answer$

RETURN

Check

binary

structure

2000

FOR

i=78 TO 1 STEP

-1

IF

RIGHT$(question$,i)=SPACE$(i)

THEN

text$=LEFT$(question$,LEN(question$)-i)

NEXTi

CLS

PRINT

question$;

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

"

(24)

23

Update

binary

logic

for

new color

Once

thecomputer

has learned

theuser's color

preference,

thenew

knowledge

must

be

committedtomemory.

The

associated colorvalue

is

set

in

atwo

digit

syntax,

and

then

concatenated with

the

'doyouwant'

string,

andtheenglish name ofthecolor.

The

new

string is

PUT

into

the

last

record,

the

file

is

closed,

and

if

there are no more

color variables to

learn,

the

next routine

is

run.

Append file

Once

theprogram

has completely

exhausted all colorvariables

for

the

job in

question,

the

learned

colors must

be

stored

in

theassociated client

file. The

operator's

account

files

wereclosed

in

the

last

routine,

leaving

plenty

ofRAM

for

theclient

file

to

be

opened,

andthevariablesprinted

into

thecorrect sequential

file. This

process

is

ac

complished

using

athreerepetitionFOR/NEXT

loop,

the

file

is

closed,

andcontrol

finally

RETURNed to the

mainprogram

loop.

Bad design warning

In

additionto

the

preceding

multipurpose

subroutine,

four

other procedures and

functions

existtoserve themain

loop. The first

oftheseextra routines

is

the

active,

bad-design

warning.

This function

interrupts

thenormal

interaction,

and

displays

ayellow

and red

warning

message.

The

operator removes the

display

with a

keypress,

returning

controlto themain program.

Check

binary

structure

Another

crucial

function is

the

input

andverificationof

binary

answers.

This

subroutine takesa

temporary

string

called 'questions' andtruncates the

trailing

spaces.

The

mainpurposes

for removing

superfluous characters are

making

the

string length

of

theuser's

input fit

the random-access, record

length,

and

facilitate

concatenation.

Once

the text

string is truncated, it is

printedonthe screenas a

question,

prompt

ing

further

user

input.

After

the

input

is

gathered

in

thevariable

'answer$'

the threestate

parameters are

initialized

at anull state.

The

variables

'yes,' 'no,'

and'badanswer' are

boolean

expressions wherethezerostate

is

off and

any

othervalue

is

on.

If

theuser

inputs

nothing, theprogramRETURNS witha 'badanswer,'

forcing

the

reasking

ofthequestion

'questions.'

Any

other

input

is

truncated

to

only

the

first

letter,

which

is

comparedwiththeupperand

lower

caseversions ofthe

letter

"y."

If

the

'an

swers

'

satisfies the condition, then the

boolean,

'yes'

becomes true,

elsethe 'no' case

is

(25)

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 addresses
(26)

25

Error

trap

Another

subroutine

is

theerror

trap

function

called

from

the

beginning

ofthe

program.

This

setof

instructions

is

criticalto the

development

ofthe

software,

for any

minor miscarriageofoperation could

completely

destroy

the

integrity

ofthe system.

Such

safeguards are

necessary in

the

multitasking

environment artificial

intelligence

and

graphics

demands.

Fortunately

such redundancies as errortraps also provide simpler solutionsto

repetitive problems.

The

prime exampleof

this

kind

ofalgorithm

in

thisprogram

is

the

useofanerror

trap

codeto

determine

if

a

file

being

called existsor not.

If

thiscode

is

encountered,

normal execution continueswiththenext

instruction,

which

in

thispro

gram,

is

a

file

creation

function.

If

theerror

is

ofsome other

program, system,

orme

chanical

problem,

program execution

is

halted

andtheerror code and

offending line

are

printed.

Graphic

library

routine addresses

The last

procedure,

starting

at

line

4000,

is

a

directory

ofthe HALOgraphical

routines.

While for

thepurposes ofthis

thesis

theprogram

does

not

strictly

require such

intense

graphics as

HALO supports,

any

other

incarnation

would.

The hexadecimal

addressesofthemachine

language

routines are

listed in

ascend

ing

order,

with

the

system's original names.

Certainly

Media

Cybernetics'

library

is

morethanadequate toreproducethe

features

and

functions

ofthe

Autographix,

but

the

purpose

here is

nottoproduce a competitive graphics

package,

but

to

demonstrate

the

feasibility

ofthecombination ofgraphics and

AI.

Including

theremainder ofthe

HALO

addresses would

fill

three more

pages,

but

more

signicantly,

programexecution would

be

endangered

by

the additional

functional

ity.

At

this

level

of

complexity,

operations

fail from

hardware

inadequacy

onetenth to

one

fifth

ofthenormal

logins. These

figures

are averagesofthe

switching failures

ofthe

program

in

random

disk

access,

graphics

addresses,

andprogram

instruction. The fail

urestake the

form

of

inconsistent

displays,

string

values,

oroutrightprogramcrashes.

The data

comes

from

extensive tests

beyond

normal

development trials,

and allows

for

(27)

Artificial

intelligence

andgraphics are

two

of

the

most

information-intensive

fields

of

the

computer

industry.

A

computer's sole purpose

is

to

process

data,

but

the

demands

of

graphics,

andenvironment

have

influenced

theshape ofthemachine atthe

microcomputer

level.

As

graphics programs

have become

larger

and more comprehen

sive,

the computer's architecture

has

expanded to

handle

the

increased

load. Microcom

puters can now mimic

multitasking

by

performing

many

simple

tasks

in very

rapid

succession, but pairing AI

and graphics requires such

tremendous

switching

in

the serial

operation ofthecomputer

that

the two

fields

are

nearly mutually

exclusive.

The

use of mass

memory

storage andsophisticated

hardware

and software

inte

gration

have

expeditedthe attempted

wedding

of

AI

and graphics.

The

use ofcoproces

sors

improves

computational

speed,

but

by diverting

serial

execution,

not

by

distributing

parallel

instructions.

The

single

information

channel

in

microprocessors

just

cannot

support artificial

intelligence

and computer graphics.

A

smart,

graphics microcomputer

must

be

a

true

parallel

machine,

or a symbiosisof

many

dedicated,

serialmachines.4

Must

a computer

have

graphics and

intelligence?

As

mentioned

before,

a

longitu

dinal study

of a classofart and

design

students offers someproofthat

AI

is

necessary.

In

an

initial

questionnaire

(see

fig.

3)

to

the

entire

population, only

six of

fourteen

com

puter graphics students

(42%)

made color choices

for

word slides

that

did

not conflict

withaccepted color

interaction

theory.5

At

the endofthe

class,

the studentscould effec

tively

operate the

equipment,

but

theiraverage

for

thequarter

only

roseto

57%

(

73

acceptable choices of127 total

slides)

in

a controlledobservation.

4

See

the section

"Limitations

ofa

Serial

Machine",

in

Understanding

Computers:

Artificial Intelligence. (Alexandria: Time-Life

Books, 1986),

pp.

104-110.

5Additional

rules

for

correct color

determination

and usage were adapted

from

Joseph

Alber's

The Interaction

of

Color.

(New

Haven:

Yale

University

Press,

1975).

(28)

28

The Autographix's

guidelines

have

evolved toenforce theuseof

bright

hues,

es

pecially

yellow,

on

dark backgrounds (i.e.

blue,

green,

black)

with

dark, black,

or no

drop

shadow.6

However,

thestudents continuedtoplacecomplementary

hues

of

copy

and

drop

shadowsofthe same value upon

high

saturationbackgrounds.

Given

mechani

cal colortemplates andprior

knowledge

of color

theory, nearly

half

ofthesubjectsstill

did

not produce

quality images

afterthreemonths of

instruction. When

experienced

graphics studentswith

dedicated

equipment

misapply

color, thecomputermust assume

more

responsibility for

that

information.

Perhaps

thepresent

low

demand for

artificial

intelligence

supportcannot

justify

overcoming

the

difficulties

of

implementing

algorithms atthemicrocomputer

level. Cer

tainly

theproliferation of graphical

information has

promoted areorganizationofthe

media

involved,

but

thetoolsneedtoassume more

responsiblity for

the

data

they

supply.

Bad design

affectsthe

legiblity

of

information,

and

if

acomputer can

learn

theoperator's

preferences andgovern themwithregardtogood

design,

the

designer

will

be free

to

be

more

innovative

withthat

information.

6Software

templates and rules of

thumb

for

equipmentuse arewell

documented.

(29)

AUTOGRAPHIX

COLOR QUESTIONNAIRE

As

you preparetomake yet another

Autographix

slide,

you'll pick your

predominant colors

from

the

many

possiblecombinations.

When

you

finally

make

those

decisions,

please recordthem

here.

1)

What

background

color

did

youchoose?

2)

What

type

color

did

you choose?

3)

What

drop-shadow

color,

if

any,

did

you choose?

If

thecolors you

just listed

are

anything like

the colorguidelines

listed

below,

please circleyourchoice.

BU1W GN1W BR1W BK1W

1)

Background Dark

Blue

Dark Green Dark Brown Black

2)

Type

Light Yellow

Light

Yellow

Light Blue-Green

Yellow

3)

Drop-shadow Black

None

Dark Blue-Green None

If

your color choices

don't

match

any

ofthese

guidelines,

why

did

you choose

the colors you

listed

above

(i.e. "I like 'em

for

their warmth.",

"They

look

earthy."

or

"These

colors

best

match the manufacturer's PMS colors.")?

If

you caretovolunteermore

information,

please record

any

other

kinds

of

color/type relationships.

What

colors

did

you use

for

the

copy,

bullets,

legends,

etcetera?

If

thecolors represent someabstract

(non-design

related) choice,

what

is

thatscheme?

Are

they

picked

for legiblity? Is

thereacoloryou'd

like

to

use,

that's

not

in

thepalette?

How

muchofthecolor

do

you

use,

that

is,

how's

yourtype weight

versus color

density?

(30)

BIBLIOGRAPHY

Albers,

Joseph. Interaction

of

Color

New

Haven:

Yale

University

Press,

1975.

Bolt,

Richard A. The Human Interface. Where People

and

Computers Meet. Belmont:

Lifetime

Learning,

1984.

Brand,

Stewart.

The Media Lab. Inventing

the

Future

at

MTT. New York:

Viking,

1987.

Comfort,

Alex.

Reality

& Empathy: Physics. Mind,

and

Science

in

the

21st Century.

Albany: State

University

of

New York

Press,

1984.

Edwards,

Betty.

Drawing

onthe

Artist Within. New York: Simon

and

Schuster,

1986.

Godman,

Arthur. Barnes & Noble Thesaurus

of

Computer 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

of

Technology,

Rochester,

New York.

Reports

andconversations,

1986-1988.

(31)

Long,

Marion. "Turncoat

ofthe

Computer

Revolution."

New

Ape,

Journal.

December

1985:

pp.

47-78.

Mishkoff,

Henry

C.

Understanding

Artificial

Intelligence.

Indianapolis:

Howard

W.

Sams &

Co.,

1985.

Schank,

Roger C.

and

Childers,

Peter

G.

The

Cognitive

Computer:

On

language.

Learning,

and

Artificial

Intelligence.

Reading:

Addison-Wesley Publishing, Inc.,

1984.

Shirai,

Yoshiaki

and

Tsuji,

Jun-ichi.

Artificial

Intelligence:

Concepts.

Techniques

and

Applications.

New York: John

Wiley

&

Sons,

1982.

Whitney,

Patrick,

ed.

Design

in

the

Information

Environment. New York: Alfred A.

Knopf,

1985.

Wiersma,

William. Research Methods in Education: An Introduction. Boston:Allyn &

Bacon, Inc.,

1986.

Wilson,

Stephen.

Using

Computers

to

Create Art. Englewood Cliffs:

Prentice-Hall,

1986.

Instruction Manual. Theory Manual. Reference Manual. Waltham: Autographix

Inc.,

1982.

Understand!

ne

Computers: Artificial Intelligence. Alexandria:

Time-Life

Theses Thesis/Dissertation Collections

References

Related documents