Monday, July 7, 2008

A Yurt With A Brain



The other night I did an interview for Mike Moore's Rubiverse podcast.

Unbeknownst to Mike, I was chowing down just before on some wickedly spicy bona fide New Mexico mole verde. I have some friends who complain about getting served gringo spicy instead of real spicy. Get yourself Chicano landlords and a houseguest from Santa Fe who knows some of the same people you do - the New Mexico professional music scene is tiny - and you won't have that problem. This mole verde was nowhere near gringo spicy.

There's really only two liquids that tame spiciness, one of which is milk and the other is alcohol. I didn't have any milk but I had some sweet and easy sangria that turned out to be a lot stronger than I realized. (I'm hoping when Mike releases the podcast that it won't be too obvious.) Either inspired by the sangria or just through the natural course of events, I got on a roll and started talking about some new ideas I might work on if I ever get Archaeopteryx finished - and if Archaeopteryx ever seems too normal a project for me.

The first of these ideas is the artificial-intelligence-enabled yurt. This idea can scale to full houses, but I want to start with a yurt. There's only one reason I can come up with: because I can. Fortunately, I've always felt that's one of the best reasons to do anything.



The first benefit of the AI yurt is that it is a cheap platform. You can pick up a nice little yurt for $5000 - that's a few months' rent in LA, NY, or SF. My parents have land in New Mexico where I can set up my yurt, and they also have a guest room, which will be useful if I fuck up my yurt. This makes the yurt not just a cheap platform, but a cheap platform I can freely experiment with. The more open your platform is to experimentation, the greater the chance you'll come up with some truly creative ideas.

And if it works, you get a nice home away from home in the mountains - something anyone can appreciate.



Obviously, if you're setting out to build a yurt with a brain, and you've already got the yurt, the next step is the brain. There's really only a few things you need for this step.

Peter Norvig AI/Lisp book(s)
Judea Pearl Bayes nets book(s)
Clark Glymour Bayes nets book(s)
Mac Mini
lots of spare time

Bayesian networks give you the ability to mathematically infer probabilistic relationships, including 100%-probability probabilistic relationships, which a non-Bayesian would identify as cause-effect relationships. (Chris Anderson recently generated a ton of hoopla for Wired by inaccurately describing this centuries-old idea as Google's bold discovery.) This means, for instance, that if you have a Bayesian network observing a clock, and observing the on and off switches for every light in a house, it can infer that every time you turn on the bedroom light after 3am, you turn on the bathroom light soon after, and based on that inference simply decide to turn the bathroom light on for you.



But that's kind of cheating, because it's not just the brain - you also need a central nervous system. You need to link the light switches to the brain. This means you need programmatic control over your light switches, and a user interface that routes all light switch activation through the brain's pathways of perception. As long as you have programmatic control over the light switches, though, building a user interface is easy; just run it as a Web app over WiFi and use an iPhone or iPod Touch as a universal remote. Similarly, implementing Bayesian networks is much easier than most people think. Once you get the programmatic control, everything is easy.

So it all revolves around establishing programmatic control over the lights in your yurt. There are a couple ways to do this.



I know one smart programmer who built a central nervous system for his home entertainment gear. Where most Americans have a gazillion remotes in their TV room, he has just one. Instead of buying a universal remote, he uses an IR remote mapper and an RF remote. The Handy Switch (As Seen On TV!) puts what looks like an IR base station between your outlets and the appliances they power. Control that with an IR mapper, link up the IR mapper to your yurt's brain, and boom! You're done.

Alternatively, boom! Your yurt's on fire. This information is provided for entertainment and self-aggrandizement purposes only. You are an adult. If you set your yurt on fire, it's your fault for listening to me in the first place. Do not try these experiments without alternative shelter options close at hand.



Another alternative: X10. Still another: USB relay boards. I honestly don't understand how it works but I've seen it in Make magazine and it looked cool. Again, you gate your AC power outlets and control the gate with your computer. As long as you have programmatic access to USB, you're good to go.