Showing posts with label Computer Magazines. Show all posts
Showing posts with label Computer Magazines. Show all posts

Thursday, 7 June 2012

Adventure Game - Practical Computing August 1980

I mentioned previously that I used to love reading computer magazines back in the 70s and 80s.

My all-time favourite article appeared in Practical Computing in August 1980. It was written by Ken Reed and was entitled:
Adventure II - an epic game for non-disc systems

There were a number of things I liked about the article:
  • It explained how text adventure games worked (objects, locations, verbs, timers, etc.)
  • It was full of intriguing example commands like "RUB LAMP" and "UNLOCK GRATE"
  • It presented the program code in a "pseudo-code" based on Assembler
  • It explained how the required data would be stored, separate from the code
I liked the magazine cover too, with its winged horse, witch, castle, wolf and intrepid adventurer. You can see it below.

One of the things I disliked about the article was that it did not include the data that would be required for a proper game. Instead, it provided an "engine" that could power a number of games, given the right data.

You might expect that subsequent articles would produce the data that would be needed for real games. But I never saw any. Of course the flaw in this thinking is that many of the surprises of the game would be ruined if you were required to enter strings such as "Someone has leapt out of the shadows and bitten my neck!!!!"

You will find links to the text of the article here. Enjoy!


Monday, 4 June 2012

Artificial Intelligence - Tac-Tac-Toe

I have discussed two AI programs in recent posts. Eliza seems to "respond" intelligently to conversation. Animals can "guess" an animal by asking a series of questions and can "learn" about new animals.

Aside: It is difficult to discuss AI without personifying either the computer program or the computer itself. I have and will continue to do this in this posting!

The program I am discussing in this posting can also "learn". But it does not need the user to "teach" it. It learns by doing.

The program appeared in the September 1979 issue of "Practical Computing". The issue has a particular focus on "The Intelligent Computer" as you can see from the cover below.

The article in question was "Noughts and Crosses" (Tac-Tac-Toe) and was written by Trevor L. Lusty.

It featured a program written in BASIC which could "learn" how to play the simple game.

The clever thing about the game was that the code told it how to recognise a win, lose, or draw but not how to attack or defend. It learned this by playing.

Here is an example of a game which I (the human player was always given X, although each player took turns to start) could win in 5 turns:

As you can see, the program had no idea how to defend against my attack. In fact it just plays in the first available square each time. It would immediately spot that it had lost however and would display the following message:
"I concede --- You win --- I'll try harder next time"

What it would do behind the scenes was to recognise that the move it made in turn 4 was a mistake and to record the fact that it should not make that mistake again.

So starting a new game and repeating the same moves would result in it making the following move in turn 4:
Obviously this move is no more effective that its previous attempt so turn 5 sees me winning again.

But again the program records its mistake.

Repeating the game over and over sees the program modifying its strategy until it finally blocks the attack and the game moves on:


In this way the program would get better and better, and harder and harder to beat!

But the really clever part of the program was how it would learn not to make moves that would lead it into a no-win situation. My next move shows such a situation (with my next winning moves highlighted):
The program would try blocking those two moves (and then try all other blank spaces) before "realising" that this was a no-win situation. It would then deprecate its previous move (the block it made in turn 4). At this point it would recognise the situation illustrated in turn 3 as a no-win situation. This means that the next time this arose, it would flag the move it took in turn 2 as being a mistake and it would start to try alternative responses to my move in turn 1.

Genius!

Aside: when I first read the program back in 1979 (age 17) I could not understand the piece I have just tried to explain. So the happy message I take from this is that it shows that we DO become smarter with age and experience!

The program was interesting to play as you could see how it adapted to your strategy (how it became "smarter").

The author himself observed in the article that you could modify the program so that it would play itself a number of times before engaging with the user. In this way it could do the "learning" on its own and be ready to give the player a good game from the outset.

Tuesday, 11 October 2011

Early Computer Magazines

In his book "Outliers: The Story of Success", Malcolm Gladwell produces examples to back up a theory that 10,000 hours of practice are required to become proficient at a complex task. He stresses the importance of getting the opportunity to complete the 10,000 hours of practice. If you work 37.5 hours a day for 52 weeks a year then this equates to over 5 years of experience.

He uses Bill Gates as an example. Bill has access to a computer terminal connection to a remote mainframe computer in 1968 when he was in the eighth grade. He says: “From that moment forward, Gates lived in the computer room”. This was an exceptional opportunity for a young boy in 1968.

When I became interested in computers, the first part of my 10,000 hours was limited to books and, more importantly, computer magazines. I started out with Electronics Today International (ETI). I thought I was going to be interested in electronics until I discovered the microprocessor! Then I began to buy specialist computer magazines (with ETI at first and then instead of it later). My favourites were Personal Computer World (PCW) and Practical Computing. I read each issue from cover to cover. I still have many issues in my attic to this day.

I learned computer languages by reading program listings (hard to believe for people discovering computers today, but magazines in those times would include long program listings – generally written in BASIC – and people would enter these programs into their own computers). So these program listings were my Rosetta Stone. And all of my programming was done on imagined computers (we would call them “virtual” computers today!). I remember going on a holiday to my cousins in Co Derry and borrowing a book from the local library there on programming in Fortran. So I was able to add the ability to read (I have purposely selected to use “read” rather than “program in”) Fortran code during that holiday.

My first access to a real computer came when I got my own Apple ][ computer in 1978. Then came the process of changing from being able to read programs, to being able to write them! I would equate this change to the difference between learning the theory of driving a car to the actuality of being behind the wheel!

Here are some links to information about the magazines I have mentioned above:
Early UK Computer Magazines
PCW Covers
Practical Computing Covers