Wednesday, October 19

A First Glimpse...

Today (besides being a catch-up day) we were given a link to a website (Picobot - rules here) containing an editing screen and a blue field with a green pixel robot: Picobot! The goal was to fill the field up with grey pixels, which the robot left behind. The only problem was that we had to use a non-Turing complete scripting language to make it do so. An instruction might look like this: 0 x*** -> N 0 (goes up as far as possible).

Although optional, it was a compelling challenge. I took a break from my raytracer (on which, by the way, I figured out how to use any polygon) and started. The first field was an empty square. It took me all of five minutes. The second, a maze, was not so easy. The third was a diamond (which was easy) and the fourth an arbitrary shape (not easy). I solved that last one by hardcoding in directions for the most part. There has to have been a better way.

Anyways, here's me and my little Picobot after that...



 (Notice the many lines of code... 53. The empty square took 6.)











 And the great part is, there are more fields left!

I've been so happy about this because it's really the first hard Computer Science thing we've actually done in this class that involves a large amount of theory and problem solving. The solution's not obvious to everything: I wish the rest of the year were like this.