Hacker News new | past | comments | ask | show | jobs | submit login
This machine separates your Skittles into color groups so you don't have to (zagg.com)
72 points by ColinWright on Nov 6, 2012 | hide | past | favorite | 22 comments



I wonder how much effort the Skittles factory puts in to ensuring each bag has a selection of all the colors. They certainly have some large high-volume plant to do so.

It's funny to think of this carefully-crafted machine undoing the work done by another carefully-crafted machine.


Couldn't they just mix all the colors together in roughly equal proportions (by weight, for instance) before packaging them into packets, and just rely on the statistical improbability of a noticeable imbalance in colors? I doubt there is actually a machine that counts out the Skittles by color and makes sure each bag gets the right number of each.


as someone who has kept track of their skittles color distribution over the course of a year, I can attest that there can be wide fluctuations in distribution percentages.

I wish I had kept all the numbers, but IIRC, the "typical" bag would have roughly 55-60 skittles, so the "average" color would have 11 skittles. It was common to see a single color with only 9 skittles. I can't recall ever having a bag have one color with less than 7 of any one color, but I would have on occasional see one color get as many as 18 of one color.

Sincerely yours, a gigantic nerd.


5 colors, so:

   P(color) = 0.2 = p
Expected number of, say, blue, in N = 55 skittles is:

  E(N_blue) = Np = 11
Standard deviation:

  Sdev(N_blue) = sqrt(N p (1-p)) = 2.95
So you would expect to see 11 +/- 3 skittles.

(If you take the largest discrepancy of the 5 colors, it's harder to compute.)

If you want to look at a large deviation from the expected:

  P(Nblue < 7) ~= P(Nblue = 6) = choose(55,6) p^6 (1-p)^49 = 3.3%
which is pretty significant, especially considering you were looking at large deviations over any of five colors. In the other direction:

  P(Nblue > 17) ~= P(Nblue = 18) = choose(55,18) p^18 (1-p)^37 = 0.98%
which is still pretty significant. With probabilities this small, and events like these that are lightly-correlated, the second-order terms in the relevant Bonferroni inequality will be pretty small, so

  P(any color = 18) ~= 5 * P(Nblue = 18) ~= 5%
(You could do all these calculations more exactly, but they are within a factor of 2.)


> as someone who has kept track of their skittles color distribution over the course of a year

I mean did you not expect someone ask why? Also, why?


1. I like the taste having an even distribution (i'd eat one of each color at the same time). There was a stupid little pattern on how on how I'd eat the extras to get each color to have an equal number. 2. I started a very statistics heavy programming job, so I thought it'd be fun to run some numbers on something novel.


The colours are all coloured separately, so ensuring a good chance of an even mixture just involves combining equal amounts of each colour and mixing them up. Whatever amount you take, you're likely to have an even mixture of each colour.


An industrial grade version: http://www.youtube.com/watch?v=Q8PNMcNEjdA


After seeing your link, I just watched a half hour of industrial robots.

They're so cool.

Look at how fast this thing moves!! http://www.youtube.com/watch?v=v5eR0eHknZk

This is awesome (commentary is kind of boring) http://www.youtube.com/watch?v=4TOotC_Q3sU

Pick and place machines are pretty cool too, they're like anti-sorting machines. http://www.youtube.com/watch?v=nah4BQ9y8IY


You should see the chip shooter robots:

http://www.youtube.com/watch?v=nah4BQ9y8IY

Humans are so screwed.


You should look at the last video I posted :P


Best part of that video is how it dumps out all its work at the end.


That's very jolly! I like how cleanly constructed it is. On a DIY hacking project that kind of attention to neatness can make all the difference between "oh, cool idea" and the feeling of an actual product (even though it's in fact one of a kind).

I wonder how feasibly the opaque parts could be replaced with transparent ones and whether that would look cooler or just plain tacky?


I'd like to see something identical to this, but with Marbles. Now THAT would be something!

The simplest mechanism is would be something like:

1. Marble goes in, color is scanned and stored. Any future marbles detected with that color go into the same slot.

Of course there are many problems, mainly because Marbles come in every color and pattern imaginable. How would you deal with patterns and multi-colors? What kind of tolerances would you use for more general sorting?

I'd be fascinated to see how someone would deal with these problems. The problem of multi-color and pattern recognition might have application in many other fields.

What about actually sorting each marble individually by color shade from reddest to violetest? That would probably necessitate a storage mechanism.


Simple, funny machines like this are mesmerizing in their elegant performance and almost Unix-way determination of doing one thing, but doing it well.

The video also instantly reminds me of another guy having fun with little colored candies - the one that conducted M&Ms breeding experiments (http://rogerebert.suntimes.com/apps/pbcs.dll/article?AID=/20...).


Sometimes I see other people's ideas and wish I had thought of that. Sometimes I'm just happy there exist people who love doing this kind of thing.



We did a project of this ilk at the university a couple of decades ago. Differences were the color detection circuit was a pain-in-the-ass and we used M&Ms instead of Skittles.


It's a lot easier now. =)

TAOS had a contest to build an M&M sorter based on their integrated color sensor. The winning design was nice and simple (and a lot simpler than this Skittles machine)

http://candyaddict.com/blog/2005/12/02/how-to-make-an-mm-sor...


[EDIT] Adding some useful quotes from the radio interview and cleaned up the facts

[EDIT] The homepage for the company is at [3]

A similar, though much larger, machine for sorting oysters was invented in Australia a few years back (around 2006 by the look of it).

I can't find any specific web presence for the machine itself, but I managed to dig up an interview with the inventor [1] and the episode of 'Inventions from the Shed' I originally saw it in [2].

The basic premise, from memory, is to feed oysters into a chute via a conveyor belt. The oysters are funnelled so that they drop in front of a series of cameras set at different angles, which use shape recognition to match the oyster with one of a few grades of oyster.

[We built] a scanning detector that would take four images of the oyster as it fell--just falling under gravity and passing through four separate scanners at 45 degrees to each other, produces four separate images.

We take the four images and they're processed through a dedicated microprocessor and the algorithms that we use are fairly sophisticated, because they have to react very fast. And, yes, we produce in a sense a volumetric calculation

The machine then chooses which bin to route the oyster to by rotating a directing piece at the bottom of the drop.

Directly below the scanning system we use a server motor which is effectively the same as you would use in industrial robot and it has a slide that is re-positioned for each oyster, and is stationary as the oyster is diverted from the direct fall down into an exit tube. That server motor rotates and is in its new position within about .03 of a second.

The machine ends up being quite fast, with around a week's worth of work done in less than a day. The accuracy, at 98%, is also impressive.

We have had one machine operating in excess of ten a second. We've limited it for this particular production machine to a theoretical maximum throughput of one eight of a second. It works out when an oyster grower is putting them through at an average of probably three to four a second [which is] about a thousand dozen an hour, between 800 and 1,000 dozen an hour

Some diagrams showing what the machine looks like are at [4].

The main differences between this mechanism and the skittle machine is the extremely quick sorting necessitated by the application (sorting large amounts of oysters that was previously done by hand) and the reliance on shape matching rather than colour. I wonder how hard it would be to make a machine that sorts skittles in a similar way, that is by dropping them down a chute, analysing and directing them before they reach the bottom rather than the somewhat slower method evident in the demonstrated machine.

[1] radio interview - http://www.radioaustralia.net.au/international/radio/onairhi...

[2] video - http://www.dailymotion.com/video/xmdk44_inventions-from-the-...

[3] homepage - http://www.oystek.com.au/

[4] drawings

grader - http://www.oystek.com.au/images/grader_line.jpg

top down view - http://www.oystek.com.au/images/grader_line2.JPG

complete setup - http://www.oystek.com.au/images/grader_line3.JPG


Finally...


Red FTW!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: