Item selection by means of a maximizing function