5 ms·
Back in highschool, simulating different elevator algorithms was one of the projects I implemented during my CS class. It wasn't for the class — AP CS did not r
by peterldowns 2mo ago
Back in highschool, simulating different elevator algorithms was one of the projects I implemented during my CS class. It wasn't for the class — AP CS did not require anything like actual programming — but it was a fun project.
A cool connection is that a spinning-disk hard drive (HDD) is actually kind of like one really long elevator, just wrapped around a spindle instead of perfectly vertical. The SCAN algorithm is actually a disk-scheduling algorithm!
https://en.wikipedia.org/wiki/Elevator_algorithm https://en.wikipedia.org/wiki/Elevator_algorithm
- bherms 2mo agoWe did this in college as well using microcontrollers and leds or something - i forget the exact details. It was super fun
- NKosmatos 2mo agoDid exactly the same with Assembly language on a PIC16C84 microcontroller with LEDs dyeing my university years a looong time ago.
- deleted 2mo ago[deleted]
- liesliy 2mo agoThe elevator algorithm → disk scheduling connection is such a perfect example of how CS concepts keep showing up in unexpected places. Same idea, completely different domain. It makes me wonder how many other "unrelated" problems we're solving today already have decades-old algorithms waiting to be rediscovered for them. Robot motion planning is basically just elevator scheduling with more degrees of freedom.
- sobani 2mo agoFYI: all your comments are [flagged][dead] I don't know why, because they all look fine to me...
- shmageggy 2mo agoLLM text tells, particularly in their other comments. Definitely AI generated.
- NetMageSCW 1mo agoJust like yours is.
- shmageggy 1mo agoGo fuck yourself. How's that for an LLM tell?
- toxik 2mo ago> Robot motion planning is basically just elevator scheduling with more degrees of freedom. Certainly a take, ChatGPT. Not a very good one, but a take nonetheless.
- amenghra 2mo agoIt's fun that the same algorithm applies to two different problems. In the disk case, the only unpredictable thing is future requests. Elevators have to deal with two unpredictable things, future requests as well as how long humans take to get in and out of the elevator. So it's doubly fun that the same algorithm works in both cases!