Hacker News new | ask | show | jobs
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?

3 comments

There's something minimalistic and artful in trying to come up with the smallest packaging possible, which will probably appeal to the same people who enjoy Japanese candy, and Japanese culture in general.

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.

The only reasonable solution to this is to create a cnc machine that will pack the candy
because it's cool
Yup.

This is one of those things that 99% of customers will not notice. Some small percentage may prefer the closely-packed box over the bag but not be able to articular why.

And some very small percentage will see it, recognize the difficulty in continuously doing something like this over the "throw it in a bag and ship the bag" approach, and think it's amazing. Those are the fans that will repost your stuff, talk about you to others, etc.

This type of stuff is what creates the "1" in the 90-9-1 split.