程序代写 SWEN90004: Modelling Complex Software Systems Workshop Cx.04: Agent Based M

The University of Melbourne SWEN90004: Modelling Complex Software Systems Workshop Cx.04: Agent Based Models
First Semester, 2022
This workshop aims to give students an opportunity to conduct experiments using agent-based models, and to discuss the design of a novel agent-based model. Before you begin, you should download the Ants exp.nlogo model discussed in Lecture Cx.07/08 from LMS.
Task 1: First experiment with the Ant Colony model

Copyright By PowCoder代写 加微信 powcoder

Ant colonies are able to achieve complex tasks—such as nest-building and foraging—without relying on a central leader. Rather, their collective behaviour emerges from the interactions between a large number of ants each following relatively simple rules.
In the lecture, we discussed an experiment that demonstrated how a colony of ants could self-organise to follow the shortest of several bridges between their nest and a food source (I have made the original paper describing this experiment available on LMS). Here we will conduct a similar experiment using a NetLogo model in which an ant colony has a choice between multiple food sources located at different distances.
The following steps outline how to use an ABM to conduct an experiment. The first steps have been completed and are provided for information. Read through these and then complete steps 6–8.
1. Stating the hypothesis: We first identify the hypothesis that our model will address: Our hypothesis is that an ant colony will feed from a closer food source before feeding from a more distant food source. An important feature of an hypothesis is that it is falsifiable; that is, we can show it to be incorrect. In this case, if our ants consistently feed from a more distant food source, we can conclude that our hypothesis is wrong!
2. Designing the model: This has already been done, but typically at this point we would decide what elements we needed in our model in order to address our hypothesis. For example: ants, pheromone interactions, a nest location, food sources that can be located at varying distances from the nest, etc.
3. Identifying the key parameters: The ant model has several parameters—colony size, diffusion rate, evaporation rate—that we could vary, but that don’t directly relate to our hypothesis; therefore, we will leave these fixed at their default values for the moment (population = 125, diffusion-rate = 50, evaporation-rate = 10). The key parameters are the distance to the two sources A and B.
4. Designing the experimental scenarios: For now, we will consider three scenarios: one in which food sources A and B are located the same distance from the nest (0.4, 0.4), one in which food source B is slightly further away than A (0.4, 0.45), and one in

which food source B is much further away than A (0.4, 0.6). As our model is stochastic, we will run it a number of times for each scenario.
5. Choosing what to observe/measure: The behaviour of our model may vary in many ways, but to address our hypothesis, all we need to observe and record is, for each time the model is run, which food source is consumed first? (A, B or, possibly, both if they are depleted simultaneously).
6. Running the experiments: Choose a number of times to run each scenario (some- where in the range 5–20). Setup each scenario and run the appropriate number of times, recording the output after each run (it may be helpful to setup an Excel spreadsheet or similar to record outputs).
7. Analysing the data: For each scenario, what was the distribution of outcomes? For this example, we are simply counting discrete possibilities. If we were measuring a continuous variable, we may wish to calculate the mean and standard variation.
8. Communicating the results: Use Excel (or similar) to plot the data you have col- lected in a way that communicates the differences between scenarios. One approach could be to use a bar chart to show the proportion of runs in which food source A was consumed first under each scenario (ie, one bar per scenario). What other type of plot could you use? What can you say about your original hypothesis?
Note that NetLogo has a separate tool, BehaviourSpace, to make varying parameters and running multiple experiments easier. You are not required to, but may wish to explore this tool.
Task 2: A second experiment—exploring the influence of evap- oration and diffusion on foraging efficiency
In the experiment above, we held several model parameters fixed (didn’t vary their value). For this experiment, we will explore the influence of some of these parameters on another aspect of model behaviour, foraging efficiency. Foraging efficiency is the length of time it takes for a colony to consume all available food.
To begin, switch to the “Code” tab. Simulations currently stop once the first food source is completely consumed. At the beginning of the procedure to go, change the stopping conditions to stop when both food sources are consumed (changing or to and), and then to print the current time step (print ticks) as follows:
if sum [food] of patches with [pcolor = green] = 0
and sum [food] of patches with [pcolor = blue] = 0 [
print ticks
Repeat the steps outline in Task 1 to explore the influence of evaporation and/or diffusion on foraging efficiency: write out a hypothesis, design scenarios, run the experiments, then analyse and report the results.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com