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!!
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! ♥️☮️🕯️
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.
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!!
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.
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!
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?
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.
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.
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
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 😅
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
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.
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!
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"
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.
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.
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!!
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.
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?
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.
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?
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 ?
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?
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😂
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
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
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
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 😅
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
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
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
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!!
You just covered half the theory of my comp-sci degree in a 25 minute Lego video
The production value of this channel is insane
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! ♥️☮️🕯️
Thank you for sharing!
In light of recent events you might want to scrub out some of those details just in case..
Very similar story to someone at my church! Nice!
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.
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!!
Hi! 👋 Freight Conductor for CN here! Was a lot of fun watching a train oriented episode!
How do you not have 1 million subscribers!? Excellent content
It takes real experts to make these explanations so simple
24:10 GREATEST REFERENCE OF ANYTHING OH MY GOD. AN INCREDIBLE VIDEO GOT EVEN BETTER
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.
Thank you so much!
I’ll never skip and eggy video! 🎉 you make such interesting unique videos!
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!
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?
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.
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_
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.
Awesome video! Always worth the wait, I can't imagine how much work went into this one!
Thanks so much!! And thanks much for the switch design (hope it's okay that we tortured it somewhat haha). Thanks for watching!!
@@eggybricks Haha, no worries 😁. Thanks for crediting Tom Cook as well, the mechanism is really his, I just made changes to the structure
This is the coolest thing I’ve ever seen in my life
Thanks
Wow, thanks so much for the support!!
Y'all cookin with these videos 🔥
As a train nerd and a programmer and a lego lover when I was a kid this video is awesome
Bro casually just made positive train control in lego and it’s the coolest thing ever
"Okay, that's enough"? You can't have enough of 3:51 😂😂
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
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 😅
Very wel explained beginner friendly explanation for these topics! Super cool to see it in action
This is fantastic ❤
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
Amazing video. So excited your trains routing themselves. Keep up the awesome work!
Amazing! Great work
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.
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!
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"
Frickin’ awesome!! Brilliant! 🎉👏
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.
Super interesting video! And it gave me a newfound appreciation for real world train coordination
As a high school student who’s learning CS, this was pretty interesting.
Yaay I love this kind of LEGO content, great video editing btw ❤ love from Brazil 🇧🇷
Amazing! You really took Pybricks to the next level!
yoooo new eggybricks video!
Excellent as always!!!!! I look forward to these every time!
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.
This was lovely. Instant subscribe.
Keep up the amazing work, love your videos and attitude to everything, KEEP UP!!!
Also challange for you: make a monorail or a train drive to big Lego airport😁
It is kind of funny to see the trains trying to push each other out of the way
It is a crime to not have Chicago as a central hub.
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!!
As someone who’s in Kansas City, I’m very glad you mentioned KC in this video
You two are soooooooo cool!
Great video.
All your hard work paid off!
OMG you must be the coolest people on TH-cam
Finally. Actual locomotives!
Make a functional rail crossing where road meets rail and keeps the barrier closed for a 150 cal long train at most
I meant car when I said call
150... Another reason to appreciate that in Europe, freight trains cannot exceed 800 meters xD
it's honestly amazing how come these are not LEGO education videos.
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.
Love your videos ❤
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?
I'd really like to see this working with multiple trains moving at the same time.
THATS SOO COOL!
Haven't watched it yet, but something tells me this is the video I've been waiting for...
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.
Wow they're FAST
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
Great job 👏
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?
These are great, thanks! Will add for next time
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 ?
The CSX road number is accurate to the real-life counterpart.
Finally! Another video
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 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?
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😂
Very nice video, likes from me.
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
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
Try adding a cache so you doing have to recompute routes. Could help free up some cpu cycles
Tue or maybe have static document eith listed pahts
Ticket to Ride live :D as always great movie ❤
I explored using DCC involving the 12v metal tracks. using current and resistance sensing to determine where train is located
Oh that's super cool!! How well did that work?
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
What if we want as many trains as currently possible to be running in parallel instead of only sequential order?
I like trains :)
Eyyyy another video from the lego chicks! Time to grab a snack and enjoy some excellent editing!
Can you integrate JMRI control and routing next? 😀
Loops at the end of each track?????
It just makes sense to have loops at the end of each mainline.
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
What about 8 trains and an extra 2 more cities: Miami and Chicago
Yessss we need Chicago
If any railway company managers watching this, they might get hired by the railway company to program all trains to drive automatically
litmed by saftey rules
According to TrixBrix, "the original switch has a weird 'curly curve' on the diverging track."
atlanta mentioned 🎉
this one train at a time in short bursts looks really unrealistic though. Are you sure you can't improve this even further?
yes, this could def improve much further! we just figured this is already way too long
Pls make a Alaska railroad version
So just wondering why do have cslgery all the way in Canada and not Chicago or you could've replied KV with Chicago
Wow! Very Amusing. What classes did you take for programming?
5:34 yay new polar express desgin🚂
RARE YT FIND!!
next step is to make them run at the same time
every train nerd brain hurts after watchig this frfr, bro had to expllaining every single thing to make it as long as possible
Is CSX your favorite company? It was testing everything in the the vidio.
Any you’ve basically invented CBTC-ATO
Why is there no CPKC??
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 😅
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
you forgot Florida east coast and CPKC and Amtrak
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
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