I'd assume that it would first go to the floor where the button was pressed first, and subsequently collect everyone in the direction it'll go from there. Because that's actually what I feel some elevators are doing because you wait for one for ages. Some certainly do work like that, but newer ones are probably indeed smarter.
Then there's the curiously simple system that you'd find in Soviet buildings, the kind built out of prefab concrete panels. The elevator doesn't allow to be called while it's in use, period. The call buttons on all floors light up while it's in use, and you have to wait for the light to go out before the button would do anything. The buttons inside also only work with doors open (I think?) and you could only press one at a time. The controller for these is most probably made out of relays or something similar.
Elevators in former Soviet Union (even those installed long after its disintegration) are quite dumb compared to Western and SE Asia installations in tall buildings.
I stayed in a tall hotel in Dubai (not sure how much of Asia UAE is) for a while and it still took a minute or two for an elevator to arrive. Though they were freakishly fast, Russian ones now feel like they're crawling.
Then there's the curiously simple system that you'd find in Soviet buildings, the kind built out of prefab concrete panels. The elevator doesn't allow to be called while it's in use, period. The call buttons on all floors light up while it's in use, and you have to wait for the light to go out before the button would do anything. The buttons inside also only work with doors open (I think?) and you could only press one at a time. The controller for these is most probably made out of relays or something similar.