Monday, September 26, 2005

Life...no, literally...

In the last post, I complained about a bit about losing my edge - that weird drive to think about interesting stuff, and code stuff, and so on. Thankfully, it turned out to be a passing phase - the old me returned on Saturday, and life was suddenly a lot better...

About the title of this post - it's inspired by John Conway's incredible Game of Life. Here's the story...

While chilling out after a long day of writing assignments, I decided to use Firefox's cool StumbleUpon extension to find me something interesting to read. I clicked Stumble! and ended up here. This piqued my interest, because Hrishikesh(Kolhatkar, not Thite) had asked me to join him in writing an implementation of the Game, and since I'd always wanted to do this, I had agreed with a pretty fair amount of enthusiasm.

If you've clicked on the link, you can see the little rules at the bottom. They looked extremely simple, and going on to this page convinced me that it was a pretty trivial programming task. Unable to resist, I coded it up, and got it working in less than half an hour - and even that was because of a dumb bug I'd somehow introduced earlier. In fact, it would make a pretty good Div 1 300, or perhaps a Div 2 850, if there've ever been any of those...

Hrishikesh was pretty surprised when he found out - he's offered to rustle up a GUI, so I'll leave that to him for the time being. Perhaps I'll post a code skeleton up at Code Monkeys. It's really pretty simple - nothing fancy at all algorithmically, and that's precisely where the fun begins.

You see, by just following a few really simple rules, and picking an initial pattern, you can make the Game generate nice evolving systems of incredible complexity, considering how little you put in. In fact, the system is so damn fantastic because it's a Universal Turing Machine - which basically means that it can achieve the same level of computation as the machine you're reading this blog on right now...In fancy terms, it can compute any algorithmically computable function...

Life is actually a kind of cellular automaton, which are pretty cool things that I've read about in various places, but never in any real detail. This has piqued my interest, though, so I'll probably follow it up. The last place I remember reading about it was Artifical Life by Danny Hillis. I've been trying to get hold of Stephen Wolfram's A New Kind of Science for a while now...

And now to bed, for about five hours of sleep and a boring day tomorrow. Of course, there is the sponsored TC SRM in the evening, and Verisign India is gonna come into the chat room before the match, so it might be fun after all. Sadly I'm now in div 1, so no chance of winning any money, unless some kind of miracle occurs...

And now I lay me down to sleep...on second thought, forget it - why do I bother with these classical allusions anyway?

Friday, September 23, 2005

So much to do...

If you've read a few of my recent blogs, you know I often begin by complaining about how infrequently I get to blog, and so on...Well, as often happens, it's become old and cliched, so I won't do it this time. Consider it all said and let me get on with it...

Strangely enough, my life seems rather uneventful as far as blogworthy incidents go. The only thing really worth mentioning is that I feel a weird laziness these days - I don't want to code, I don't want to think. To my incredible astonishment, I can actually write assignments and journals with equanimity when in this frame of mind. I wonder if this is how normal MU students feel.

Could it be that four years of tedium have finally gotten to me? Is it because life is so uneventful aside from the pointless college routine? Or is it simply due to getting up at 6 every morning? These and other questions continue to haunt me...Well actually, in this frame of mind, they don't haunt me. That's the whole problem...

In other news, Thite is off to Gandhinagar to attend an Embedded Systems workshop at DA-IICT. Sagar is busy working his posterior off for the next SIMCAT on Sunday. Hrishikesh is coming up with algorithms to solve everything I give him so fast that he should be a red coder by all rights. Funny that's he's still gray...Of course, this may have something to do with the fact that his algorithms are either wrong or his implementations fail miserably - or the fact that he never sees the real complexity of the problem he's facing. Ah well, it takes all types...

Wonder what I'm gonna do in the SRM next week - if this trend affects the competition, I'm gonna lose my blue colour! Have to come out of the rut...

Back to the real world...

PS: Just noticed that the title doesn't seem to have anything to do with the content. Suffice it to say that there's so much work involving assignments, journals, college applications and all that, that I don't feel like complaining about it anymore. If that doesn't convey how bad it is, nothing will.

Sunday, September 11, 2005

Ho hum...

Posting after long intervals seems to have become a habit with me - it's been over 10 days since I last posted here. Here's the lowdown on what happened in the meantime, in no particular order...

Finally finished off Shaping Regions at USACO - I posted about it a while ago, if I remember correctly...What was the problem? Dumbness and no knowledge of the Java Collection classes...All I did was rewrite the code to split rectangles and switch to Vectors(All I really needed to know about java.util.* I learnt at TC...) and it worked after just 2 tries. Of course, I had made 41(!!!!) tries before this, so I was treated to the standard USACO message saying "Congratulations, your solution passed all tests. This is your submission #43 for this problem." Like I said on MSN, there's a thin line between dumbness and perseverance... On the other hand, there's that old Edison saying about 99% perspiration and 1% inspiration...Sagar and Hrishikesh - if you guys wonder how I do div 2 probs so fast(er, usually) - now you know...

Anyway, after that I was on a roll, and destroyed about 6 more problems in about 2 days and moved on to section 2.3(Shaping Regions was in 2.1). Haven't started anything yet...

Forgot to mention - USACO still uses JDK 1.3! WTF!!! I'm sick of casting things when I use collections, and being unable to use the nice little foreach construct...

Missed SRM 262 this Friday - the rains came down in force and sundered my connection to the Internet, leaving me floundering for almost 2 days. Sad...

I've been feeling a little strange since Friday - rather lethargic from a coding perspective. For some reason, I can't summon up the concentration needed to code effectively. It's not that I can't code, but I can' t seem to think properly about the stuff I'm doing. Kinda bugged - maybe I should play a game or something - but there's nothing around...

So maybe it's good that I didn't do the SRM - probably would have lost rating points if I competed in this frame of mind. As it is, someone else lost rating points and I'm now ranked 47th in the country, up one place. Cool...Hopefully I should be back to normal soon.

Got a bit of happy news yesterday - apparently Google isn't gonna be evil - those of us who qualified but missed the Online Round of the GCJ still get t-shirts! Google, you guys rock! If you guys are planning on holding another GICJ here, you can count me in...hopefully by then I'll be yellow or something - maybe I can make it onsite...I'm feeling lucky! (Pun intended...)

Finally, my aunt is arriving from England today, so there's gonna be another one of those nice family get-togethers! (Hmmm, really odd that I enjoy these things - I'm usually rather anti-social...On the other hand, if you can't relax with your family, who can you relax with?) Maybe I can play a bit of King Arthur at my cousin's place to help me get my groove back...

For now, I think I'll go kill some Covenant - Halo, here I come!