Group foraging and colonial formation in avian species are examined with an artificial life (alife) model using genetic algorithms (GA) and neural networks. Horn's classical model predicts that colonial birds are more successful than territorial ones in a patchy resource environment, and the reverse is true when resources are evenly distributed. The weak point of the model is confusion between colony formation and flock foraging and implicit assumption of perfect knowledge of resource distribution by foraging birds. The authors made an alife model that realized both flock foraging and colonial formation simultaneously during evolution in a patchy environment. The reference organisms were egrets, which make colonial nests in the breeding season and colonial roosts in the nonbreeding season. In the computer model, artificial egrets used the presence of other egrets as an indicator to locate resource-rich patches in a resource-clumped environment. On the contrary, egrets were less reliant on other individuals as a source of foraging information in evenly distributed resource conditions. Colonial nesting was also induced only in a patchy environment where the foraging efficiency was always higher than the evenly distributed condition. Local enhancement played an important role in achieving colonial and flock foraging.