Frequenty Ask Questions

Trade-off between usability and size of library

Is there not a trade-off between ease of use and having an extensive library? You might want to add a "see also" link to similar micro-behaviours below the "variations" list. I envisage a list of behaviours that the user might not have thought of (e.g. from a different discipline).

That’s a good question. This is one of the main motivations for placing the micro-behaviours on web pages. There are many familiar ways users can navigate such a space (e.g. using a search engine, meta tags, user community tags, hierarchical links, etc.). The instructor can specify the initial web page of the Behaviour Composer. Maybe for step 2 above it can be a page optimised for beginners, while for subsequent steps a page with more advanced micro-behaviours could be specified as the initial page.

We are currently using a Wiki to build the web site of micro-behaviours and this has some advantages. But a database could be used that generates the micro-behaviour pages in clever ways. In some circumstances it would add additional links (such as “see also”) to the pages.

Efficiency vs redundancy in the code

How efficient is the program in coding? The danger of meta-tools is that they produce a lot of redundant code. In the first example you demonstrated, there was a variable on age, for example. Redundant code might make the step from the Behaviour Composer to NetLogo more difficult.

Sometimes there is a trade-off between clarity and efficiency. The current set of micro-behaviours favours clarity when the cost is a small constant factor. One of the costlier things in the fish schooling model is for every fish to determine which other fish are at various ranges of distances. I am considering making alternatives that are much faster but rely upon the underlying grid (so the circles in some cases are really squares). The two versions would cross-link and explain the tradeoffs.

Regarding redundant code, I think it is appropriate for the micro-behaviours for building toy models so the users can quickly build interesting models. But the micro-behaviour for making copies could easily specify no additional behaviours and the following text could explain how to do so if needed.

There are also performance costs in the way micro-behaviours and scheduled and attributes are updated (see (f) below). I am hopeful that these will not be significant in most cases – experience will tell.

Risks in applying generic micro-behaviours to specific contexts

I can see a danger that we use a micro-behaviour that is in the library, even though it doesn't really fit our theory or qualitative descriptions; simply because the micro-behaviour appears to be relatively similar.

I see the same danger. I think it useful to put users into one of three categories:

  1. Those who can neither read or write the kind of code used in the micro-behaviours
  2. Those who can read but not write the code
  3. Good at reading and writing such programs

This danger is mostly an issue for those in the first category. Maybe we can move them to the second category before they build serious models. Without something like the Behaviour Composer those in the first category can create models only by collaborating with someone in the third category. An explicit goal of this project is to make modelling more widely accessible. This issue reminds me of when I took a first aid course. Someone who attempts artificial respiration with insufficient knowledge may make things worse. And yet we want to train lots of people to have some chance of saving lives when no professionals are around. Hopefully, someone who uses inappropriate micro-behaviours will discover their error via the peer review process.

If the user is a student rather than a researcher then there isn’t much danger. Students should make mistakes and learn from them. And they probably will learn more about the process of modelling in this way than if they had to build models from scratch.

Trustworthiness of library code

This adds to my comment of trusting the code. Of course I can check the code in NetLogo, and hopefully the descriptions are accurate. However, coming from a sociology background, often the micro-behaviours are unclear or disputed. Unless I code it myself, or have excellent descriptions in the library, I wouldn't trust the output.

If our approach to become wide-spread, then my hope is that quality can be “assured” in much the same way that academic journals, Wikipedia, and commercial software libraries are. Micro-behaviours could be trusted for any of these reasons:

  1. The author is known to be reliable (hopefully that is the case with the current library since I’m the sole author to date)
  2. It is rated highly by “experts”
  3. It is used in many other models (it would be great if micro-behaviours could point to models that use them)
  4. Approved by a peer review process as with academics journals or Wikipedia
  5. Has been tested and explored in isolation to observe what each micro-behaviour does (relatively easy to do with the Behaviour Composer)
  6. Some company is staking their reputation on the quality of a library

Composing vs coding from scratch

I like the modular approach, which encourages experimenting. However, this is a general point about programming (modelling) behaviour, and one I observe when coding from scratch.

Generally good programs are modular in the way they use procedures, methods, or classes. The micro-behaviours are modular in that they run as autonomous processes. Rather than burden the user with issues of where to place and to how order procedure or method calls each micro-behaviour runs on its own. There can be, however, a price for this process style of modularity. Consider an agent going in a circle by relying upon a move forward micro-behaviour and a turning micro-behaviour. The location of the circular path of the agent will differ slightly depending upon which runs first.

After writing the above I checked the code and discovered this was true but also that it need not be. The Behaviour Composer adds to NetLogo the ability to do simultaneous updates. The correct (and soon to be released) way to deal with this problem is that the going forward code uses the current heading and not the “about-to-be” heading. The convention used is to refer to current values of attributes as my-x and the value for the next time instant to be my-next-x. So the new going forward code is essentially:

set my-next-x my-next-x + cos my-heading * steps
set my-next-y my-next-y + sin my-heading * steps

This does introduce some complexity (and run-time overhead proportional to the total number of attributes) but it enables composition of processes without regard to how they are interleaved.

The Behaviour Composer as a research tool

The Behaviour Composer is quicker to get a rough idea; but in terms of research quality simulations, I'm not sure. I can see the Behaviour Composer as a tool to try out something, and then still code it as I want (from scratch).

I’m not sure either. We need more examples and experiences. But I think there are a wide variety of circumstances. Sometimes the speed of execution will be more than enough. Sometimes the micro-behaviours will have been well-tested, highly rated and heavily used and so probably are more trustable than coding from scratch.

The Behaviour Composer as a tool for learning

The Behaviour Composer could also be useful in terms of teaching, where students can actually do more than just change a few sliders. Because the Behaviour Composer composes micro-behaviours, it should be easier to understand (not a black box).

I fully agree. The Modelling4All project is funded to support teaching and learning. The idea that it can also be a useful tool for researchers is speculative. I hope it will be a focus of our next project.

Customisation of library for classroom use

In the context of a class room, I would probably use a customized library, where the students do not have to browse through all the possible behaviours. Maybe some sort of "favourites" would be useful.

Another reason for putting micro-behaviours on web pages is that it enables instructors to organise and customise micro-behaviours using the same tools they use to create web sites for other purposes.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License