0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Have you tried the classic "sum of number of blocks squared"? $\endgroup$ Commented Sep 22, 2020 at 21:39
  • $\begingroup$ That function would be completely independent of the arrangement of blocks in the bins unfortunately. $\endgroup$ Commented Sep 24, 2020 at 2:12

1 Answer 1

1
$\begingroup$

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}).$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .