# Ideal number of Fruit Baskets

I've been playing some Runescape lately and while training the "Thievery" skill, I encountered a little math question I would like to figure out:

The mechanics are simple: One after the other, the player picks up each fruit at random. If there are baskets in the player's inventory, certain fruits can be placed in them. Given the drop chances for each fruit and the rules below, what is the ideal number of empty baskets for the player to have in their inventory to maximize the number of fruits that can be picked up before the inventory is full?

Rules:

• An empty inventory has 28 item slots.
• Each fruit and each basket use up one item slot (regardless of type or contents).
• Placing a fruit into a basket frees up an item slot in the inventory.
• A fruit has to go into the inventory first, and can only then be placed into a basket. As long as the inventory is full, no more fruits can be picked up. (This is the point where the 'game' ends, unless one fruit can be moved into a basket.)
• Dropping fruit is not allowed. Once it is inside the inventory it can only be moved into a basket (if possible) or has to remain inside the inventory.
• Each basket can hold up to 5 fruits of the same type. Mixing different fruits in one basket is not possible.
• A basket can only hold apples, bananas or strawberries.
• Each fruit has a different drop chance (see table below).

Drop Chances:

Cooking Apple 38% Yes
Banana 17% Yes
Jangerberries 9% No
Lemon 8% No
Redberries 7% No
Pineapple 6% No
Lime 5% No
Strawberry 4% Yes
Strange Fruit 3% No
Golovanova Fruit Top 2% No
Papaya Fruit 1% No

And here, a little visualization: