Text this: Ideal solution to the king's problem as an optimal average solution