Ostriches are diurnal, the daily activity beginning shortly after sunrise and ending soon after sunset. They may cover great distances searching for food. At night they roost at regular communal sites. Individuals of a group are always within sight and hearing of each other, but may be varying distances apart. They squat with the necks raised most of the night, although the eyes are closed. The ostrich is gregarious, and this may have evolved as a defense strategy. They form groups of up to 100 birds. Each group has its own sites for feeding, roosting and dust-bathing, and tends to avoid contact with other groups. There is a pecking order with dominant males and females, which are copied in their activities by other members of the group. There are frequent social interactions between individuals, and sometimes short fights. They are polygamous, each cock having a harem of 3 to 5 hens. The hens lay in a common nest scraped out of the ground, and together lay up to 30 eggs.