What Algorithm Runs an Elevator?

I was standing in the lobby of my resort at Universal Orlando, waiting for an elevator, when the question caught me. Six cars, a small crowd, buttons lighting up faster than the doors could open. One car sailed past my floor without stopping. The other doubled back for someone who'd pressed down after I'd pressed up . And I found myself doing the thing I always do when something in the world won't…