Under the threat of predation, animals often group tightly together, with all group members benefiting from a reduction in predation risk through various mechanisms, including the dilution, encounter-dilution, and predator confusion effects. Additionally, the selfish herd hypothesis was first put forward by Hamilton (1971). He proposed that in order to reduce its risk of predation, an individual should approach its nearest neighbor, reducing its risk at the expense of those around it. Despite extensive empirical support, the selfish herd hypothesis has been criticized on theoretical grounds: approaching the nearest neighbor does not result in the observed dense aggregations, and the nearest neighbor in space is not necessarily the one that can be reached fastest. Increasingly complex movement rules have been proposed, successfully producing dense aggregations of individuals. However, no study to date has made a full comparison of the different proposed movement rules within the same modeling environment. Further, ecologically relevant parameters, such as the size and density of a population or group and the time it takes a predator to attack, have thus far been ignored. Here, we investigate the reduction in risk for animals aggregating using different strategies and demonstrate the importance of ecological parameters on risk reduction in group-living animals. We find that complex rules are most successful at reducing risk in small, compact populations, whereas simpler rules are most successful in larger, low-density populations, and when predators attack quickly after being detected by their prey.