of Simplicity

as told on tomayko

Jon was a Computer Science major at Ohio State University taking a course in artificial intelligence. The professor had set up an interesting group project where each student was responsible for writing an insect program that would be matched against all the other student's insect programs in a really cool network based insect war simulation environment thing that rocked.

The insect programs had certain constraints set by the professor. Size, shape, speed, and other traits were selected by each student but there were rules such that you couldn't just turn all the dials to full.

Once the basic properties of the insect were fleshed out, code was written to specify how the insect should act. There was an API for determining where your insect was located on the grid, approximating positions of other insects, moving your insect, attacking, rotating, etc. Pretty standard stuff.

The professor decided to pair students up: one smart kid with one dumb kid; the students who were having a hard time in the class would be able to work closely with a student that was excelling. Each student was responsible for their own insect but they were to debate their designs with each other.

Jon was one of the smart kids and was paired with a kid that wanted to change majors. Jon's dumb kid rarely attended class and seemed to dislike CS in general. He wasn't even in class the day the assignment was handed out and so Jon set out on his own to build the coolest and most advanced insect program ever created.

Over the course of a few weeks he burned through code until his insect was capable of responding intelligently to a myriad of changes in environment. It knew to run when outmatched by judging the relative strengths and weaknesses of an opposing insect. It would attempt to strafe and stay behind other insects. It would stay close to corners to reduce the potential attack positions of other insects. It was The Coolest Insect Ever.

The day before the competition, Jon's dumb kid decided to come to class. Jon asked him if he had finished his insect, to which the dumb kid replied he hadn't even started but would finish it that day, *in class*. Jon grinned smugly and tried to explain to the poor fool that he himself had spent all week working on his insect and that it still was not yet complete. The dumb kid shrugged and started in coding something that would get him the damn credit for the project.

Right before the class ended the dumb kid asked Jon to take a look at his insect. Jon had to fight the urge to laugh out loud when he saw that the entire insect was a mere 25 lines of code that barely made it through the compiler and with some lines having no chance of even being executed. The dumb kid had not even configured his insect's basic set of traits but had left them at the professor provided defaults.

Looking more closely, Jon found that the insect was programmed to do the same thing every time it had a turn to move:

1. Rotate 90 degrees.
2. Attack.

Turn and then attack. That's it? Jon asked, to which the dumb kid replied, Do you think I'll pass?

Jon tried to give the dumb kid some ideas on making his insect more advanced but the dumb kid wasn't interested. Jon decided that the dumb kid would most assuredly not pass.

The next day the competition was on. The professor loaded up the simulation program and everyone hooked their insects into the system. The dumb kid was late and then couldn't figure out how to get his insect loaded up. Jon helped him out while mumbling something about futility...

Finally the simulation began and Jon was excited to see his insect perform well through the first full round. In the second round, Jon's insect would get stuck in one of the corners, enter an infinite loop, and be forcefully removed by the professor. One by one all other insects would be killed by other insects or removed by the professor due to logic problems - that is, all but the dumb kid's insect.

As he sat watching the dumb kid's lonely insect turn-and-attack, turn-and-attack, turn-and-attack, as if to mock the whole class, Jon was forced to re-evaluate his definition of cool in relation to computer programs.

No comments: