## Category Archives: Algorithms

### How I Use Evolution to Organize My Closet

Okay, this is going to be a weird one, but just bear with me…

When I do laundry, I hang my shirts in my closet by just shoving everything in my closet to the left, and hanging up the shirts I just washed on the right. Pretty simple system, but it has an interesting consequence.

Over time, my shirts become organized from left to right by how often I wear them. This is due to the fact that if I go many laundry days without wearing a shirt, it will just keep getting pushed further and further left every time I hang my laundry back up, whereas shirts I’ve recently worn will be on the right-hand side. It’s not a perfect system: if I decide one week to wear a shirt I hardly ever put on, then next laundry day that shirt will end up near the right-hand side of my closet, but the point is that over time this evens out.

Now you might think it’s a stretch to call this evolution. And you know what, you’d probably be right, as my closet is not really a self-replicating system. But fuck it, it’s almost 3am as I write this: let’s see where it takes us.

Let’s consider every time I hang up my laundry as a new generation (population 1), whose genome is determined by the order of the shirts. This generation keeps part of its genome from the previous generation (the order of the shirts I haven’t worn since my last laundry day) but also has some mutation imposed on it (the random order in which I hang up the shirts that I just washed). More specifically, the left genome segment is inherited from the previous generation and the right genome segment contains a bunch of new data. The ratio of how much of the final genome is inherited versus how much is mutated is a function of how long it’s been since the last time I did my laundry.

But since there’s only a population of one, I don’t really have a selection mechanism, so that kind of falls apart.

Let’s consider the shirts themselves as the population, and we could say we’re selecting for a shirt that really like to wear. Because of the structure that comes out of this whole process, I can easily (artificially, obviously) select a shirt from the right side of the closet and odds are I’ll end up with a well-liked shirt in-hand. And if I then wear the shirt, next time I do laundry it will receive a high-priority in the new population when I hang it back up on the right-hand side.

Is there a point to all this? Not really. I just thought it was a neat little meditation on how complex systems can be generated through simple rules.

(That sound you’re hearing is every biologist who reads this screaming at their monitor, by the way…)

–Posted without being proof-read. Like I said, it’s almost 3am.