If you’ve ever dabbled in collectible card games — Magic: The Gathering, Pokémon, etc. — you know how quickly collections can grow. One pack turns into two. Two turns into five. Then they release some new set and… screw it, why not buy a whole box?

Card resellers have the same problem, just magnified to an extreme. People who’ve stopped playing a game for whatever reason (sometimes years prior) walk in with massive collections and just want to get rid of them. Online resellers and card stores can end up with monstrous stockpiles of unsorted cards, and going through them requires a ton of time and a wealth of ultra-specific knowledge of a game. Which cards are rare? Which ones are a bit more common, but useful enough that players would want to buy them for their decks? What are they all worth?

Sorting Robotics, a company in Y Combinator’s Winter 2019 class, has built a robot laser-focused on that problem. You load it with up to 1,000 Magic cards, and it’ll automatically sort them to your liking, look up their values and give you all the data in a big spreadsheet.

The machine is able to sort by a bunch of different criteria, be it alphabetically, by the set a card is from or by its resale value (as pulled from TCGPlayer). Want a big pile of all of the cards worth more than $1? It can do that. If you need them sorted other ways, the company is open to helping with custom sorting logic.

One challenge the team had to tackle early on was how to handle cards with minimal contact for the sake of preventing possible damage. Some Magic cards, after all, resell for hundreds or thousands of dollars — if their machine got a reputation for damaging cards even occasionally, no one would use it.

So Sorting came up with a pneumatic system that uses cameras, computer vision, polished surfaces and silicone suction cups to identify and move cards from stack to stack with limited contact. There are a few fancy tricks involved, like picking up cards in a way that utilizes the airflow within the machine to keep it from lifting two lightly stuck together cards at once. If a card is loaded into the machine upside down, it’ll shift it into a pile with other upside down cards to be manually flipped and re-sorted later. Sorting 1,000 cards takes 1-2 hours, depending on the criteria by which they’re being sorted.

If a card does somehow get damaged, Sorting Robotics says they’ll cover the cost. (They’ll want to check the feed from a pair of cameras inside the machine to see exactly what happened, so you probably shouldn’t go throwing an already bent up Time Walk card in there and asking for reimbursement.)

Another challenge: dirt. Even for collectors, cards are rarely 100 percent pristine. There’s the natural oils from your hand, the dust from being stored over time and even some amount of the card’s own dust, left over from the printing and cutting process. You might not really notice it if you’re just dealing with your own collection — but when you’re putting thousands of cards through a machine with moving parts and camera lenses, the dust adds up fast. Later versions of their machine have been re-tailored to better deal with dust, and to be more easily maintained when the dust builds up.

Sorting has three founders: Nohtal Partansky and Sean Lawlor (both of whom were previously systems engineers at NASA’s Jet Propulsion lab), and Cassio Elias dos Santos Junior, a computer vision engineer who previously built a popular Magic card scanning app for Android.

As for how much it costs, the company would only say that it’s working on that on a case-by-case, shop-by-shop basis. They stressed that they’re focusing on building these for online resellers and card shops — so it sounds like it’s not in the price range that most hobbyists might consider.

The machine currently only sorts Magic cards, though the founders tell me support for Yu-Gi-Oh! and Pokémon cards is coming shortly.