|
|
|
|
|
by phee
3495 days ago
|
|
As others have said, I would go with simulated annealing, or any non convex optimization algorithm you're more comfortable with. But first I'd investigate what's really the gain of closely packing the candies. Would shipment costs increase with a bigger non completely filled box? wouldn't a non rigid bag be better? Do non closely packed candies get damaged with shipment? Do customers prefer closely packed candies? I mean, let's say you get good enough local optimum configurations, then you have to exactly follow them packing the candies one by one... wouldn't it be easier to throw everything in a bigger bag and ship that? |
|
And it doubles up as a 3D puzzle for the user! Take everything out and try to put them all back in. And if you can't, just eat some of the candies to make it easier to solve.