This LEGO machine can sort any kind of LEGO

I’ve had a fair bit of Imposter Syndrom in moving from Sr. Developer/Architect to Sr. Data & Applied Scientist. Maybe… I’ve picked up more than I thought. :thinking:

1 Like

That’s your problem, right there! :wink:

1 Like

Well, ignoring the complex words… Your requested goal is to reduce the concept of a lego brick such that, as it travels down a conveyer, something tells the computer to route it to the bin that it’s currently next to, and that thing can handle different types of bricks (“dynamically alter the sorting algorithms to adjust what goes into each of the 18 bins”).

I think we can all agree that what defines a lego brick includes things like dimensions (height, width, depth)… that’s 3 dimensions. Let’s just go with three and ignore all the crazy bricks and colors for now.

One way to do decide when to flip it into a bin might be to multiply the three numbers together to get the brick’s volume. A 1-unit volume brick (either a 1x3 thin wedge, or a 1x1x1 brick) might go into the first bin. A 2-unit volume brick (1x6 thin wedge, 2x1x1 brick, 1x1x2 brick, etc.) would go into the second bin. The last bin would have the largest bricks. What we’ve done is reduce width/depth/height, the 3 dimensions down to one dimension: volume.

Now, if we think about what landed in the first bin, it’s all small bricks that will visually look pretty similar (ignoring color for the moment). So reaching in and grabbing bricks to sort them manually will be more challenging. Running the bricks through again (say, adjusting the bins so the first bin gets width==1, the second bin gets height==1, etc) might result in errors because everything looks so gosh darn close.

I propose making it so that we choose a number other than volume.

Let’s, for example, add +1 for each height (rounding up to the nearest whole number), +3 for each width, and +5 for each depth. And each time the result is greater than the number of bins we subtract the number of bins (wrap around, or modulus operation):

  • The 1x6 thin wedge goes into bin 3+18+5 = 24 - 18 bins = bin 6.
  • The 2x1x1 brick ends up in 2 + 3 + 5 = bin 10.
  • The 1x1x2 brick ends up in 1+3+10 = bin 14.
  • The 1x1x1 brick ends up in 1+3+5 = bin 9.

We mapped the 3 dimensions to different points on the number line, and now the similar bricks have been fanned out. Now, let’s add color… Let’s say Blue = 1, Grey = 2, White = 3, etc., and we can then choose to, say, add 7*Color to select a new place on the number line.

There are more complicated ways to reduce everything down to a single number (a single dimension), which I linked to… and some of those ways can preserve the ‘similarity’ of the pieces, such that all the windscreens and TVs end up in one bin, and all the wheels and tires and steering devices end up in another. And if we decide to do that, we could just as easily choose to spread them apart like I mentioned.

Hope this helps understand the concept!

1 Like

OK, let’s imagine you’ve encapsulated every sub-type of lego brick, and defined the state-space of each element in a mathematically perfect way. Now all you need, is a mathematically perfect lego builder to take advantage of your system…

Unlike software, Lego bricks take up space, and have mass. They need to be available to the builder in a timely way. So let’s imagine a perfectly spherical space with the builder at the center, and each sub-type of brick in its own bin. Some bins are bigger than others. Do we make them deeper? lower to the floor? How small a front can each bin present to the user, and still be legible?

If you tale a look at all the brick types out there, it quickly becomes obvious that such a mathematically perfect build space isn’t feasible-there are just too many types of bricks to male each one equally accessible.

Maybe we could put our builder in a rolling office chair, and the circular desk with all the bins, farther away. And then she needs a rolling table to move with her as she grabs the parts she needs.

In the real world, toy users need to make some types of brick more accessible. Maybe some colors are more desirable than others, maybe it’s fiddly technic parts that need to be easiest to reach, or the builder needs to proritize fiddly washing machine connections in 6 axis. There is going to always be some compromize between the perfect cataloging syatem, vs the perfect storage system.

Imagine instead of categorizing plastic toy bricks, you were instead doing all that stuff with words of the english language. Those words can all be broken down into ascii, so they’re really no different in terms of the state space.

My question to you is this: with all that categorized perfection at your fingertips, can you organize the words in a dictionary so they become more accessible to an aspiring poet or novelist who wants to use them?

Lego bricks are parts of a language. Compositions in this language can be (used to be, in the Before Times) seen at public brick exhibitions like Brickworld or Art of the Brick. Just about every major city has (used to have) its own annual exhibition.

Unlike, say Latin, the language of Lego keeps evolving every year, with new pieces, new trends, new building techniques, and other parts being discontinued and methods being depreciated. There is a list of “illegal” build techniques that won’t ever be used by the mothership, and a whole host of dodgy grey area methods and third party vendors, used by builder who aren’t satisfied to only use what The Lego Group sells. (Minifig weapons and train parts seem to be pretty well accepted, but don’t get caught using megabloks!)

I’m sure you could find a way to pinpoint the hamming distance for all of those grey area parts too… I’m just doubtful that you could leverage this to make the bricks any easier or more fun to actually… y’know… play with!

1 Like

3qiopd

3 Likes

Certainly! And I addressed this in the very first post… even down to the fact that color would be an important disambiguator for humans that need to find their part… as others have mentioned, it’s a lot easier to find the right color in a bin of only 1x1s, than it is to find a 1x1 in a bin of 1x1, 1/2x1, 1/2x1/2, 2x2s, etc. etc.

You choose the weightings you want. You start with “perfection,” and modify it to suit your needs. I’m not sure what alternative you’re proposing is… Starting with an imperfect model and trying to make it work? Just giving up and not try to find a way to make our lives easier? What’s the point of our dialog at this juncture?

Absolutely! How do you think Hamming Distance, or the word2vec algorithm was initially used? It identifies related concepts hidden behind words, and our usage of them. Pair that with a phonetic dictionary and you have a rhyming thesaurus that suggests words that are applicable to your current stanza. A quick search shows someone’s done this (though it’s currently unavailable). You’d type in concept words, then provide the start and end point of the word vector space (such as man/woman), and it would compare and contrast them in rhyming verse: Computation and Rhetorical Invention: Finding Things to Say With word2vec | Mark Wolff

Most excellent! Your observation was, “I hope it is possible to dynamically alter the sorting algorithms to adjust what goes into each of the 18 bins.” I enthusiastically wished to share an interest of mine, and how this domain could indeed address your concerns. It appears I have succeeded!

Well, shoot. I thought I’d addressed the original curiosity of yours… but it appears this is the actual complaint that you were harboring?

[Edit: It’s funny, because this is a problem in the Data Science domain… people often ask questions they think we can answer (which we usually can), rather than the question they actually can take action upon (which we could have answered too, but is typically a subtly different type of answer than the first question posed). Unfortunately, I didn’t ask for clarification right away, such as I would in my typical day-to-day job.]

For most, the time spent sorting eats into playtime. Thus the desire to automate said task, to provide for even more time at play.

If, however, you feel most of the fun is in sorting through the aftermath of a build, optimizing that particular problem would most definitely not be desirable. I take it you fall into this latter group? For your use case, I’d actually recommend a random sort that simply pared down a larger bin into 18 more manageable-sized bins that could be sorted through an hour at a time.

Which, again, answers your question!

Yes, you can change it to fit your needs. The end-goal being that of increased time to pursue activities which you prefer.

I genuinely wish you the best, and hope that I’ve been helpful to someone out there in understanding how the data science/automation/machine learning fields can be applied to the world around us.

This topic was automatically closed after 5 days. New replies are no longer allowed.