Live data from Hacker News

So You Think You Can Program an Elevator

github.com

71–80 of 118 posts

Re: So You Think You Can Program an Elevator

#71
post #52
post #8

Earlier quoted context omitted.

I think I read once that when elevators still had operators, larger buildings would have one or more dispatch agents in the lobby that would line people up at the appropriate elevator for the range of floors they intended to visit.

I used to work in a 50-story building that had banks of elevators, each of which was hard-coded to only visit the lobby and the appropriate range of floors. For example, the first bank would only visit 2-13, the 2nd bank would visit 14-25, etc. The elevator cars only had buttons inside for the floors they were allowed to visit. There were also a couple service/freight elevators that could visit all floors (including…

In very tall buildings, to reach the highest floors you might have to take an express car to a higher lift lobby, where you change cars (because it's also inefficient for the 2-13 lift to have an empty shaft that's never used for 80 floors above 13).

Re: So You Think You Can Program an Elevator

#72

Very similar immediately playable JavaScript version. http://play.elevatorsaga.com/ Which I'm now closing as I lost too much time to this the first time I saw it.

This is fantastic. Are there other good programming challenge / games like this? I'd love to see a collection of other similar games.

Robocode is another one: http://robocode.sourceforge.net/

Re: So You Think You Can Program an Elevator

#73
There's an old legend in the construction world that the fastest way to reduce complaints about slow elevators in an office building is to add mirrors to the doors & hallways. The tenants (allegedly) spend so much time looking at themselves that they'll overlook an inefficient elevator system

Re: So You Think You Can Program an Elevator

#74

Very similar immediately playable JavaScript version. http://play.elevatorsaga.com/ Which I'm now closing as I lost too much time to this the first time I saw it.

This is fantastic. Are there other good programming challenge / games like this? I'd love to see a collection of other similar games.

Stockfighter.io and microcorruption

Re: So You Think You Can Program an Elevator

#75
post #51

Earlier quoted context omitted.

Totally agree. That's basically the challenge that I wanted to make, but I found that I bit off more than I could chew.

so are you saying that, similar to the elevator programming challenge itself, writing the elevator programming challenge was more difficult than it looked? cool. that probably put a bigger smile on my face than it should've, but still cool.

Yeah, but that can't be surprising. Software estimation is hard.

Re: So You Think You Can Program an Elevator

#76

A project during my graduate work was to solve this problem. You can read my write up, which includes pseudo-code for the best algorithm I found[1]. Long story short: a simple, rules-based algorithm defeated my best efforts at having multiple elevators working together to coordinate their action. [1]: https://clarkmoody.com/Moody_AgentBasedElevatorControl.pdf

This looks really funny. Is it a spoiler if I haven't done the posted link yet? If so I'll read it later :)

Not related to the posted link, so no spoilers :-)

Re: So You Think You Can Program an Elevator

#78
Over a phone interview with Segment.io, I was asked to program an elevator controller. It was described to perform like an HTTP server would handle requests... They were getting confused when I started writing code for a state machine. Glad I got a job offer somewhere else.

Re: So You Think You Can Program an Elevator

#79

Very similar immediately playable JavaScript version. http://play.elevatorsaga.com/ Which I'm now closing as I lost too much time to this the first time I saw it.

This is fantastic. Are there other good programming challenge / games like this? I'd love to see a collection of other similar games.

TIS-100: http://www.zachtronics.com/tis-100/

Untrusted: https://alexnisnevich.github.io/untrusted/

Re: So You Think You Can Program an Elevator

#80

I have a pet theory that Sim Tower came out of someone playing around with elevator algorithms for fun and then turning that into a game.

Not a theory, reality. https://en.wikipedia.org/wiki/SimTower#Gameplay

Awesome, my favorite game when I was younger.
Post reply on HN