The context of this project is actually Phase 1 of a larger business venture. There exists a large secondary market for lego kits which is tolerated -- and sometimes indirectly supported -- by the Lego corporation in part because they help maintain interest in new kits more than they threaten to displace them from the market.
Most kits are purchased for kids, and most kids play with their kits, mix their contents, and make new inventions with them all the time. Once kits are mixed, they are almost never restored to their original separate condition. In fact, doing so without expert level knowledge of lego bricks is nearly impossible.
Based on eBay pricing, kits can lose as much as 95% of their value when mixed.
My wife has been working on a plan for a second-hand lego store. Part of the plan is to generate a way to give parents a decent trade-in price for their mixed kits, or provide instructions and methods for un-mixing them.
This is phase 1 -- developing an "expert system" that does not require a subject matter expert to use.