In an article about telephone interviews, one of the design questions Joel says he asks is, “How would you implement code to operate the elevators in a high rise?”
Presumably, he’s looking for something like this; a system that avoids “starving” the top and bottom floors.
It’s a really interesting question, though. Legend has it that SimTower had its origins as an elevator simulation, but then the SimTower elevator cars have that bizarre property that they can pass each other in a single shaft. I’ve heard explanations that each “shaft” represents a 15-deep bank of elevators, but that would require each condo and office to also be a group of 15, which in turn messes with all the other money- and people-scales in the game; ultimately, I think it’s easier to treat the elevators as fantastic and the game rules as highly abstract.
When this article showed up last spring, it was unfortunately the middle of my exams, but I still took a few hours and tinkered with a quickie simulation. The notion of a rotating elevator is a highly interesting one—even moreso when you add in some kind of usable system that lets you declare your destination floor before boarding. The real challenge there, then, is to create a game theory-based control system that can group together people aiming for a single floor while still minimizing the wait time of each individual user. And also taking into account that lots of people will make mistakes, change their mind, and misunderstand the system.
Basically, I’m just writing because officially I’m studying for Signals, and it’s quicker to write than to dig out that code and start playing with it again. But yeah, I’ll post it up eventually.