Oct 262005
 

It’s a book by Mitchel Resnick. It didn’t get covered in my list of academic books before, probably cause it came onto the scene a bit late for me. If I had gotten 3-5 years earlier, I might be doing Logo right now still.

I imagine that the Logo turtle will be a big part of my life in the upcoming years. Logo was the first programming language I used. Basically, you control a virtual turtle. You get to tell him to move forward, to turn X degrees, to put his pen down, to lift his pen up. And with those commands, you can draw pictures and stuff.

Now a days, they have little toy trucks that you can do the same thing with. My old CTO’s kid had one. It was pretty fun. Trying to figure out how to get it to drive around the living room without crashing into things. But his truck didn’t have a “pen” to draw on the carpet with. It had a horn – that you could blast. I spent the last 5 minutes convincing the kid that a high percentage of the 30 commands the truck could take should be blasting the horn. It’d be more fun that way.

Anyway – Logo turtles based in the real world with a truck is cool. But there are somethings you can’t do in the real world, which make simulations more interesting. Turtles, Termines and Traffic Jams explains some of those simulations.? It is a very good book about complex systems in “massively parallel microworlds”. Basically, he took the Logo turtle and spawned them repeatedly. Thousands of turtles.

And the world that the turtles live in has an environment – where turtles can drop “scents” and sniff for “scents”.? So pheromones used by ants and termites could be modeled. And some “scents” could be special – like a “food” source. And in the model, you could watch as the turtles (modeling ants) self-organize and optimize even – OPTIMIZE – their path.

I mean, we rarely get the chance to appreciate the path ants take while they invade our kitchen. Usually, it is a panic and rush to eliminate their path. But with a virtual world of turtles, you can watch them struggle to find the food (they just walk around randomly) then create a path to the food (which isn’t that direct because they have to follow that random, meandering path that they made to get to the food originally) and then optimize the path (by randomly deviating from the path and when the deviation is shorter, that shortcut gets utilized). It is fun stuff.

Interactive fun stuff. You get to tweak a few parameters and all of a sudden the behavior changes. The paths don’t optimize (not enough random deviations) or the paths don’t get made at all (the scent’s lifespan is too short – no scent trails) or the paths don’t get made at all (the scent’s lifespan is too long – there is scent everywhere). Basically, it is an infinite laboratory.

By creating scent trails that are a straight line and programming the turtles to follow the scent religiously – one can create “highways”. Then, in that process, one can add? some minor collision avoidance routines to the turtles. Now one has safe highways. Its fun to watch traffic flow along these highways smoothly – what a master of urban planning we are!

But instead of everyone using the exact same parameters, add a couple random parameters to the collision avoidance routines (slow down a bit more, slow down a bit later, slow down a bit earlier, etc).? And now, all of a sudden, the traffic isn’t flowing so smoothly. Traffic jams spontaneously appear because of the interactions between the different types of drivers. Whoa – urban planning ain’t easy in the real world!

So, Logo’s a great learning tool – and it was a stroke of genius to go from 1 turtle to N turtles. But even better than that stroke of genius is that Resnick focuses on applying his models to education. Instead of trying to become the best fisherman, so he can publish papers about how good and big the fish are that he’s caught, he’s creating a fisherman school – to try and inspire others to become fisherman and go out and explore – and probably find new types of fish that we had never seen before.

Sal’s gonna be one of those fisherman. Regardless of what he decides to pursue in life later on, he’ll have a fundamental background in modelling multi-agent systems. I think that’s what happens when your dad’s got a tattoo of ants communicating and then did a thesis on the multi-agent systems. I know, I know, he never asked to be born. Well, as they said on Weeds, “Fare is what you use to get on the bus. That’s the only fair I know in this world.” (Well, something like that. And it flows better when said than read.)

But it’ll be fun, because now, instead of just those plain old trucks that are turtles, Lego Mindstorms have full kits that you can use to program Lego bricks. These bricks can have inputs (light, IR sensors – you can effect your Lego car with a tv remote control!, temperature, etc) and outputs (motor control, IR transmitters – you car can turn your tv off, or, here’s one of those leaps from single turtle to many turtles – bricks can talk to each other!) Brilliant!

There’s actually probably a lot more they can do now, I haven’t looked into them for years. I did build a few of the original kits, back in the 96-97 or so – before they were legitimate Lego products.? They were sold as build it yourself kits back then by an MIT grad student. Basically it was a computer that you glued Lego bricks to, then you could snap the bricks onto a Lego vehicle.

Long, long hours in the kitchen in my grad student studio apartment (kitchen had the best light) soldering the circuitry together. Fricken pain in the butt. Cause I’d have to debug the thing all the time to make sure I was building it properly. Anyway, those were the days where instead of paying an extra 60 bucks for the pre-built one, I’d spend 4 days building it myself (and 80 bucks on the equipment to build it…) Once I realized how much more it cost for me to build it than to buy it built, I realized I had to build another one, to bring down the cost.

But I knew I’d have a set of them anyway, cause I wanted to take my simulations off the computer and into the real world. I figured I could use buzzers and microphones on the Lego bots to get them to communicate and that’d be a neat part of the thesis. Well, turns out the motors on Lego bots drown out the buzzers and that makes communication a bit tough. IR really is the way to go, it’s just harder for humans to observe it – so it wouldn’t be as dramatic a demo. There is no better phrase for a PhD student than “future work”.

When I left school in 99, Lego research labs up in San Rafael had a position I was interested in. I think it might have been a dream job – legos, programming, education. But San Rafael was so far away (Catherine was working in Sunnyvale). I don’t regret it at all, mainly because I felt that well, I could just buy Mindstorms and effect kids without working at Lego – just on a smaller scale. And, now I got a kid. Just need to get the Mindstorms kit now…

Anyway, I brought this all up up cause Resnick’s coming to do a little talk at Yahoo! on Friday. I’m excited about it. I know I set expectations high and I continually get disappointed, but I’m a slow learner.

I’m excited about it.

  2 Responses to “Turtles, Termites and Traffic jams…”

  1. Ummmmm……. Nerd!

  2. I had a toy truck / tank you could program that way. N steps forward, turn 90 degrees, make gun fire, flash light, N steps forward. Yeah, lots of fun trying to get it to navigate down the halls of our house. As an only child for 10 years, there wasn’t much of an opporunity to have two of a toy and have them interact with one another.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)