How Trail Laying and Trail Following Can Solve Foraging Problems for Ant Colonies