Sunday, May 25, 2008

Another Kind of Love

One thing Gloria, may she be resting in peace, always told me was that I always seem to have a great number of irons in the fire. I never did like just working on one thing at a time. Certainly I have my main project at any given time, just like the novel is now, but I always seem to have smaller projects on the side.

For instance, I spent a few days working on math. Granted, that was a couple of weeks ago and I didn't expect to make any real progress on the problem, but it is always good to revisit such things from time to time. I have also been working on watching all those Stargate episodes. They are getting cumbersome, but I am beginning to see daylight in the stack. I am getting close to the end of the 8th season. That makes a little better than two to go.

Last night,I couldn't watch anymore Stargate, so I started another new side project. It has kept me from getting any writing done for close to two days, so this week will undoubtedly look bad on paper. That is, if one considers just raw numbers. But I am giving myself a little leeway since the first novel was just completed. Knowing myself, I will likely lolly-gag until after Kim leaves from her visit next week. I'm okay with this. Hopefully you guys are too.

Anyway, one of the topics I come back to time and again is programming. I find that it amuses me to work my problem solving skills in a different formal language other than mathematics (or English for that matter). I don't usually give it top project status, but the last time I dabbled in Java was about three years ago. I programmed a board game that I had played in an arcade when I was in high school. Yes, they actually had arcade board games. It was a relatively simple game and I had previously programmed a version just after I finished a programming class while still attending Hobart College. Yes, that means I did it for fun and not as a class project. The class project, I programmed a Tic Tac Toe game that my friend John claims to have beaten, but the only way that could be possible was if he was using an outdated or corrupted version of Java. I programmed it to be unbeatable.

Anyway, I called the game Complexity and I was never happy with the original version, so after breaking up with Rebecca, I programmed a new version from scratch. (I used it as a tool to take my mind off the break-up. It didn't work very well.) It had been seven years since the last time I had done any programming, so I had to reteach myself everything. The new version kicked butt if I do say so myself. I spent about 10 days on it. Working anywhere from 10 to 18 hours a day. I can email it to anyone who wants it, since I used a tool to make it into an executable. The artificial intelligence (AI) I made for it, will beat me more than half the time. Of course, in studying the game to create the AI, I believe that if I ever try to program the game a third time, I will be able to make an AI that I would have no hope of beating. Strange how that algorithm is still in my head and I have continued to work on it these past three years.

I continued working on that project for more than three weeks. I took the game up a notch in the next iteration so that each time you beat the game, a new rule was added, and the game would get more complex. One of the reasons I named it complexity. The most interesting thing about that project was that I used the same AI algorithm for all the levels. In other words, the computer never considered the new rules when it computed its moves. It played as though it were still playing the base game. At the higher levels, the AI was just as tough. I found it an intriguing experiment in game theory. Basically, the lesson I learned from studying these types of games along with the AI, was to determine the main focus of the game, make your strategy, and then keep your eyes on the prize. That is, most rules are often there to distract you. A lesson I try to carry on in my day to day life.

That's a bit more of tangent than I wanted. Basically, I wanted to teach myself how to create macros for my computer, but I didn't want to spend 5 weeks on it. So last night, I picked up a tool that would allow me to make some simple macros. A macro is a small program that does nothing more than perform a simple task at the push of a button (or click as the case may be). Basically, they are made to do repetitive annoying tasks on your computer, so you don't have to.

I doubt I'll spend too much time on them since there is very little I can use them for, but I am sure they'll be most useful in making things go smoother in my internet browser. I use Firefox to surf the net and the program I am using has a special plug-in with this browser. I am sure I'll get tons of joy making little programs here and there. More likely, I'll hardly use them at all. But it is another iron in the fire.

No comments: