we built a WORKING fleet of self-driving LEGO trains!

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025

ความคิดเห็น • 151

  • @eggybricks
    @eggybricks  6 วันที่ผ่านมา +27

    By the way, if you like the microscale cities in this video and you want some of your own, we have instructions for free at eggybricks.com - just enter coupon code BORIS and you'll get them all 100% off.
    Thanks so much for watching!!

  • @heyheyalaska
    @heyheyalaska 6 วันที่ผ่านมา +100

    You just covered half the theory of my comp-sci degree in a 25 minute Lego video

  • @nicklockk
    @nicklockk 5 วันที่ผ่านมา +19

    The production value of this channel is insane

  • @OutpostMJ
    @OutpostMJ 6 วันที่ผ่านมา +81

    Yay! Another installment in the "thinking person's LEGO channel." I'm a retired psychotherapist, 62 yo Cuban-American (child refugee long ago), father of three (18-24). I somehow missed LEGO in my childhood (more into Tonka, Matchbox, GI Joe, et. al.) but became an AFOL through my children's interest in LEGO when they were Kindergarteners (now in college and into their "dark period" -- but they'll inherit my LEGO). I have an extensive (read: "huge") collection, but a small apartment means limited space -- so I have large "shelf city" and rotate sets between display/storage (which is fun -- I change-up quarterly and reflect whatever season we're in in my city). I'm also VERY much into micro-builds. I'm not much of a MOC person but enjoy your brainy/creative "engineering " videos sooo much. I hope it's okay -- I just wanted you to know a bit about me. Thank you guys! ♥️☮️🕯️

    • @JoeyPeligro69
      @JoeyPeligro69 6 วันที่ผ่านมา +2

      Thank you for sharing!

    • @LutraLovegood
      @LutraLovegood 4 วันที่ผ่านมา +1

      In light of recent events you might want to scrub out some of those details just in case..

    • @ThatEverydayEnthusiast
      @ThatEverydayEnthusiast 2 วันที่ผ่านมา

      Very similar story to someone at my church! Nice!

  • @mrpocock
    @mrpocock 6 วันที่ผ่านมา +43

    Surely the two states of a switch are top and bottom 😂 Nice project. A stretch goal would be to have multiple trains moving at the same time. You can take the existing travel plan and identify segments that don't use the same edges and run all of those.

  • @bobbie9066
    @bobbie9066 5 วันที่ผ่านมา +9

    This is literally an extra fun version of some of my university courses and I frankly found those pretty fascinating anyway. I love it and thank you for not just creating it, but also documenting and explaining it!!

  • @TheGalacticGamers1
    @TheGalacticGamers1 6 วันที่ผ่านมา +23

    Hi! 👋 Freight Conductor for CN here! Was a lot of fun watching a train oriented episode!

  • @robl39
    @robl39 6 วันที่ผ่านมา +9

    How do you not have 1 million subscribers!? Excellent content

  • @Wico90YT
    @Wico90YT 6 วันที่ผ่านมา +14

    It takes real experts to make these explanations so simple

  • @ADAADA-it1iw
    @ADAADA-it1iw 6 วันที่ผ่านมา +7

    24:10 GREATEST REFERENCE OF ANYTHING OH MY GOD. AN INCREDIBLE VIDEO GOT EVEN BETTER

  • @TheMatthewCraig
    @TheMatthewCraig 6 วันที่ผ่านมา +9

    Absolutely fascinating. Trains are outside of my Lego experience, and likely to remain so (as is programming), but yeah: the logic, the progression from stop-start to sophisticated pathfinding, all superb. I think as hugefigs, we take a lot of this stuff for granted, right? I'm in the UK, so am fortunate to have a train network that could get me pretty much anywhere with (fighting my innate British self-deprecation here) relative speed and reliability. But the mass of moving parts puts most anthills to shame. This vid breaks that complexity down really well.
    Definitely think this is worth showing in schools, or using as a teaching aid in a tertiary setting.

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +4

      Thank you so much!

  • @SW_Bricks
    @SW_Bricks 5 วันที่ผ่านมา +5

    I’ll never skip and eggy video! 🎉 you make such interesting unique videos!

  • @mrblack5145
    @mrblack5145 6 วันที่ผ่านมา +5

    For the life of me I could never wrap my head around coding; I understand it as a concept but I'll never fully grasp it. The methodology of finding the shortest route to a location, however, is something I practiced daily as a truck driver and had to do it by hand since GPS units aren't always accurate, updated, or dependable.
    I reckon the conflunece of coding, trains, LEGO, and engaging/educational creators results in stimming the tism of almost any viewer though. Truly amazing what you two can do, working out the processes to achieve your goal. Glad to catch the upload fresh, and I cant wait to see whats next!

  • @unknown-kj4qp
    @unknown-kj4qp 6 วันที่ผ่านมา +9

    Yes!! I’ve been thinking about how to automate my layout, this is pretty helpful to think about. Further challenges: 1. Use timing to coordinate all trains moving at once. So, conflicts between trains are precalculated, and trains only stop when they reach a route intersection in which their route is lower priority. 2. Vary the trains speeds so they don’t have to stop! 3. Make the trains go back and forth on their routes and keep going indefinitely. I’m also curious why you used the hub if all the commands are coming from a desktop computer; is the computer only able to communicate with one hub at a time?

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +8

      These are great challenges, thanks!!
      The issue is that the Pybricks code doesn't run on the computer, it only runs on actual hubs - so we can't run the pathfinding/command generation on the computer and issue commands from there. (Well technically we could, but not without breaking the way Pybricks expects to work.) The computer can send code to multiple hubs (though not exactly simultaneously), but it doesn't send Bluetooth messages the way a hub does. Plus shiny lights.

  • @bagodrago
    @bagodrago 6 วันที่ผ่านมา +8

    Boy can't wait to watch a fun Lego video
    _Gets tricked into watching a 24 minute video on graph theory and path-finding algorithms_

  • @renatovelarde422
    @renatovelarde422 6 วันที่ผ่านมา +4

    Incredible work, as always! Nobody (in Lego youtubers) has this level of production values, and content, while also not just doing a bunch of picky reviews of Lego sets. Making this kind of amazing content takes so much longer than sitting at a table complaining about stickers, and it's so worth the wait, thank you!
    If only Lego payed as much as whatever your jobs do we could get some of this brilliant work/engineering in official sets.

  • @BatteryPoweredBricks
    @BatteryPoweredBricks 6 วันที่ผ่านมา +9

    Awesome video! Always worth the wait, I can't imagine how much work went into this one!

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +6

      Thanks so much!! And thanks much for the switch design (hope it's okay that we tortured it somewhat haha). Thanks for watching!!

    • @BatteryPoweredBricks
      @BatteryPoweredBricks 5 วันที่ผ่านมา

      @@eggybricks Haha, no worries 😁. Thanks for crediting Tom Cook as well, the mechanism is really his, I just made changes to the structure

  • @damianoliviero6993
    @damianoliviero6993 6 วันที่ผ่านมา +4

    This is the coolest thing I’ve ever seen in my life

  • @strathausen
    @strathausen 2 วันที่ผ่านมา

    Thanks

    • @eggybricks
      @eggybricks  2 วันที่ผ่านมา

      Wow, thanks so much for the support!!

  • @mailstorminurbox
    @mailstorminurbox 5 วันที่ผ่านมา +2

    Y'all cookin with these videos 🔥

  • @Mopey024
    @Mopey024 5 ชั่วโมงที่ผ่านมา

    As a train nerd and a programmer and a lego lover when I was a kid this video is awesome

  • @4014Railfan
    @4014Railfan 6 วันที่ผ่านมา +2

    Bro casually just made positive train control in lego and it’s the coolest thing ever

  • @TheRealJoeMartinson
    @TheRealJoeMartinson 6 วันที่ผ่านมา +2

    "Okay, that's enough"? You can't have enough of 3:51 😂😂

  • @bananamath
    @bananamath 6 วันที่ผ่านมา +2

    I used to do LEGO robotics and now I’m learning about these path-finding algorithms in school! Very cool to see them combined, and the optimization challenge is interesting to be able to run on LEGO hardware

    • @amaryllis0
      @amaryllis0 6 วันที่ผ่านมา +1

      Try making a little tile-based roguelike (as in literally like classic game Rogue) game, it's really easy and you get to use maze generation and pathfinding algorithms; it's a fun project!
      Maybe don't take notes from eggybricks' actual code though 😅

  • @legotechnic27
    @legotechnic27 5 วันที่ผ่านมา +1

    Very wel explained beginner friendly explanation for these topics! Super cool to see it in action

  • @MrJuppia
    @MrJuppia 3 วันที่ผ่านมา +1

    This is fantastic ❤

  • @PizzaBricks_XsX
    @PizzaBricks_XsX 5 วันที่ผ่านมา +1

    Your so smart I love seeing how real world problems are implemented into a easy to digest and understand material Lego is amaing at doing that and a great medium for engineers and coders you two are amaing keep up the great work

  • @alfredrising3247
    @alfredrising3247 6 วันที่ผ่านมา +2

    Amazing video. So excited your trains routing themselves. Keep up the awesome work!

  • @WMARUoriginal
    @WMARUoriginal 5 วันที่ผ่านมา +1

    Amazing! Great work

  • @bricks_in_space
    @bricks_in_space 2 วันที่ผ่านมา

    You two produce such fascinating videos. I am happy that your niche perspective is getting more and more traction and growth. I look forward to the next thought experiment.

  • @juaane
    @juaane 6 วันที่ผ่านมา +2

    I am amazed! Each video is something unique and your explanations for conquering the challenges are both creative as well as informative and easy to understand! That’s really good edutainment!

  • @sayethwe8683
    @sayethwe8683 6 วันที่ผ่านมา +5

    An interesting way to fake together Blocks and Signals. Passing sidings would probably be helpful for trains to be able to get out of each other's way without going "all the way" to "another city"

  • @DudeNuzzo
    @DudeNuzzo 6 วันที่ผ่านมา +2

    Frickin’ awesome!! Brilliant! 🎉👏

  • @thomasrichard7150
    @thomasrichard7150 5 วันที่ผ่านมา +1

    Hi from France where we watched the video with my 8yo. He got a little bored with the routing algorithm, but I didn’t ! We’re gonna try to put motors on our switches now.

  • @Jonkuzon
    @Jonkuzon 6 วันที่ผ่านมา +1

    Super interesting video! And it gave me a newfound appreciation for real world train coordination

  • @The8BitNerd
    @The8BitNerd 3 วันที่ผ่านมา +1

    As a high school student who’s learning CS, this was pretty interesting.

  • @Beto_Mori
    @Beto_Mori 6 วันที่ผ่านมา +3

    Yaay I love this kind of LEGO content, great video editing btw ❤ love from Brazil 🇧🇷

  • @pybricks
    @pybricks 3 วันที่ผ่านมา

    Amazing! You really took Pybricks to the next level!

  • @jazzinstinct
    @jazzinstinct 6 วันที่ผ่านมา +3

    yoooo new eggybricks video!

  • @moomoome42
    @moomoome42 6 วันที่ผ่านมา +2

    Excellent as always!!!!! I look forward to these every time!

  • @shroomzzz
    @shroomzzz 6 วันที่ผ่านมา +2

    Damn, my longest pybricks program is like 19 lines. I am a caveman compared to you two! So great of you to create the concept, show everyone how to do it, and then share the instructions.

  • @JamesBrophy
    @JamesBrophy 5 วันที่ผ่านมา +1

    This was lovely. Instant subscribe.

  • @BrickMasterPoland
    @BrickMasterPoland 5 วันที่ผ่านมา +1

    Keep up the amazing work, love your videos and attitude to everything, KEEP UP!!!

    • @BrickMasterPoland
      @BrickMasterPoland 5 วันที่ผ่านมา

      Also challange for you: make a monorail or a train drive to big Lego airport😁

  • @bry2307
    @bry2307 วันที่ผ่านมา

    It is kind of funny to see the trains trying to push each other out of the way

  • @ThatEverydayEnthusiast
    @ThatEverydayEnthusiast 2 วันที่ผ่านมา +1

    It is a crime to not have Chicago as a central hub.

  • @olbasoil
    @olbasoil 5 วันที่ผ่านมา

    Insane production and great entertaining vid as always :^) forever impressed by how well you guys are able to articulate tough concepts in a way that's accessible and understandable to ppl with no prior knowledge!!

  • @cjholland48
    @cjholland48 6 ชั่วโมงที่ผ่านมา

    As someone who’s in Kansas City, I’m very glad you mentioned KC in this video

  • @steffiiizh
    @steffiiizh 6 วันที่ผ่านมา +2

    You two are soooooooo cool!

  • @stockicide
    @stockicide 6 วันที่ผ่านมา

    Great video.
    All your hard work paid off!

  • @BrickCoward77
    @BrickCoward77 6 วันที่ผ่านมา +1

    OMG you must be the coolest people on TH-cam

  • @F40M07
    @F40M07 4 ชั่วโมงที่ผ่านมา

    Finally. Actual locomotives!

  • @sreyachatterjee7387
    @sreyachatterjee7387 6 วันที่ผ่านมา +3

    Make a functional rail crossing where road meets rail and keeps the barrier closed for a 150 cal long train at most

    • @sreyachatterjee7387
      @sreyachatterjee7387 6 วันที่ผ่านมา

      I meant car when I said call

    • @easternpromises7991
      @easternpromises7991 6 วันที่ผ่านมา

      150... Another reason to appreciate that in Europe, freight trains cannot exceed 800 meters xD

  • @pedro380085
    @pedro380085 6 วันที่ผ่านมา +1

    it's honestly amazing how come these are not LEGO education videos.

  • @beWorldly
    @beWorldly 6 วันที่ผ่านมา +1

    That was both fun and educational.
    You guys absolutely rock and deserve millions of subscribers!!
    We need the younger generation to look up to smart people like you (instead of the dumb celebs that they currently do).
    Please continue making these awesome videos.

  • @Magmoe
    @Magmoe 6 วันที่ผ่านมา +2

    Love your videos ❤

  • @dafoex
    @dafoex วันที่ผ่านมา

    A few of those paths were completely clear to move, but the trains still waited around for other trains to complete their tasks. What would be the best way to optimise order of operations?

  • @kiml42
    @kiml42 2 วันที่ผ่านมา

    I'd really like to see this working with multiple trains moving at the same time.

  • @Fluinguin
    @Fluinguin 6 วันที่ผ่านมา +1

    THATS SOO COOL!

  • @TheRealJoeMartinson
    @TheRealJoeMartinson 6 วันที่ผ่านมา +1

    Haven't watched it yet, but something tells me this is the video I've been waiting for...

    • @TheRealJoeMartinson
      @TheRealJoeMartinson 6 วันที่ผ่านมา +2

      Ooooooookay, just finished watching it for the first time (there are gonna be some more, and maybe some questions). Two things are for sure:
      - This is the best and most entertaining video I've ever seen on LEGO trains automation, and probably one of the best and most entertaining on plain train automation.
      - You need a bigger house 😂
      Thanks for your amazing work on this channel, you girls keep my brains moving.

  • @NathanaelRig
    @NathanaelRig 6 วันที่ผ่านมา +3

    Wow they're FAST

  • @nicolaskuehnle3521
    @nicolaskuehnle3521 3 วันที่ผ่านมา

    I think the next big challenge is to be able to have this system loop with each train having two or three pieces of freight

  • @PP4E
    @PP4E 5 วันที่ผ่านมา

    Great job 👏

  • @seanmcgarry6612
    @seanmcgarry6612 6 วันที่ผ่านมา +2

    Could the trains be programmed to go about their routes simultaneously? So instead of each train taking turns moving, every train whose route isn't blocked moves at once? There were multiple instances in the video where only one train was moving, even when the routes of several others weren't actually busy.
    Also, can you build the system so it can flag specific routes as closed (Such as if they need to be closed for maintenance or inclement weather) at will?

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +1

      These are great, thanks! Will add for next time

  • @warpik
    @warpik 4 วันที่ผ่านมา

    what about make trains running simultaneously ? Maybe not all together, but at least not 1 by 1 ?
    And add more lines - to allow run train back and forth ?

  • @codyrapp7253
    @codyrapp7253 6 วันที่ผ่านมา +2

    The CSX road number is accurate to the real-life counterpart.

  • @XPercussion
    @XPercussion 6 วันที่ผ่านมา

    Finally! Another video

  • @Foxybricks
    @Foxybricks 6 วันที่ผ่านมา

    This is my definitely not happening plan that I came up with thinking I was so clever when everyone else is thinking the same thing

  • @i_like_trainsyt
    @i_like_trainsyt 6 วันที่ผ่านมา +1

    i have some ideas for challenges that real trains would go through.
    1: get 2 trains to go to the same city: eg train a goes from city z to city x and train b goes from city y to city x
    2: implement priorities. Lets say there are two trains traveling the same direction train a is travelling at 5 speed and train b is traveling at 10 speed can you get it that train b arrives at its destination first and what about vice versa?

    • @Ghfvhvfg
      @Ghfvhvfg 21 ชั่วโมงที่ผ่านมา

      The rabithole is so deep yould make difewnt trains types depos fright hub pasenger tacks..., the possible time is endless here if you do it logh enogh you can work in rail dispatch any day😂

  • @ЛЬВИНИ
    @ЛЬВИНИ 3 วันที่ผ่านมา

    Very nice video, likes from me.

  • @ElenarMT
    @ElenarMT 6 วันที่ผ่านมา +3

    What a luck! You posted this a minute ago, and I immediately get to watch it. Nice!!
    This is such a clever video. I only saw that creator hub on lego this week and couldn't understand what it did. You've used it in a very clever way

  • @Kirgruby
    @Kirgruby 6 วันที่ผ่านมา

    This reminds me of a board game called ticket to ride which involves all the places you used in this video and also has the find the shortest route thing

  • @Zubair.Lawrence
    @Zubair.Lawrence 6 วันที่ผ่านมา

    Try adding a cache so you doing have to recompute routes. Could help free up some cpu cycles

    • @Ghfvhvfg
      @Ghfvhvfg 21 ชั่วโมงที่ผ่านมา

      Tue or maybe have static document eith listed pahts

  • @andrzejstefanik8228
    @andrzejstefanik8228 6 วันที่ผ่านมา

    Ticket to Ride live :D as always great movie ❤

  • @tld8102
    @tld8102 6 วันที่ผ่านมา

    I explored using DCC involving the 12v metal tracks. using current and resistance sensing to determine where train is located

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +1

      Oh that's super cool!! How well did that work?

  • @brianmoretti6480
    @brianmoretti6480 5 วันที่ผ่านมา

    This would cost a small fortune!!!!! More then what my O scale layout costed !!! And it’s 28’x20 three levels!!!! And I run that with a remote control and I can run 99 plus engines

  • @LutraLovegood
    @LutraLovegood 4 วันที่ผ่านมา

    What if we want as many trains as currently possible to be running in parallel instead of only sequential order?

  • @roxythegachafoxy6203
    @roxythegachafoxy6203 6 วันที่ผ่านมา

    I like trains :)

  • @Styreta
    @Styreta 6 วันที่ผ่านมา

    Eyyyy another video from the lego chicks! Time to grab a snack and enjoy some excellent editing!

  • @kylegordon
    @kylegordon 3 วันที่ผ่านมา

    Can you integrate JMRI control and routing next? 😀

  • @lemonpepper.6772
    @lemonpepper.6772 4 วันที่ผ่านมา +2

    Loops at the end of each track?????

    • @lemonpepper.6772
      @lemonpepper.6772 2 วันที่ผ่านมา

      It just makes sense to have loops at the end of each mainline.

  • @c44-9w9
    @c44-9w9 6 วันที่ผ่านมา

    I’ve actually ridden behind the real polar express , pm 1225 and I’ve also seen the Csx , bnsf , cn , up , and ns trains irl

  • @leejoey3287
    @leejoey3287 6 วันที่ผ่านมา +1

    What about 8 trains and an extra 2 more cities: Miami and Chicago

    • @4014Railfan
      @4014Railfan 6 วันที่ผ่านมา

      Yessss we need Chicago

  • @leejoey3287
    @leejoey3287 6 วันที่ผ่านมา

    If any railway company managers watching this, they might get hired by the railway company to program all trains to drive automatically

    • @Ghfvhvfg
      @Ghfvhvfg 21 ชั่วโมงที่ผ่านมา

      litmed by saftey rules

  • @chrishook8249
    @chrishook8249 4 วันที่ผ่านมา

    According to TrixBrix, "the original switch has a weird 'curly curve' on the diverging track."

  • @lucasrios2089
    @lucasrios2089 5 วันที่ผ่านมา

    atlanta mentioned 🎉

  • @lexibyday9504
    @lexibyday9504 6 วันที่ผ่านมา +1

    this one train at a time in short bursts looks really unrealistic though. Are you sure you can't improve this even further?

    • @eggybricks
      @eggybricks  6 วันที่ผ่านมา +2

      yes, this could def improve much further! we just figured this is already way too long

  • @MURD3R3D_DRON3
    @MURD3R3D_DRON3 วันที่ผ่านมา

    Pls make a Alaska railroad version

  • @CedarLakeRailfanner
    @CedarLakeRailfanner วันที่ผ่านมา

    So just wondering why do have cslgery all the way in Canada and not Chicago or you could've replied KV with Chicago

  • @nathanluca3072
    @nathanluca3072 5 วันที่ผ่านมา

    Wow! Very Amusing. What classes did you take for programming?

  • @Whaley_Sharky_2
    @Whaley_Sharky_2 6 วันที่ผ่านมา

    5:34 yay new polar express desgin🚂

  • @spookcuh
    @spookcuh 19 ชั่วโมงที่ผ่านมา

    RARE YT FIND!!

  • @alessandroditerlizzi569
    @alessandroditerlizzi569 5 วันที่ผ่านมา

    next step is to make them run at the same time

  • @NS-8101
    @NS-8101 6 วันที่ผ่านมา

    every train nerd brain hurts after watchig this frfr, bro had to expllaining every single thing to make it as long as possible

  • @matveyrusgames
    @matveyrusgames 6 วันที่ผ่านมา

    Is CSX your favorite company? It was testing everything in the the vidio.

  • @metropod
    @metropod 6 วันที่ผ่านมา +1

    Any you’ve basically invented CBTC-ATO

  • @NicholasOrr-r2q
    @NicholasOrr-r2q วันที่ผ่านมา

    Why is there no CPKC??

  • @MedicallyHigh
    @MedicallyHigh 6 วันที่ผ่านมา

    I can’t understand all this, I just thought just building a train from Lego 😅 My dumbass can’t handle this 😅
    Kudos to you all for understanding this stuff, I sure do struggle lol 😅

  • @MrToxiLex
    @MrToxiLex 5 วันที่ผ่านมา +1

    Try making them all run at the same time, and updating their location realtime, maybe integrating a rasberry pi to run deepseek on it if needed, and then once a train completed its route, send it en route to another location randomly chosen, to make the trains constantly move

  • @PennsylvaniaRailroadoctoling
    @PennsylvaniaRailroadoctoling 4 วันที่ผ่านมา

    you forgot Florida east coast and CPKC and Amtrak

  • @DaveTheBlueEngine28
    @DaveTheBlueEngine28 6 วันที่ผ่านมา +1

    Now we need an fleet of steam trains. like the pennsylvania railroad T1 or the Union pacific challenger. why? because we need more diversity and it will remind the work man and the driver that good old days are still alive

    • @DaveTheBlueEngine28
      @DaveTheBlueEngine28 6 วันที่ผ่านมา +2

      I loved this video. and here are some suggestions.
      Union pacific big boy
      Union pacific challenger
      New york central hudson
      New york central niagara
      S100 tank engine
      Southern pacific daylight
      Porter tank engine
      Norfolk and western 611
      Pennsylvania railroad Q series
      Cab forward steamer