Try these challenges to exercise your programming skills, all based on the AntPheromones2 program:
0. Print the averageBugNbor1Count and averageBugNbor2Count
in the report file each time step.
1. Calculate the average distance to pSource for agents with
different randomMoveProbablities. For instance, one quick method: Calculate the averages for agents in each quartile of randomMoveProbability. Print these values out each step in the report file.
2. Create and use a Comparator to sort the bugs on some other
feature, e.g., the amount of pheromone at the site they occupy.
3. Devise another measure (or more than one!) of the extent
of clustering. Calculate it each step, write to the report file.
4. Define two types of bugs:
type0: move as before, to pheromone type1: move to lower pheromone! fractionType0 parameter specifies what fraction of the bugs are type 0 (and therefore how many are type1, too).
5. Define a bug happiness: e.g., pheromone where it is.
Have each bug calculate some kind of running average of its recent happiness, e.g., averaged over the last 10 time steps. Then average that over all bugs, and write the the report file.
Define a custom slider for probRandMoveMean. When it is changed, re-assign probRandMove to all bugs, using the distribution defined by that new mean.