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.
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.)
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.
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.
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.
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)
[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.
It's funny to think of this carefully-crafted machine undoing the work done by another carefully-crafted machine.