Archive for February, 2011

Natural Selection

Friday, February 11th, 2011

A few days ago I tweeted about boxcar2d.com, and since nobody said HOLY CRAP THAT’S THE MOST AMAZING THING EVER, I assume none of you went to look at it. Or maybe I’m just overexcited. The website is a program designed to simulate natural selection and evolution, using a track and a vast population of little cars. The program uses a physics engine called box2d as its base, so the cars have weight and size and speed as defined by a simple list of traits, and the goal is to get as far along the track as possible. the traits for each generation’s best cars are used to create the next generation, and thus, over time, the cars become better at navigating the track, and can go much farther.

What I love about this program is the wonderful way it emulates evolution as a combination of natural selection and mutation; it’s the most perfect illustration of how those concepts work together that I’ve ever seen, and it almost makes me want to be a biology teacher just so I can use it in class. The natural selection part is obvious: cars that perform better on a certain track will survive to pass on their traits to the next generation, thus providing continuity over time. If that’s all you had, though, the population would stagnate–eventually every car would be as good as the best car, but no better. Mutation guarantees that every now and then a new trait is introduced into the gene pool, and if it’s valuable it gets carried on, and if it’s not it disappears. Thus the species actually improves over time.

Let’s look at an example. The tracks the program uses are essentially a series of obstacles: Big Air is a set of progressively harder jumps, The Gap is a set of progressively wider potholes, Hang Ten is a set of progressively steeper hills, and so on. My favorite is Big Air, because it’s thrilling to watch the cars figure out how to clear the longer jumps, but for this example I’m going to use Blockhead, a straight, flat track blocked by a set of progressively bigger walls made of stacked bricks. Moving along the track requires knocking the walls down, moving over the fallen bricks, and so on.

Each population starts with a generation of completely random traits–they can be any shape, with any number of wheels attached to any number of points on the car. Most of these cars aren’t even recognizable as cars, and indeed most of them can’t even move; think of them as the single-celled organisms in the primordial soup. Some of my first-generation cars could actually move forward, usually on one wheel, either pushing their body ahead of them or pulling it behind them. Of these, most of them could knock down the first wall or two, but had trouble going any farther. This continued for a generation or two until one of the one-wheeled cars showed up with a wedge-shaped body, like the prow on the front of a train. This proved incredibly useful in plowing through the first several walls, and the car got farther along the track than any car before it. All of a sudden the next generation was filled with variants of this wedge, some more successful than others: one wedge was lower to the ground, digging under the blocks but eventually getting too buried to move; another wedge was so small that the wheel ended up flipping it around, using it like a mace, which knocked over walls with no problem but couldn’t get past the rubble. Over several generations the wedge refined itself into a blade-like triangle capable of plowing under the walls and knocking them over its back, and then one of these cars grew a second wheel. This proved much more useful than one, with much better ability to climb over piles of fallen blocks, and within a couple of generations the population was filled with sleek, two-wheeled blades that rammed the blocks at full speed and raced over the fallen debris. These cars proved useless against the heavier walls until another mutation showed up; many of the cars had developed third wheels here and there, sometimes giving them extra speed or stability, but the winning combination was a third wheel perched on a small spike in the front, jutting forward like a buzz saw, which knocked down all the walls before the main body of the car even got there, preparing the way for the two main wheels to just crawl over the wreckage. With this new adaptation the cars could travel much farther than ever before.

The previous paragraph evoked one of two reactions in you: either you were bored, and you’re still reading because your job is even more boring than this, or you were completely fascinated and already clicked the link at the top of the article. (I suppose technically there was a third group that got so bored they stopped reading altogether, but those people aren’t here anymore so I don’t have to talk to them. I can talk about them, though: what losers! How is this not the most fascinating thing you’ve ever seen?) One of the things you may have noticed in that description is the way the simulation demonstrates even the subtler aspects of evolution, such as increased complexity, increased efficiency, and the carrying on of key traits long after they become vestigial. The wedge-shaped bodies ceased to be important when the second wheel showed up, because the cars were no longer using them as plows to knock down walls, but they hung around anyway because there was no significant selection pressure to get rid of them. The human appendix is the same way: we don’t use it anymore, but people without one are pretty the same as people with one, so the trait never gets weeded out of the gene pool and we continue to produce babies with a useless extra organ.

When you try out the program, make sure to try it with several different tracks, because it’s fascinating to see which traits get selected for on which tracks. It’s also interesting to see which traits get selected for on every track: most cars will end up with two large wheels on the front and back, no matter which track you’re on, because it’s simply the most effective means of travel. This is another real-life analog: cows and crocodiles don’t share a lot of common ancestry, and thrive in very different environments, but they both have a head, body, tail, and four legs. Some shapes are just too efficient to not use.

To all of you science geeks: your welcome. To all the rest of you: thanks for reading anyway. I promise to talk about something more pertinent to your interests next time, probably a movie comparison between The Social Network and Jumper. I know that sounds weird, but seriously, it’s really interesting.

Wrath of Ashardalon

Thursday, February 10th, 2011

A few months ago I talked about the board game Castle Ravenloft, a quick, tactical dungeon crawl based loosely on the D&D 4th Edition rules. We loved the game for being fast, balanced, and fun; you could play a whole scenario in an hour, and our evenings with the game typically spanned three or four scenarios because we enjoyed it so much. Next week, Wizards of the Coast releases the second in the series, Wrath of Ashardalon, and I’ve had the chance to play it quite a few times. I’m pleased to report that it not only lives up to the first game, it’s an improvement in many ways.

Whereas CR was set in a gothic castle full of undead, WoA is set in a mountainy cavern of some kind, filled with such classic monster types as orcs, devils, and (of course) dragons. They’ve refined the rules a bit–nothing that changes the game too wildly, but one change in particular helped fix one of our major complaints from last time (the weakness of the rogue) despite not actually altering any elements from the original game. The best new feature is what they call Chambers: large rooms in the dungeon that make for huge, climactic encounters, while still keeping to the same random engine that makes the game so balanced.

The new characters in the game are fun and unique–I was worried that included so many of the same classes as CR, which seemed lame, when they had so many to draw from, but the sculpts and powers are all new, plus they’ve made the powers interchangeable, so that a Wizard from the first game (for example) can use powers from a wizard in the second game, and vice versa. The two sets characters seem balanced against each other, and we even tried a 7-player game to see how well they combined–they combined well, and the game difficulty scaled perfectly with extra players. The game time did not, however, and adding two extra players nearly doubled the game time. Of course, doubling the game time still clocked in at half of a typical Descent session, so we still came out ahead. There was noticeable and occasionally annoying downtime, however.

My biggest complaint with the games remains the same: despite how simple the games are, the rulebooks manage to be confusing and poorly-organized. We missed several key rules that caused major problems while playing, and it took a ridiculous amount of time for four experienced gamers to comb through the leaflet-style rulebook to figure out what the problem was. We think we’ve got everything straightened out by now, but there’s excuse for that level of confusion.

My other problem with WoA was the generic flavor of the tiles. The CR tiles were covered with crypts and chapels and all kinds of creepy atmosphere, to really give you the sense that you’re exploring a castle. The WoA tiles are much more generic, and often you won’t find anything interesting at all until you come to the climactic chamber. I suppose this is an accurate reflection of what it’s like to explore a cave, but come on. It would not have been hard to differentiate these tiles a little. The doors add some variation, but overall they’re not as interesting as they should be, and it’s a poor trade-off for a dungeon with some personality.

All told, we had a lot of fun with Wrath of Ashardalon, and we’re excited to play more. For a quick dungeon crawl fix that has all of the flavor with none of the onerous baggage, it’s simply the best system out there.

Imaginary Swearing for Imaginary Cultures

Monday, February 7th, 2011

I am writing a new novel, which I am not allowed to talk about, but I can tell you this much: it is set about 65 years in the future, in North America. Among the many setting elements that I am creating for it, I’m trying to design some new swear words for people to use. Swearing is one of the most stable linguistic categories we have, so some of the words we use now will still be used in the future; “damn” has been a cuss word for hundreds of years, and will probably be so for hundreds more. On the other hand, swearing is also on of the most inventive linguistic categories, which is why (for example) people can use the word f*** as pretty much every part of speech. So I’m coming up with new swear words for two reasons: first, for personal reasons, I don’t want to use f*** at all, as any part of speech, and second, because I think it would happen anyway over time. And third, because I think it’s fun, but I didn’t mention that earlier.

The problem with coming up with new swear words is that it’s very, very hard to not make them silly. “Frak,” from Battlestar Galactica, is well-loved by fans of the show (I use it all the time), but people without that emotional investment often think it sounds silly, like the kids on the playground that say “fudge!” and think they’re being clever. The challenge, then, is to create swear words that still sound kind of horrible without actually being horrible. This is even harder than it sounds, but so far I’ve got two that I kind of like.

I had a friend who went to on a 3-day discount cruise to Mexico, including a stop in the tourist town of Ensenada, and when she came back she couldn’t stop talking about how cheap and crappy the whole thing was. She pulled out some photos of all the lame places she visited, and then told a long story about an hour-long taxi ride to go see some stupid attraction; when she showed us the next photo, she said “after that lon, horrible taxi ride, this is the blowhole we went to see.” It turns out the place was literally called a blowhole–a rock formation along the shore where incoming waves get funneled in such a way that they spout straight up, like a fountain. But I didn’t know that at first, and I thought she was using the word “blowhole” as an expletive, as some kind of combination of “this place is a hole” and “this place blows.” It had just the right combination of nastiness to be a real cuss word in the right situations (“blow” and “hole” are both vaguely scatalogical terms) while simultaneously being a completely innocent word (a blowhole is, of course, a whale’s nostril). I’m using the word blowhole in my novel, not applied to places but to people, ie, “that guy’s a real blowhole.” I think it’s working, but we’ll see what the readers say.

The second word I’m thinking of is borrowed from Wayne’s World. Back in the day, they had a skit about how they, too, were looking for a new word to use, because sometimes “Shyea” is just not strong enough. The word they settled on was “rectal,” which is, again, a perfection combination of gross and innocent, plus it has that wonderful “ct” consonant cluster in the middle to really make it harsh on the ear and deliciously nasty to say. I’m not as enamored with this one as I am with blowhole, but I think it can still work.

So: blowhole and rectal. They’re okay, but I need more, and that’s where you come in: what are some good fake swear words that you think would be awesome? Swear words tend to focus on bodily functions and religion, and I’m open to anything that is not actually blasphemous. Let’s see if we can come up with something that isn’t totally rectal.