frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Elevators

https://john.fun/elevators
220•Jrh0203•1h ago•80 comments

Big Food vs. the People

https://www.lighthousereports.com/investigation/big-food-vs-the-people/
27•jruohonen•50m ago•3 comments

DeepSeek V4 Flash 0731 Intelligence, Performance and Price Analysis

https://artificialanalysis.ai/models/deepseek-v4-flash
381•theanonymousone•8h ago•202 comments

I built a f.lux alternative because the M5 Max firmware broke existing solutions

https://driftformac.app/
17•jackvanstone•1h ago•12 comments

DeepSeek-V4-Flash Update

https://api-docs.deepseek.com/updates/
531•dnhkng•10h ago•257 comments

Show HN: Shared memory graph for Claude and ChatGPT, over MCP

https://uml.gpmai.workers.dev
15•12ziyad•57m ago•8 comments

Algorithms on billion-scale graph using 10GB RAM: I love DataFusion

https://semyonsinchenko.github.io/ssinchenko/post/datafusion-graphs-cc-2/
15•speckx•1h ago•2 comments

A GTK4 SSH-askpass in Zig

https://xn--gckvb8fzb.com/a-gtk4-ssh-askpass-in-zig/
22•surprisetalk•1h ago•6 comments

Dubious research tied to Red Bull has shaped energy drink policy

https://www.theexamination.org/articles/red-bull-funded-research-energy-drinks-alcohol
47•Jimmc414•57m ago•57 comments

Arch Linux disables AUR package adoption

https://lwn.net/Articles/1086489/
37•database64128•2h ago•7 comments

Make Everything to Markdown

https://klartext.it-handwerk-stuttgart.de/
17•Beko2210•1h ago•5 comments

The End of an Era

https://hughhowey.com/the-end-of-an-era/
275•harscoat•5h ago•320 comments

The session you cannot take with you

https://earendil.com/posts/session-portability/
667•apitman•13h ago•188 comments

Is AI reasoning right for the wrong reasons?

https://www.quantamagazine.org/is-ai-reasoning-right-for-the-wrong-reasons-20260731/
61•retupmoc01•1h ago•63 comments

13 Models and 4 Agents on SWE Tasks: Go, Java, Python, Rust, TS

https://swe-rebench.com
9•ibragim_bad•1h ago•2 comments

Tasklet (YC P26) Is Hiring a Customer Success Engineer

https://tasklet.ai/careers/customer-success-engineer
1•mayop100•4h ago

Google fixed more Chrome bugs in June than over the past two years, thanks to AI

https://blog.google/security/chrome-stronger-with-every-update/
396•Garbage•9h ago•379 comments

Show HN: BitBang – Reach machines behind NAT from a browser, no account

https://github.com/richlegrand/bitbang-cli
10•narragansett•2h ago•1 comments

The C ``Clockwise/Spiral Rule''

https://c-faq.com/decl/spiral.anderson.html
13•etrvic•2h ago•7 comments

New Defcon Badges Pack a Unique Open-Source Chip That Doubles as a Security Key

https://www.wired.com/story/defcon-34-badge-baochip-andrew-bunnie-huang/
36•hn_acker•1h ago•7 comments

The Art of Decision-Making (2019)

https://www.newyorker.com/magazine/2019/01/21/the-art-of-decision-making
8•EndXA•1h ago•0 comments

Situational Awareness down 67% in July in AI stock rout

https://www.wsj.com/finance/investing/situational-awareness-down-67-in-july-in-ai-stock-rout-cd19...
104•pondsider•3h ago•103 comments

Moonshot’s Kimi uses 20k Nvidia chip cluster from Alibaba

https://www.bloomberg.com/news/articles/2026-07-31/moonshot-s-kimi-built-on-20-000-nvidia-chip-cl...
64•gk1•3h ago•42 comments

Winding Down Artichoke Ruby

https://hyperbo.la/w/winding-down-artichoke-ruby/
40•ksec•5d ago•4 comments

The most official water costs $120k a gallon

https://signoregalilei.com/2026/07/26/the-most-official-water-costs-120000-a-gallon/
13•surprisetalk•1h ago•1 comments

Show HN: I built a cross-browser extension that controls fingerprinting surfaces

https://privacything.com/en/
11•tomaszjanusz•1h ago•1 comments

Why ugly buildings create NIMBYism

https://www.worksinprogress.news/p/why-ugly-buildings-create-nimbyism
9•bensouthwood•2h ago•8 comments

Anti-fraud tools can't keep pace with scammers exploiting cheap internet calling

https://broadbandbreakfast.com/how-to-fight-back-against-fraudulent-robocalls/
16•dredmorbius•3h ago•8 comments

Show HN: Gander, an Android file viewer that asks for no permissions at all

https://github.com/mokshablr/gander
173•mokshablr•11h ago•62 comments

Online Friends Are Real Friends

https://toska.bearblog.dev/re-online-friends-are-real-friends/
16•Tomte•47m ago•4 comments
Open in hackernews

Elevators

https://john.fun/elevators
218•Jrh0203•1h ago

Comments

shadeslayer_•1h ago
This article gives me war flashbacks about a particularly irritating OO design interview from 5 years ago.
sambaumann•1h ago
This reminds me of elevator saga (https://play.elevatorsaga.com/) - little programming game where you have to program elevator schedules.
orliesaurus•1h ago
Oh my god, every time I'm waiting for the elevator, I think of how annoying it must be to be someone who's building the algorithm to make sure that you minimize the amount of wait times between picking up people and taking them to their destination. Then I also wonder if the people who apply the logic and program the logic into the elevators are actually evil sadists that are doing it on purpose to make us wait longer enough and suffer a little extra.
neutronicus•50m ago
They might have other objective functions like wear-and-tear on the elevators, total energy usage, or something
clarkmoody•1h ago
One of the most frustrating assignments[1] (2011) in my computer science education was trying to build a better mousetrap for elevator control.

[1]: https://clarkmoody.com/Moody_AgentBasedElevatorControl.pdf

SoftTalker•2m ago
Disk drive read/write algorithms have a lot in common with elevator algorithms. At least they did in the days of physical heads moving across a platter.
brandonpelfrey•1h ago
For folks that have never seen elevator scheduling the game: https://play.elevatorsaga.com/ Enjoy this rabbit hole :D
grep_it•45m ago
I always come back to this game whenever I'm at a hotel for a conference waiting for the elevator.
perryprog•34m ago
Wow, I just came here to comment that I've always wondered if a game where you have to program an elevator scheduler would be any fun. I thought surely no-one's thought to make that before, too! Glad to be proven wrong.
alanwreath•31m ago
I wish there were more games like this. It’s such a simple premise but so satisfyingly difficult after each level. And it even has a bit of randomish failure which makes for even more challenge.
john_strinlai•18m ago
at a quick glance, it reminds me of "the farmer was replaced", if you havent seen/heard of that one
emmanueloga_•21m ago
looks very well made, but I still prefer https://en.wikipedia.org/wiki/Elevator_Action !
gosub100•1h ago
Maybe I missed it, but the algorithm should also redistribute empty elevators that stop too closely to each other.
jmyeet•59m ago
This is a good article. It reminds me of a story.

At a previous employer we had heteregenous elevators. In one bank, some went to the lower half of floors only while others went to all and the company installed a "smart" elevator system. I kind of became known because I was constantly yelling about this system in the feedback group because I hate "smart" elevators and and (IMHO) they just don't work. What actually works is express elevators and sky lobbies.

This article covers one of the deficiencies this system had: full elevators. For example, you'd want to go down and an elevator would skip your floor because another had already been assigned. That one would show up full and you couldn't go down. Down wasn't so bad because the stairs weren't a bad option but up was terrible. Going up a few floors was fine. Going up 20 was... a bigger issue.

Back in the day we had elevator operators and people in the lobby during the morning rush who would shepherd people into particular elevators. I actually think this system works way better than anything technology has come up with. Even if you nail the implementation (and I've never experienced elevators that have), people don't read and will just get into elevators anyway.

Anyway the article says that generally speaking on smaller banks simple up and down buttons work best. I absolutely agree.

There's a deeper issue here though and that is solutions looking for a problem. Nobody is making money from up and down buttons. They are fromn selling smart elevator solutions. And you see this everywhere in life. It basically devolves into rent-seeking behavior. Salespeople wine and dine a couple of people responsible for making decisions and then make bank on selling something nobody wants or needs as well as the constant maintenance and updates.

marcosdumay•51m ago
> people in the lobby during the morning rush who would shepherd people into particular elevators

That's what the no-button elevators with the kiosk does.

jihadjihad•58m ago
In a similar vein, there was an interesting discussion [0] a while back about elevator buttons [1] and how timing for door close/open works, along with a bit of the history and regulations that go into them.

0: https://news.ycombinator.com/item?id=35152341

1: https://computer.rip/2023-03-13-the-door-close-button.html

Waterluvian•57m ago
Makes me want to play Sim Tower again.

There’s something so satisfying about watching a machine just dutifully work through queued tasks like this.

b3lvedere•40m ago
I had another game in mind.

https://archive.org/details/elevator_nes

Sohcahtoa82•20m ago
If you liked SimTower, Project Highrise is worth taking a look into.

https://store.steampowered.com/app/423580/Project_Highrise/

jp191919•57m ago
Reminds of something I haven't thought about in a very long time... SimTower
itunpredictable•56m ago
I didn't realize that neal.fun had some competition.
geephroh•55m ago
Slightly OT, but this reminded me of Colson Whitehead's _The Intuitionist_[1], an amazing speculative mystery novel about two dueling schools of elevator inspection philosophies: the Empiricists and the Intuitionists.

1. https://en.wikipedia.org/wiki/The_Intuitionist

paxys•54m ago
My biggest pet peeve is elevator banks where they don’t make some number of idle elevators automatically come back to the lobby. Half your traffic is over there! Everyone coming in has to wait an extra minute or two because all your elevators were chilling on the 35th floor and above.
mapmeld•44m ago
My apartment building is replacing the elevators, and someone on staff revealed that the first renovated elevator is intended to pick up only from the lobby (i.e. if you summon an elevator from the 10th floor, one of the others will come). This has caused some grumbling or calling it an "express elevator". In an apartment it really is mostly trips to many floors from the lobby. The only time this maybe would be inconvenient might be in the morning commute, when fewer people are re-entering.
cruffle_duffle•5m ago
You should observe if it is the same elevator all the time and the building people just don’t understand it. Our building elevators (bank of 2) always seems to try to keep one in the lobby. About 75% of the time you get an elevator right away when you call it from the lobby. But it definitely isn’t the same elevator! Allocating an exclusive single elevator to that function would seem to be strictly worse from many angles. Like if you modeled having an algorithm like “elevator 2 only services calls from the lobby” you’d find it would be very inefficient and not every effective. But I can see having one in the bank always returning to lobby right away making sense.

My guess is whoever hinted at that didn’t fully understand what they were taking about.

teepo•53m ago
I've never really liked Destination Dispatch elevators. Besides struggling to find the car I've been assigned to, sometimes you really have to hustle across the lobby to catch it. Then you also run into visitors that assume it's a normal car and can hit a floor button when the get in, only to realize they've walked into a car without buttons.
quietsegfault•47m ago
What makes me more peeved about destination dispatch elevators are people who aren't used to them, and all pile into an elevator without hitting a floor, thinking one input is enough for everyone. Then, a totally full elevator stops at intermediate floors to pick up callers, but there's no room to get in. If everyone put the floor in as they arrive to the elevator lobby, then the elevator would know how many people are in the elevator and won't overfill them.
avidiax•40m ago
The elevators I've seen have a "group call" feature slightly hidden in the menu.
why_at•16m ago
>Then you also run into visitors that assume it's a normal car and can hit a floor button when the get in, only to realize they've walked into a car without buttons.

I work in a building with Destination Dispatch elevators so I'm used to them. I have the opposite problem where I'll get into a normal elevator and just stand there without pushing anything.

zatkin•53m ago
I think a small improvement that could be made is to have the dot representing the person be colored the same as a dot on each floor, which would obviate the destination floor for each individual.
soupspaces•46m ago
Yes the visualization is great but overused and could also use a stop button. I would have also liked to see different kinds of plots.
olex•52m ago
The biggest problem I always have with elevators is not the algorithm, it's the people seemingly being unable to grasp the concept of pressing either the up or the down request button, depending on where they want to go. Almost always I find someone will press both, because "then the elevator comes faster". Completely ignoring the fact that they end up going the wrong way first half the time, and adding an unnecessary halt for everyone already in there. How hard can it be to understand?..
Georgelemental•50m ago
I don't think I've ever seen someone do that
summermusic•40m ago
I haven't ever seen anyone do this in the United States, but I saw it in China and Italy.
esperent•36m ago
I've never seen anyone do this anywhere in the world including Italy.

I've never been to China but wouldn't you learn quickly after getting in an elevator going the wrong way not to do that again?

The only exception I can see if there's way more people than elevators and you just need to get spot at all costs.

the_af•16m ago
My wife always randomly hits the up or down button, then gets upset if I explain why she should only pick the one she really wants. She forgets the next time. I think some people never really understand how elevators work.

See also: the keep open / close doors button. I had one building administrator explain to me we should add a delay of 10 seconds to the "quickly shut door" button because otherwise she kept getting her arm hit by the door. When I asked why we would add a delay to the button that's meant to reduce delays (why not simply wait for the door to close on its own, then?), and whether we should fix the sensor that prevents doors from closing if there's an obstacle instead, she just kept staring blankly at me. I don't think she understood me at all.

Again, some people simply don't grasp how elevators work.

moralestapia•51m ago
>All this technology just to underperform the S&P

My takeaway is that the benefit of using a much more complex algorithm is marginal.

proee•50m ago
Don't forget the executive elevator algorithm (EEA), which uses a priority interrupt to take passengers directly to the top floor.
mekdoonggi•44m ago
Also need to make sure you increase the speed going past floors 4 and 13 to avoid bad luck.
quietsegfault•48m ago
I love elevator simulations.
hermanschaaf•48m ago
Hah, I thought a lot about this problem while developing Sky Lobby, a mobile game (iOS / Android) about controlling and automating elevators.

In the game, some of the elevators are automated, and I wanted to choose an algorithm that best aligned with what players would expect an elevator to do. I ended up going with something close to LOOK, which (as the article states) is mostly what people expect. Except in case of ambiguity, I had it prioritise floors that have been waiting longer, to improve the p90, which is important in the game.

But now, add in these challenges:

- double-deck cabs (where attached cabs cover two floors at once)

- transfer floors between shafts

- express shafts

and the best (or at least, most expected) algorithm becomes much less obvious! I'll leave it as an exercise for the reader to figure out the best one.

Luckily I was in charge of a game, not a real elevator system, so I just had to find a heuristic that was good-enough, and could tweak the rules to let players manually override the elevator's plan if they don't like where it's going. This seems to have satisfied most players.

jamies•37m ago
Thanks for sharing this. I was just commenting about the challenge of making a fun elevator sim game. This looks great -- can't wait to play with it this weekend!
OJFord•43m ago
I think this comparison is also assuming the distribution of request & requested floor is uniform? When actually near pairs are less likely (I'll just take the stairs) than bottom to top, so even analysing it is more complex than at first glance.
mito88•42m ago
did he factor in the lifting speed?
jamies•39m ago
This is absolute catnip to me. Fantastic job to the author! It really scratches the itch of wanting to understand elevator dispatch algos!

I want something similar for advanced sensor stop lights...

I've long toyed with creating an elevator simulator game, but every time I build a prototype I realize it's not that fun to manually dispatch elevators, and playing with algos only goes so far! Elevator Saga is great for the programming side: https://play.elevatorsaga.com/

coop57•38m ago
You have no idea how excited I was to see this article today. I've long been fascinated with elevators and the algorithms that control them. Thank you!
cubefox•35m ago
> Everyone has shared the frustration of waiting for an elevator that never seems to arrive.

Really? Maybe I'm lucky I never had to deal a lot with elevators.

realaccfromPL•33m ago
I absolutely adore this, I am always trying to guess whichever elevator will come in first in large crowded buildings. Thanks for this article.
tgsovlerkhgsel•31m ago
Is there a comprehensive overview of a) multi-bank elevator algorithms that are out there, b) the config parameters that the elevator tech/company can set on an elevator system?

For example, some elevators allow adjusting the door closing/opening speeds etc., I'd be curious what other things can be adjusted.

niklasrde•30m ago
I wonder how a TWIN system with 2 cars per shaft factors in here: https://www.tkelevator.com/us-en/products/elevators/all-elev...

That will need planning and assignment I guess? But at what load figures does it become more efficient?

reader9274•29m ago
I feel like most cases of wait times are due to elevators "waiting" empty in the wrong floor. They either all wait in the bottom floor, or all wait where they were last left at. Would be better if their waiting floors were distributed throughout the floors so that first response is fast.
Sohcahtoa82•22m ago
In the middle or end of the day, yes. In the morning, waiting on the bottom floor is the best.

Unless you're a hotel. Then the timing is flipped: Wait in a distributed manner in the morning/mid-day, gather on the floor in the evening.

cruffle_duffle•11m ago
The problem is that in the morning the “last stop” for the elevator might be the lobby not a mid floor. And so it would have to move itself back up without any passengers or calls to upper floors. Basically “optimistically” moving itself back up. And I wonder if some (most?) control systems don’t do that because of… well I dunno. Lots of elevators have pretty old or basic control systems in them. Maybe predate caring about energy and many also probably aren’t strictly smart enough to be concerned about wear factors and stuff.

It could also be that you and I simply aren’t privy to what is actually happening “the instant” you are waiting for the elevator.

…which makes me wonder how often the firmware in these get updated. Assuming it’s not just a pile of ancient relays and stuff. And if, when they do get updated, the algorithms get improved. Or if the algorithm is something that gets sold to the building and “upgrading” is an actual purchase.

Anyway, I could get a little LLM buddy to look it all up but where is the fun in that?

rubslopes•18m ago
Yes! I always thought that, when unused, elevators should distribute themselves along the floors, weighted by the floors that use them the most.
heironimus•28m ago
No mention of an algorithm/sensor for checking capacity of the car. It's a pain when your elevator car shows, it's full, and your request is canceled, meaning you have to press again. Better if the car was full and just moved on.

I can see how that could be challenging when people get off on intermediate floors, making a full car available again, changing status. And, if 3 people are waiting and there is room for 1, should it stop or not? Etc.

My favorite takeaway from this is how simplicity often beats complexity.

barrkel•5m ago
Load penalty is part of the Otis RSR algorithm, it's in the article.
pseudosudoer•28m ago
This is commonly referred to as the "dial-a-ride" problem, which is an optimization problem with a multi-variate cost. Back in college for my senior design project we built a multi-axis closed loop servo system which would emulate a slide guitar. The dial-a-ride problem is identical to optimizing travel for a string of notes/chords.
tamimio•24m ago
As someone who lives in a penthouse, elevator’s frustrations are real struggle especially in rush hours, because the elevator has to travel dedicated to you rather than you piggy backing on one that is already going up or down.
cruffle_duffle•24m ago
If you like elevator hacking don’t forget the seminal DEF CON talk by Deviant Ollam and Howard Payne: https://youtu.be/oHf1vD5_b5I

I watch it like once a year because it always tickles some part of me. Like all the different modes you can get an elevator into. The most fancy one people might encounter is when moving into or out of a building. The front office can give you a key to give exclusive control over an elevator so your movers aren’t waiting around on elevators. Put it in that mode and it will stop responding to calls from other floors. Only the person with the key can control the elevator. You get on, select the floor, door closes elevator goes, and then just chills there with the door open waiting for you. Annoying for the rest if the building (the building is down an elevator when in that mode) but is amazing for the person using it! But there are way, way more depending on the installation and function.

Fun fact: most elevator shafts are sealed at the top as tight as possible to prevent them from becoming a giant chimney in a fire. It never even occurred to me until I was in a mechanical room wondering “where is the hatch to look down the shaft?” The answer is “there is none, and it’s a feature not a bug.” You want to block all airflow so fire doesn’t chase up the shaft into neighboring floors. Who knew!

efavdb•24m ago
I recently wrote an article about this problem, and detail one reasonable algo for minimizing wait time. (Doesn’t consider concept of cars being full though, interesting addition)

https://jslandy.com/elevators/

bob1029•22m ago
Parking is a big factor too. Where you put the elevator when it is not being used can mean the difference between the doors opening instantly and worst case scenario.
dperfect•22m ago
Destination dispatch should be no worse than standard up/down buttons, right (at least in theory)? It provides additional information about the destination, but it should be possible for that information to be interpreted as if it were just an up/down button press, so RSR could still be used. I have a feeling a better algorithm could in fact make destination dispatch slightly better than RSR... or am I missing something?

Of course, user error is also a factor, so this isn't accounting for people not understanding how to use it and making things worse that way.

brd529•19m ago
As the article says, the problem with destination dispatch is that it 'locks in' an elevator. The passenger gets told at call time what elevator to go to, and it can't change that mid flight. RSR has the advantage that the passenger has no idea which elevator will come, and so RSR can change the elevator they will get in real-time as conditions change. This was an insight I had not considered before reading the article.
dperfect•16m ago
That sounds like two separate things then. Could you not have people select a destination without locking in an elevator?

(I've never encountered destination dispatch myself, so I'm not really sure how it works in practice)

fellowniusmonk•7m ago
I think the problem with simulations like this is that it doesn't include the chaos of innatentive humans.

Forcing functions that dump people into well defined funnels can have such a high net positive effect it more than makes up for theoretical losses.

It's like narrow, hard road bike tires losing performance because of deflection from rough road surfaces and how long it took designers to factor that in to real bikes.

omoikane•13m ago
> Destination Dispatch [...] are in general worse

I wonder if this is an artifact of how the author used random destinations. I worked in a building that used Destination Dispatch, and the common travel pattern seemed to be:

- Everyone who is not on the ground floor generally want to go to the ground floor.

- People who are on the ground floor generally travel in large groups to the same destination.

This happens because people who worked on the same floor often leave for lunch at the same time, and return at the same time to the same floor. Destination Dispatch helps in this case because it's batching large groups of people with the same destination.

danielvaughn•11m ago
I've always wondered about elevator algorithms. This is awesome.
vachina•9m ago
Anybody knows what algorithm HITACHI is using on their elevators? Their elevators feels most “responsive” in high rises.
taftster•7m ago
In these various elevator algorithms, it's not commonly discussed the overall wear and tear on the elevator. More movements would typically translate to faster repair times. Hydraulic fluids needing to be replaced, parts breaking, etc.

Efficient elevator algorithms will often suggest moving an elevator into a preempted positioning strategy, based on time of day or peer elevator positions. The scheduler might move an elevator up to offset one coming down, for example. The demand-signal algorithms at least minimize movement in this way.

I think minimizing maintenance at the cost of increasing wait times is probably an important balance to get right. No doubt, the cost owners for maintenance are not going to perceive the wait time of passengers to be as important.

ryukoposting•6m ago
My friend lives in a building with one of those super old elevators with the manual double doors and no queuing. It's the sort of elevator that someone probably got paid to operate once upon a time.

Using such a primitive elevator gave me a newfound appreciation for the complexity of modern designs. The queueing algorithms are subtle but clever, and the difference in efficiency is instantly obvious once you've dealt with the alternative.

peterldowns•3m 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

tamimio•21m ago
Because most buildings now they just put one button so people stop clicking both
what•12m ago
What? I’ve never seen that. The elevator needs to know which way you want to go.
rsanek•2m ago
That has not been my experience, and logically it doesn't really make much sense. If you do so, you are making the problem strictly worse.
trivo•48m ago
And then when the elevator door opens, they ask the people inside: "Are you going up or down?" There's an arrow showing that, for Christ's sake.
themaninthedark•29m ago
True but sometimes someone hits a button on the inside by mistake. Or someone was going to get off then decides not to.
SoMomentary•16m ago
Sometimes I think "stupid" questions like these are just a way to break the ice, something that gets used to kindly acknowledge the momentary existence of others in our lives before we continue down our separate paths.
wpm•13m ago
Yeah and you can flail your head around looking for the arrow or you can just ask. Especially on a busy elevator lobby there might be multiple cars opening at the same time so you cant even tell from the ding/ding-ding