Competition Versus Cooperation: Success of Individuals Foraging Alone and in Groups