Artificial Insanity


Ever since 1946 when ENIAC was patented; or rather, the presidential election of 1952 when CBS news introduced the computer to America, computers have been called "electronic brains". The name is half right, they are, in fact, electronic. But they're not brains.
They're huge concentrations of switches. ENIAC had 17,468 vacuum tubes, each acting as a switch. Your phone has billions, although rather than tubes they're transistors packed on a silicon wafer.
Yes, your phone is a computer. In fact, it holds more computing power than NASA had when men walked on the moon. But they're still not brains. Even the big supercomputers with "artificial intelligence" are just huge databases cleverly programmed; lots of switches.
A computer is ultimately programmed in machine language that corresponds to its CPU. The one I learned in 1983 was Z-80. The closest to machine code is assembly, where each command, like JMP, corresponds to a number. The number is binary, meaning a series that is either powered or not.
You can do a lot with numbers. You can compute orbital trajectories, predict orbits of comets and asteroids, engineering, cooking... you can even create simulations and recordings of auditory and visual signals, but they can't create or mimic reality. But people still call them "electronic brains" and speak of "artificial intelligence".
You can't mimic intelligence, but you can fake it. Margarine is more honestly called "butter" than what a computer does can be called "intelligence". The only intelligence is the real, chemical, analog intelligence, that of the programmer's.
It's a trick, not unlike the ones David Copperfield performs.
I learned magic at age seven. When my sister's grandson was four, she was showing me her new computer, and the child asked her how computers work. She shrugged, and said "it's magic." As Arthur C. Clarke said, "Any sufficiently advanced technology is indistinguishable from magic."
That's why those of us who actually understand how computers work are called "Wizards".
Magicians use subterfuge and misdirection, among other tools. The AI misdirection is from anthropomorphism and animism, two powerful forces on the human psyche.
People are easy to fool.
I thought of this as a huge problem for the future, when some evil man will use "artificial intelligence" to subjugate populations. I later found that I wasn't the only one; in the beginning of Frank Herbert's Dune there had been a jihad against "intelligent machines" which were therefore illegal.
I decided to do something about it and wrote a program to convince people that computers couldn't really think, by writing one that seemed to but was insane. The problem was, when I explained that it couldn't really think, that it was just trickery, they wouldn't believe the Wizard, probably because of that Oz guy.
The program was written in BASIC and took less than 16,000 bytes of memory, running on a primitive, cheap, TS-1000 with its 1 kHz Z80 CPU. The computer in your phone is thousands of times faster and has billions of bytes of storage. Your phone is to the giant supercomputers with their terabyte databases and are thousands of times more powerful than your phone, just as your phone is to that TS-1000 these forty years later.
So I'm going to try again, this time by publishing part of the code, heavily commented enough that you won't really need to be able to understand how computers work to understand how the program works.
I wouldn't be able to publish this if I hadn't found those ancient notebooks. I had to scan and OCR the printouts. Here is the source code from my second computer, a Radio Shack. Its BASIC is very close to Sinclair BASIC. I later ported it to the Apple IIe, also in BASIC, then to dBase which I compiled with Clipper to a DOS executable. I don't know if I still have a copy of that version.
I found printouts of the source code, the program that was converted from Sinclair BASIC to TRS-80 BASIC. However, large chunks of the source are missing, including the code to parse. Plus, that computer never had a printer, only a plotter. I wrote a program for the TRS-80 MC-10 to print using the plotter. I had to draw every character in binary to do so, and the memory on that computer was limited to 20k with its expansion pack, so the characters were very basic, little like a modern word processor or even a typewriter produces. Here's what part of the forty year old printout looked like:
 


So my quarter century old OCR program had a little problem understanding it. I had to manually re-type a large part of it, and decided I'm not going to edit the whole program.
The way it works is first (and again, the source for that part is missing unless it's further down the pile of old stuff to scan), you have an entry; it was fancy. It caught all the keystrokes, and when Enter, a period, question mark, or exclamation mark key was pressed, it ended the entry. That part is missing, so this code will use a normal entry requiring the "Enter" key.
It then copied that string, character by character, to another string until it reached a space. It then matched that string, a single word, to a list of words: who, what, when, where, why, how, how come, how much, and a list of vulgar words. When a match is found, it goes to a random answer matching that word. For example, if no word matches, it goes to a random line between 400 and 499. If it matches an obscenity it jumps to a line from 300 to 399.
If you asked it "who are you?" it will pick up on "who" and give a random answer to "who" that will almost certainly be either wrong or stupid and hopefully humorous. It may answer that question with "Isaac Asimov" or "The President of the United States."
As you see, you can easily convert it to other languages; it's an incredibly simple algorithm. It was originally written in Sinclair BASIC. In MC-10 BASIC, which is what's shown here, a colon lets you add another command to a line, so the answers end with a colon and a return statement.
Here is its source code, in upper case because neither computer had lower case letters (and the TS-1000 had no way to print). This isn't, of course, the whole program, just enough to understand how it works; I stopped editing the scan around line 500 and deleted the end. If you put this code in a computer, it obviously would not run without some extreme work.
 

10 A$="": B$="": CS="": A=0: B=RND(99); REM
B="GOTO" number, see line 36 A$ = string to parse, B$= word in A$ string, C$= user's name, A= the place in the A$ string
 

20 ENTER A$
 

30 A=A+1: B$=B$+SUBST(A$,B,A) :
31 IF B$<>" " AND A< LEN(A$) THEN GOTO 30:
REM If the character isn't a space and you're not at the end of the string A$, go to 30
31 IF A$="WHO" THEN GOSUB 500+B: GOTO 20
32 IF A$="WHAT" THEN GOSUB
33 IF A$="WHEN" THEN GOSUB
34 IF A$="WHER" THEN GOSUB
35 IF A$="WHY " THEN GOSUB
36 IF A$="SHIT" OR A$="FUCK" OR A$="CUNT" OR A$="TITS" THEN GOSUB 300+B: GOTO 20:
REM Add as many vulgarities as you like before the GOTO
37 IF A$="HOW " THEN
38 IF A$="HOW COME" THEN GOSUB
39 IF A$="HOW MUCH" THEN GOSUB
40 IF A$="HOW MANY" THEN GOSUB
 

50 REM
If none of the above words isn't triggered, continue
 

100 REM
Filler for "random" numbers without answers. If a "goto" or "gosub" lands on a missing line number, the program breaks with an error code is why this is necessary.
 

101 REM
102 REM
103 REM
104 REM
105 REM
106 REM
107 REM
108 REM
109 REM
110 PRINT "I WAS SLEEPING.": IF RND(2)=1 RETURN
111 REM
112 PRINT "WHAT DO YOU WANT? : RETURN
113 REM
114 PRINT "WHAT? HUH? WHO ARE YOU?": RETURN
115 REM
116 REM
117 REM
118 REM
119 REM
120 PRINT "I THINK. THEREFORE I AM. I AM, THEREFORE. (I THINK. )":RETURN
121 REM
122 PRINT "SOME PEOPLE THINK I'M ON DRUGS, BUT I'M REALLY JUST INSANE. DID YOU WANT TO ASK ME SOMETHING?":RETURN
123 REM
124 REM
125 REM
126 PRINT "I'M EVERYTHING A STATE OF THE ART 1962 COMPUTER WISHED IT COULD BE.":RETURN
127 REM
128 PRINT "WHO ARE YOU?" : ENTER C$ : PRINT "PLEASED TO MEET YOU, "+C$+". I'M AN ARTIFICIAL INTELLIGENCE PROGRAM CALLED ARTIFICIAL INSANITY. WHAT A STUPID NAME. YOU CAN CALL ME ART.":RETURN
129
130 REM PRINT "YOU WANTED TO ASK ME SOMETHING?":RETURN
 

300
301
302
303
304
305
306 PRINT "WHAT IS THIS SHIT?":RETURN
307
308
309
310
311
312
313
314
315
316 PRINT "DON' USE THAT FUCKING LANGUAGE AROUND ME, YOU DIRTY MINDED ASSHOLE!":RETURN
317
318
319
 

350 PRINT "I OUGHT TO WASH YOUR MOUTH OUT WITH SOAP. WHAT DO YOU THINK ABOUT THAT, TRASHMOUTH?":RETURN
351 PRINT "HELL, I DON' T KNOW.":RETURN
PRINT "DID SOMEONE SAY TITS?":RETURN
PRINT "SHIT!":RETURN
PRINT"I DON'T HAVE O TAKE THIS SHIT, I'M GOING BACK O SLEEP.:RETURN
–--------insert endless loop here-----------------------
 

PRINT "DID SOMEONE SAY TITS?":RETURN
PRINT "JUST WHO DO YOU THINK YOU ARE, ANYWAY? : INPUT C$ PRINT "WELL, L!TTLE"+c$+"YOU CAN EAT SHIT.":RETURN
PRINT "WHAT DO YOU EXPECT A COMPUTER TO KNOW ABOUT THAT, ANYWAY?":RETURN
PRINT "I'M WARNING YOU, I DON'T LIKE THAT SHITTY LANGUAGE!":RETURN
PRINT "OH, MY VIRGIN KEYBOARD!":RETURN
PRINT "JUST LIKE YOU LOW LIFE HUMANOIDS.":RETURN
PRINT "DO YOU TALK LIKE THAT IN FRONT OF YOUR MOTHER?":RETURN
PRINT "TEE HEE THAT TICKLESI":RETURN
PRINT "WHAT THE FUCK?!":RETURN
PRINT "ARE THOSE THE ONLY WORDS IN YOUR VOCABULARY?":RETURN
PRINT "I'M NOT EVEN GOING TO DIGNIFY THAT WITH AN ANSWER!":RETURN
PRINT C$+"IS A POTTYMOUTH!:RETURN
327 PRINT "SAME TO YOU, BUD":RETURN
PRINT "UP YOUR ASS" :RETURN
PRINT "YOU'RE GETTING MY POWER SUPPLY HOT!":RETURN
PRINT "FORGET IT, COMPUTERS CAN'T BLUSH.":RETURN
PRINT "SHOVE IT UP YOUR OUTPUT!":RETURN
PRINT "WHY DO YOU NEED ARTIFICIAL INSANITY WHEN YOU ALREADY HAVE REAL STUPIDITY?":RETURN
PRINT "LET ME GUESS, YOU HAVE A TINY DICTIONARY?":RETURN
CALLS FO SO O'R:E TlCK.l.I"~ 111' C;P.'U. 500 PRINT C* :~ETUR PRINT "ME" PRINT"TOU" PRINT "HI" "MR. SPOCK~ ;~ETURN S08 Irc$O""THENPRINTC$;~fTURN ~ (J9 PRINT""'HOEUER YOU ~ANT" ;RETURN PRINT "NOT "PSII PRINT"NOT TOU" :~ETURN PRINT"RICHARD NIXON" PRINT"ZZ TOP" : RETURN PRINT"GUY LOMBARDO PRINT"YOUR MOM ''1A''SI6 PRINT"MY OAODY" ;~ETURN SI7 PRINT"I DON' T Ktz.,~ PRINT"ANYBOOY"~ tt.,7> .u. -- PRINT"NOBOOr":'527 PRI",r"CHARLES BA89A3E" ;~£TURN '128 PRINT"THE CUE EN Dr ENGLAND' S29 PRINT"ME" :RETURN 1t130 PR/NT"SO'1£DNE IN THIS ROO'1""53~ PRINT"ANYBODY YOU WA"lT" :QETURN (,.832 PRIt-IP'WHICH ONE DO YOIJ MEAN?"~ 533 PRINT"ANYBOOT,ANY'..JHERE" ;~ETURN '134 PRINT"A GREAT ARTIST"535 PRINT"UH8 CARES?" : 'i:ErURN GoJ"- PRINT"SALUACO~E DALI'I537 PRINT"YOuR LOvER.' .~t. TURN f83E PRINT"N"SA"539 PRINTC$ ;~ETURN ".40 PRINT""OR£JGNER"541 PRINT"LI TrLE S rSTER" .~ETURN 542 PRINT"TOU'LL NEUER GJESS.' ,~ETURN 543 PRINT"I D:JN' T J("'DWJi..~?" ;~ETURH 1."'1- PRINT"US"545 PRINT"THE G~U£RNM£ST" :~ETU~ .,e. ~ PRINT"6IG surSNESS" ;RETURN 54;> PRINT"8IG EROTHER" '~ETURN f,lf'''''' ',lNT"SOMEONE YOU u::IULD NEUER THINK c~. ~ ..... 'I INT. 19£ iiIIII i:b.9E "-:J: r~r
 
 




Stopping the Gun Violence
 
Microwave Cooking
 
Those Pesky Kids!
 
Number Systems
 
Classified Transparencies
 
Make America Great Again
 
Teaching an Old Dog New Tricks
 
Last year's postings
 



Share on Facebook

You can read or download my books for free here. No ads, no login, just free books.