Many food hoarding animals live in small groups structured by rank. The presence of conspecifics in the hoarding area increases the risk of losing stored supplies. The possibility of stealing from others depends on a forager's rank in the group. Highly ranked individuals can steal from subordinates and also protect their own caches. Since storing incurs both costs and benefits, the optimal hoarding investment will differ between individuals of different rank. In a game theoretical model, we investigate how dominant and subordinate individuals should optimize their hoarding effort. Our model imagines animals that are large-scale hoarders in autumn and dependent on stored supplies for winter survival. Many examples can be found in the bird families Paridae and Corvidae, but the model can be used for any hoarding species that forage in groups. Predictions from the model are as follows: First, subordinates should store more than dominants, but in a predictable environment, this difference will decrease as the environment gets harsher. Under harsh conditions, dominants should store almost as much as subordinates and, later, spend almost as much time retrieving their own caches as subordinates. Second, if on the other hand, bad winter conditions were not expected when storing, dominants should spend more time pilfering caches from subordinates. Third, in populations that are highly dependent on stored supplies, dominants should store relatively more than in populations that are less dependent on stored supplies. Fourth, harsher environments will favor hoarding. And finally, if dominant individuals store, it implies that hoarders have a selfish recovery advantage over conspecific pilferers.