Monday, August 31, 2009

Well, there goes the neighborhood...

If you haven't seen this video yet, watch it. I'm a couple weeks late for having a timely reply, but I thought it would be nice to record my response for posterity.

Being someone who made similar little videos at my job, I can guarantee that this is 100% legitimate. Well, probably closer to 90% - I'm sure that robot hand doesn't always catch the phone.

Right?

Holy smokes, though. Imagine if the Terminator had this hand - just one - in the first Terminator movie. Sarah Connor would have been toast in a second! Add another couple of decades of development, make it two hands, and put SkyNet in charge. Then see what happens. Holy smokes.

I'm watching the US Open as I'm writing this. It's just the first round, but wow - Federer can do some amazing things! For all his strength, dexterity, innate talent, trained skill, the billion years of biological evolution, the thousands of years of technological development, and the hundreds of years of cultural background that has brought him to this point of history, I cannot help but wonder how long humans like him will remain the best on a tennis court. A decade or two? Maybe more?

It all depends on whether somebody convinces enough investors, universities, or government bureaucrats that a tennis-bot is worth $100 million or so to develop...

A general robot that could match Federer and do your dishes? Give it thirty or forty years. Not more than fifty, I would say. Ray Kurzweil thinks I'm a pessimist, and in this area I am. But that's because dealing with the real world is hard. Dealing with abstractions, logic, and ideas, however, is much easier. Considering this, I'd expect we'll have a robot that can match wits with Federer (or Hawking) within two decades. They already surpass us in so many ways, it's only a matter of time before we can consider them better in "most" ways.

Looking forward to it!

Tuesday, August 18, 2009

BioLogic: Logic Programming with Biological Parts

BioLogic is shaping up nicely.

Right now, I have a Perl program that takes all FASTA-formatted BioBricks provided by this page of the Parts Registry, scrapes additional information for each entry from the Parts Registry website, and puts it in a giant Prolog program.

When this program is loaded, you can query the knowledge base to get, say, the names of all the parts sharing the same part parameters as part with id number 9422:

?- parameters(Partname, Parameters),parameters(ThePart, Parameters),part_id(ThePart,9422).

Partname = 'BBa_I14016';
Partname = 'BBa_K0991107';
...
No.

Cool! From there it's only a small step to get additional information about the parts in question, pick the ones marked 'Group Favorite,' print out their DNA sequences, or get a link to the web page with information about obtaining the part (e.g. a page like this).

It seems to me this is already a neat tool that could help scientists interact and explore the parts database, based on their needs. Just a little work on getting it robust, opening web-pages in a browser window, and the nifty command-line tool is ready. Slap a UI on there (more work than it sounds, unfortunately), and it might actually be user-friendly.

But the real power of Logic Programming is not exploited with little steps like these. We plan on introducing rules into the program that allow it to reason about combining parts.

With just a few basic rules, it'll be possible to give the program a list of one or more parts we'd like to use, and have it return an entire ordered list of the parts and processes required to incorporate them. Several lists, in fact, leaving the final choice up to the scientist, but at least ensuring that - according to our basic rules - each entry in the list is possible.

Ok, so this step in the development of BioLogic is pretty neat - automating some of the reasoning the synthetic biologists need to do to ensure they end up with a functioning organism. Useful and handy, but not as far as we can push this technology.

By adding additional rules about the behavior of parts, the program will be able to generate a complete part sequence based on a list of desired behaviors supplied by a scientist. These rules would apply to what the program knows about each part - the semantic implications of different categories, the part parameters, etc. Specific rules applying to individual parts or part classes could also be added, providing even more detailed and subtle knowledge to the program.

Prolog provides two great benefits in addition to the core functionality described above.
One great thing about Prolog programs is that they don't simply return one "best" answer, unless you really want them to. They can generate a nearly limitless number of solutions, which in this case would give researchers ample opportunity to experiment with its answers and introduce rules to improve the program. The second great bonus is that you can ask Prolog to explain itself - that is, show its chain of reasoning. This feature can give greater insight into the program, how the parts function together, and any errors or limitations in the knowledge base. It also helps explain how Prolog comes up with surprising answers - which often happens, for better or for worse.

Most of this advanced work will have to be performed by synthetic biologists who understand the interaction between parts, chassis, DNA, and the enzymes involved. Anybody know someone who might be interested?

Wednesday, August 12, 2009

It's You! (How are you, Gentlemen?)

The number of cats in this neighborhood is absolutely staggering. I believe they outnumber us humans by a factor of two or more.

What happens when cats rule the streets? Who determines which cat goes where? What rules do they follow? Are there any rules? Who would enforce them? Why?

These questions continue down paths few people dare tread: why do we have cats in the first place? Why do they insist on our company, yet consistently refuse to obey our commands or indulge in our whims? What's going on behind those big green eyes?

That glint; the winking eyebrows, cheeky grin; what on God's green Earth could they be up to?

I'm not going to pretend to have any answers, but I've been around my neighborhood enough to have gained a little glimpse of understanding of their world. It works a little like this:

At the top, Boss Cat is boss. A giant one-eyed Persian, he paid our two young female felines a visit a week after their arrival in the neighborhood. Boss Cat waited for us to let them out, moved away to a respectful position, and observed - to see if they behaved like proper young cats. It appears both Anka and Izzy passed the test; he hasn't been back since, and they've been allotted our back yard. I'm not going to pretend our dog didn't have anything to do with it, but Boss Cat calls the shots.

Boss Cat has several deputies. One of the most notable is Highway Cat. He sits by one of the main passages between downtown Groningen and Beijum - a bridge over the ringway surrounding Groningen. Highway Cat performs two functions. The first (probably his primary) function is to monitor our comings and goings. Perhaps there's a Highway Cat at every through-way to Beijum. In any case, this Highway Cat is at his post at least three of every four times I pass this point. Of course - who knows if he's hiding in the bushes - observing in secret.

Highway Cat doesn't only work for the benefit of felines. I was biking home one time, coming at high speed down the bridge, when I noticed Highway Cat at his usual place. There's an intersection with a blind corner there, and I've always taken it on faith; there's not much traffic, so the chance for misfortune is small - usually. This time, however, he sat up, stared at me, then backed away in an odd fashion. I understood this to mean there was someone coming from the other direction, so I moved to the left lane in anticipation. Sure enough, a moped came cruising at high velocity! Had I not moved in response to the cat, I don't think that avoiding a collision would be possible.

There are other cats that fulfill some sort of function within cat society, but I don't really know what those functions are...

Creepy Cat, for instance. At first I thought he played a policing role, but it's just creepy... its teeth are large, yellow, and point in all the wrong directions. It eats like a fiend, looks totally emaciated, sits on garbage cans and bike seats, and its meow is like rubbing sand paper on a chalkboard. Perhaps he works as a scavenger of sorts - he loves to ravage garbage bags.

Love Cat is one cat I don't know very well. It seems that Love Cat has his heart set on Anka. Anka is certainly very beautiful - our little princess - but is entirely uninterested, due to some surgical intervention. Love Cat hates on Izzy, too, so perhaps Love Cat's purpose is to encourage some form of cat prissiness.

I'll add more cats to this list since I'm not home during the day, when all this drama is visible to humans. I'm finally on vacation, so perhaps I can observe a few more cats first-hand and see what they are up to, such as Gimp Cat and Mean Big Furry Black Cat, among others.

What's the lesson in all this? I don't know, but that's probably only because Boss Cat doesn't want me to...

Saturday, August 8, 2009

"My God, It's Full of Stars"

One day a couple of months ago, something wonderful happened. It was a friday; the end of a very long workweek. An arduous week - I'd been working overtime to get high-performance ALPR working in Australia (namely New South Wales, Queensland, and Victoria), the trains were not cooperating, and a lot of energy was spent trying to arrange to buy our house. It had been rainy and cloudy the whole month - not exactly a good summer. By the afternoon of that friday, I was beat. Spent. A lifeless husk.

Four o'clock finally came, so I grabbed a beer with my colleagues and executed a final superhuman effort to get the software written, vetted, and out the door before the weekend so that I could rest easy for a few days. I groaned and sweated as my fingers punched the keys, and I reached the last few keystrokes. Committed the code. Executed the build/release script. Hit 'Send' on an email to the guy who delivers code to customers.

Done.

When I exited the building the clouds finally broke, and the sun spread cheer across the village. I unlocked my bike, got on, and started rolling down the street. The clouds had turned to white wisps in the broad blue sky, and the sun was a bright lance high above. All of a sudden, I was surrounded by glittering light all around. Large shining drops falling in sheets around me. I spread my arms and soared through a great galaxy of shimmering diamond rain, weaving lazy splines over the empty village streets.

The moment, like all good things, ended without fanfare or tragedy. The rain diminished to a drizzle, then stopped, and those wispy clouds passed over the sun and unsaturated the early summer blooms.

I thanked the great cosmos for granting me this experience and for allowing me to appreciate it as a reward for a hard job well done, and continued to the train station to go home.

Friday, August 7, 2009

Flashbacks from the Great War

For some crazy reason that I won't bore you with, it became (in my mind) imperative to clean the little storage room next to the kitchen. It was around midnight, and I wanted to be done by mid-morning.

"No big deal," I thought, "I drank a lot of coffee, so I wouldn't sleep anyway. I'll just take care of it right now."

So I put Jessica to bed, piled all the cleaning supplies in our apartment in the bike trailer, and biked out to our new home. You see - it wasn't just a normal cleaning job.

The previous owners kept their cats in that room next to the kitchen. Apparently they didn't really use their litter box when they went number one all the time, so it smelled pretty bad. It had gotten worse since we got the keys, instead of getting better as it aired out, so it was best to get it cleaned out as soon as possible.

"No big deal," I thought, "the previous owners said they cleaned it up, so I'll just spray it down or whatever, and that'll be that."

0.30
Arrival. I open the front door and carry the supplies inside.
"Damn, I forgot the keys to the side door. It'll get kinda stuffy in the side room, but I should continue the mission." So I turn on the lights and enter the side room to form a plan. I study the contents...god, that stench...just some cardboard and newspapers...holy smokes, this is bad...and a couple of bins for recycling I gotta get out of here...

I estimate 5 minutes to move the stuff, 15 minutes of hard cleaning, 5 minutes of cleaning up, and 5 minutes of buffer space. I should be in and out in 30 minutes. Nice.

Ten minutes later I had already started cleaning, but I realized it was fruitless. The floor was covered with a thin linoleum-like sheet. The top was filthy, but I suspected something...worse.

I lifted the corner of the...oh my what is this? I pulled the sheet back further. It was wet. It was swimming in a pool of urine. It was horrible.

I managed to cover the floor through the house with tarp so I could pull the dripping tepid terrible mess out to the back yard without stinking down the rest of the house. It was heavy, like a corpse.

"No big deal, that must be the worst of it."

Right?


01.00
Returned to the side room, heavy-duty bleach spray in hand. Hmm? I ignore the nagging feeling, and get to work. The walls were painted white - not much of a challenge there. However, there is one ugly porous concrete floor, and 360 degrees of corner. I decide to start at the right corner of the side door and work clockwise. I'd be at the left corner of the door in gggheh? ten minutes.

"No big deal, just gonna hose it down with some bleach, clean it out, and I'll be out in 30 minutes."

So I start hosing. Spraying and spraying. Dousing the awful floor, destroying that terrible smell with pure, clean, aggghh bleach. Spritzing and pouring. My eyes felt dry and it became difficult to breathe.
I should have better ventilation for this. Bleach is kinda toxic. Listen! But I keep on going as hard as my hands can squeeze the bottle. Spraying and spraying. My eyes stung and watered, my lungs burned, and the back of my head was screaming for attention. Wake up, you fool! But I would not listen - could not stop - I had to finish the job. Spraying and spraying. Spritzing and pouring. All the way to the left edge of the side door. I can't even see anything anymore. I would scream to quell the stinging, but there's no air to carry the sound and instead I whimper pitifully. But I'm done.

01.30 I stumble out into the kitchen and lean out of the open window - try to breathe deeply. The tears instantly soothe my eyes, and my lungs ache for relief.

"What's going on? This is way beyond bleach," I think to myself, and finally listen to that little voice of reason that had been plaguing me the whole night...thank you! Finally, eh? About time. Right, so what's bleach? Sodium hypochlorite? Annnnnnd, what's that smelly stuff in your pee? I can see where I'm going with this... ammonia? Good! Put the two and two together! Hmmm, that's a little tricky... we'd get... some salts and water and... diatomic chlorine? Yup. Go take care of it.

"Shite. Chlorine gas. Fuuuck meeeee."

I go back to the room and find a spot that'll work for a test. A spot on the doorframe is a bit rotted, so I spray. I am simultaneously excited and horrified to see green wisps floating up from the doorframe when I spray it with the leftover bleach. Apparently I just experienced something minorly similar to some thousands of soldiers in the first world war.

03.00 I finally finish up and go home.

Epilogue A few days later I regained my full lung capacity. I can be a real dummy when I don't pay attention!

No kidding!