2004-01-09

alexr_rwx: (withtux)
2004-01-09 02:10 am

Keeping the zoo...

So for cs4611 with Ashok, we're playing with a particular sort of system that knows some general rules and has a short-term working memory... which could be a lot simpler than you'd think, but it's really powerful, and it at least feels like how a human would think about things...

What makes this different from just a big string of "if-then" code is that you've got some clever datastructure to hold all of your rules, and you need some clever way to search through it to find what you're trying to apply, because not all of them are going to apply.

So in the reading, there was this entertaining toy system with a fun background story: Robbie the robot wants to go to the zoo for the afternoon, and while he's there, he decides to try to classify all the animals he sees... so he codes up this system for himself that does inference (deduction, specifically) to figure out what animals are what, based on his percepts.

So I wrote that... just a good exercise. This made me feel a little better about Ashok's class, which has been getting slightly threateningly theoretical -- the sort of thing where I was thinking "eh, that intuitively makes sense, but I wonder if I could ever code it..."

That's what I love about CS, really -- the background stories. AI is all about good background stories... (physics is fun when it does that, as well...)
alexr_rwx: (withtux)
2004-01-09 08:32 pm

"... when you could be with me..."

Roaming ’round your house
Wasting your time
No obligation just
Wasting your time
So why are you alone ?
Wasting your time
When you could be with me
Wasting your time

I’m a waste like you
With nothing else to do
May I waste your time too?

- Green Day, "Sassafras Roots"

It's sort of a strange day. Dunno exactly what to say about it... I'm not... lonely... so much, there's just this weird feeling that I could be doing something else that I'm not. Like some different way in which I could be being social. Perhaps leaving the apartment or the campus would help.

You know, it's not that there aren't any young ladies around (there are a few) it's that we're socially inept. Every so often, I'll posit to the roommates, half in jest, "you know what we should do tonight? Go pick up chicks!"

... except... where?

Today (after combinatorics and before AI, which is a Long-Ass Break) I hung around and wrote a program that I'd been meaning to write for years... a million years ago, I was trying to do a JUMBLE in the newspaper, and I just could not wrap my mind around "lawsur", which comes out to be "walrus". I thought to myself, in that highschool-minded sort of way that I thought, "Well, I'll just write a program to generate all the possible orderings!" Eventually, I did something that sort of bogo-reordered and then vgrepped on that, but that was Ugly.

It's not an obvious algorithm to come up with, generating all the permutations of a string. But I got one that asserts an order and then lets you calculate (with a n recursive calls for an n-letter word) the ith permutation, which is pleasing. And I coded that this afternoon :)

Tonight, I'm going to make it read /usr/share/dict/words, stick that in a big hash table, and then programmatically solve JUMBLE puzzles :)

... which is a really studly sort of thing to do, and obviously all the honeys (and perhaps the shorties as well) will come flocking.

Eh. Lo que sea.