Algorithm-Arena / weekly-challenge-28-airplane-loading

1 stars 0 forks source link

Submission - Airplane loading visualizer and the Steffen Boarding Method #1

Open Krayorn opened 3 months ago

Krayorn commented 3 months ago

So here's my tiny simulator!

Nothing too fancy, just a big plane, 120 impatient passengers and a few strategies to make them board the plane.

As seen in this great video, boarding groups, back to front, is one of the worst way to board a plane. The Steffen Boarding Method on the other hand, is the best. You can watch it in action in this demo.

https://github.com/user-attachments/assets/f4f0e83b-450e-4bb0-8d3b-a43bb31175f3

13s for the steffen method, 26s for the boarding groups. There is two other strategy implemented in this demo, go try them out! I did not take into account the time used for shuffling seats when someone needs to go to the middle or window seat, but apparently it's not as relevant as the time taken to store the bags.

If you have a boarding strategy you want me to try out, feel free to ask!

Demo Code

nikpundik commented 3 months ago

Very cool! Love this!