What score-assigning function would maximize this desired shape?

24 Views Asked by At

Let's say I have a setup where an agent places blocks into bins in such a way as to maximize its "score". The score is a function of the number of bins filled and the number of blocks in each bin. The bins are automatically sorted largest to smallest. The arrangement I wish to have the highest score is this:

enter image description here

A trivial function would be "Number of blocks in the largest bin" which would maximize this:

enter image description here

Or "Number of bins filled" which would maximize this:

enter image description here

You could take the product of "Size of largest bin" and "Number of bins", but that would have this maximize the score:

enter image description here

So what scoring function could I give that would give me the roughly smoothly-decreasing arrangement of blocks that I desire? Preferably the least complicated, the better.

1

There are 1 best solutions below

0
On

Let $x_b$ be the number of blocks in bin $b$ and maximize $$\min\limits_{b\in \{1,\dots,n-1\}} (x_b-x_{b+1}).$$ This will make the decreases uniform.

If you prefer steeper decreases at the beginning, maximize $$\min\limits_{b\in \{1,\dots,n-1\}} b(x_b-x_{b+1}).$$