Search
Monday, November 23, 2009 ..:: Programming ::..   Login

Introduction to My Programming

I've almost always had a keen interest in computers, having been an avid user of them since the DOS days. When I was younger, I spent a good deal of my time playing video games. As I got older, my interests branched out and I found myself doing a lot of networking. Of course, that was primarily so I could participate in LAN parties, events in which everyone attending would bring a computer and link them together for simultaneous gaming.

As any video gamer should know, many games come with utilities that a user may use to create special maps or missions that the user could then play. I discovered I had more fun developing these special objectives than actually playing the game. This is part of what eventually led me to my interest in programming.

My Programming Experience

During my highschool years, I took several computer-oriented classes. Most of my experience during that time was with Dreamweaver, Flash, HTML, and Visual Basic. I also had a brief introduction to C++. Unfortunately, I didn't put much of it to use and forgot most of what I learned. On the positive side, it did give me a nice foundation for learning development languages and tools in the future.

After allowing myself a break from the computer world for a couple of years, I made the time to attend Weber State University with the intent of acquiring a Bachelor's degree in Computer Science. Since then, I've used both my classes and personal time to develop my talents in programming. In that time I've learned quite a bit of C++ and Java. I've also learned a bit of C#, a language I've pursued completely independent from school.

I'd still consider myself a beginner in programming but I'm always learning new things. As I do so, I strive to maintain this website, often uploading text-based sourcecode for future reference. While I don't necessarily mind if people see it, knowing much of it could be easily duplicated, I'm not interested in leaving my projects open to the world. With that in mind, please understand that most of my programming section isn't available to the public.

Robocode

Below are some pictures of a battle between four robot tanks. They're all operated completely by artificial intelligences. The battle is between two robots I wrote, Neb and Tyr 3.0, and two robots I didn't write, Tracker and Walls. Tyr was a group project so I can't take full credit for him.

For my CS 1400 class, my instructor assigned our final project to be the development of artificial intelligence for a robot tank. The robots move, track other robots with their radar, rotate their turrets, and even fire according to their design. They function within a third party program called Robocode.

I was assigned to be the team leader in a group of four students. As a group, we were to develop a robot that would later compete against the robots of the rest of the class. I don't remember the exact number but I believe there were six groups.

Our robot was called Tyr, named after the Norse God of War. He represents courage and heroism in battle. Unfortunately, the first version of Tyr didn't live up to his name. He was quickly beaten, easily one of the weakest in the class.

Tyr's movement patterns were erratic, a positive feature that made him difficult for enemy robots to target. However, his turret tracking was horrible and he ran into walls far too frequently. He would also get confused, mixing up his immediate actions with other pending processes.

Provided with the installation of Robocode are several sample robots. Each sample robot has a particular focus to help users of the program develop and understand various strategies. The first version of Tyr has a difficult time competing against them. However, the second version of Tyr is immensely more efficient.

It was a night and day difference between Tyr 1.0 and 2.0. The second version maintained the evasive movements but his targeting is far more sophisticated. Using trigonometric algorithms, he knows how to lead his shots. Furthermore, he's less confused about what he needs to do when posed with several choices. The first Tyr has the serious problem of constantly forgetting what he's doing.

Prior to my group's second competition against the class, Tyr managed to obtain mastery over all of the sample robots. Such superiority was only further demonstrated when Tyr obliterated all of the other groups' robots, winning 50 of 50 one-on-one battles. He also came out on top during the free-for-all battles, though not with such a ratio. The combination of his new tracking and his maneuvers made him unstoppable.

The third and final version of Tyr isn't much better than the second. He's mostly just more efficient. Such efficiency further decreases his moments of confusion and makes him a little bit better about making the right choices. Unfortunately, it isn't enough to noticeably set him apart from his predecessor. Even so, he once again squashed out all competition in the classroom.

Tyr is, by no means, an amazing robot. I've had him compete against several robots far more sophisticated than himself. He can often hold his own but I usually find that his targeting technique is, at most, second-rate to the true champion robots.

Below are each of the stages of Tyr, compiled as jar files but not including their sourcecode. You'll also find my very first robot, Neb:

Copyright (c) 2009 Squirrel Lord's Tree of Many Nuts   Terms Of Use  Privacy Statement