Friday, May 29, 2026

My History With AI


 I've been interested in making computers think for most of my life.  I have spent a lot of time thinking about how to evolve intelligence in a computer.  I have an interesting thought experiment that I will go into below.  It probably has some potential, but I haven't worked out a real practical way to make it work yet.  Maybe now, with the help of AI coding I would be able to make some real progress on that idea.  Before coming up with that idea, I made several other attempts at creating intelligence and evolving traits on a computer.

The first two things I built were a chatbot and a life/ecosystem simulation.  These were both in the late 90's or early 2000's and I can't remember which one came first.

I'll start with the chat bot.  I built a simple chat bot in Perl in the late 90's.  It started with no knowledge.  You would type the first message and it would repeat it back to you.  With each message you sent it would split the message up into words and keep track of what words came after other words, and what words could be used to end a message.  After a few messages back and forth it would sometimes start to seem like you were having a real conversations.  Usually after some more time interacting with the bot it would start outputting very long messages that didn't make sense.  At that point it was usually best to wipe its memory and start again.  I'm not sure if I have the code for that still.  Maybe if I do I'll try to put it up somewhere.  

Either sometime shortly before or after the chatbot I wrote a simulation in C++.  The simulation had a couple of different types of creatures that would chase each other, eat each other, and reproduce. With each generation they would change some properties, so they would "evolve" slightly.  I may still have this code, but it is hard to setup an environment where I can get it to compile.  I produced two newer iterations of this written in JavaScript.  One I called the Fish Game.  The other one the Life Game.  These were written in the mid 2000's.  They are not based on the C++ code at all, they are a rewrite of the same concept.

After the Life Game, or even while developing it I thought a lot about how to make evolution work in a computer program.  What I kept coming back to is that you have to setup rules or constraints on the life that you create in the program.  This seems to limit how much it can evolve and what sorts of results you get.  You could make more and more complicated systems that allow the creatures to change in more ways.  This would produce interesting results, I'm sure, but it doesn't seem like the best direction to go in. 

Thinking along those lines brought me to my thought experiment for evolving intelligence in a computer.  There are a lot of details to this that don't work, but I still think it is an interesting concept.  What I wanted to setup was the most simple system that I thought could create life and eventually intelligence.  I wanted the rules to be inherent in the system.  No hard limits programmed in.  This seems to be the only way to get true intelligence out.  What I came up with is this.  You write a program that makes a copy of itself and reruns the program.  You build in some ability for random change to happen.  You setup a computer with internet access, then start the program and wait for it to make contact us.  The idea is that it would eventually through trial and error, learn internet protocols, read information on the internet and try to make contact with us.

I'm sure you can immediately see at least one major issue with this idea.  One issue is that making random changes to a computer program and rerunning it will in most cases result in a program that will not run.  There are some things we could do to mitigate this issue.  With most programming languages it isn't even clear what making random changes means.  You can't just randomly add if statements or new blocks of code.  I'm thinking the code would need to be written in assembly language.  This still doesn't solve the problem, but it might make it a little more likely that random changes wouldn't completely break the program.  Another solution I came up with is to automatically role back to the previous generation if the current one fails to run.  We could also run multiple versions at the same time and the ones that fail would just be the ones that die.  This would require increasing computing power as the number of running versions multiplied though.  I might write another article about this thought experiment at some point.  There are several interesting things to consider.

A few years after the fish and life games I started looking into some of the early AI being done with python.  I started playing with a library called Scikit learn and eventually Tensor Flow.  I don't think I ever got to the point where I really understood those, but I was able to run some examples and make changes to them.  Here is an example of some of that work.

At some point I got the idea that building my own model of a neural network in JavaScript or Python would be fun.  I have started that project 2 or 3 times but I somewhat ironically didn't get it working until I had an AI coding assistant built into my ide.  Here is a working neural network.  It is very inefficient I'm sure, but it can be trained to do math or word prediction and it seems to work.  I have 2 other repos that are python projects related to AI or chatbots in some way.  One is here and the other one is here.  The first one doesn't work as far as I can tell.  I don't remember where I was at with it.  The second one works as a simple chatbot.

I had seen news and Youtube videos about GPT-1 and GPT-2, so I was pretty interested when GPT-3 and ChatGPT came out.  I played around some and then started working with the api when it became available.  I don't remember how soon they had that.  I built a command line tool that would put the response from ChatGPT into my clipboard.  This was useful when asking code questions since I would usually just be copying the response anyway.

I think that is enough for this article.  After that the current era of AI began and everyone started using it.  I'll have to write another article about what I have done since then.



My History With AI

 I've been interested in making computers think for most of my life.  I have spent a lot of time thinking about how to evolve intelligen...