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.
So You Think You Can Program an Elevator
11–20 of 118 posts
Re: So You Think You Can Program an Elevator
#12Very 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.
Oh no. My work day has been seriously threatened.
I think it's the programmer equivalent of https://xkcd.com/356/
Re: So You Think You Can Program an Elevator
#13Re: So You Think You Can Program an Elevator
#14It's a classic example of a problem that you think is appropriate to throw at new programmers but find out it goes terribly wrong because the hard part is designing a suitable state machine first. If you just start coding without a full model that covers all the edge cases, it quickly degenerates to a mess of ad-hoc heuristics and spaghetti.
Re: So You Think You Can Program an Elevator
#15Long 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
Re: So You Think You Can Program an Elevator
#16This is a lot like an assignment for my operating systems class to introduce threads/lock (each elevator and rider is a thread). https://users.cs.duke.edu/~chase/cps310/lab3-elevator.html
Re: So You Think You Can Program an Elevator
#17Maybe an elevator but I very much doubt a Wonkavator!
Re: So You Think You Can Program an Elevator
#18Re: So You Think You Can Program an Elevator
#19Re: So You Think You Can Program an Elevator
#20Very 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.