ICPSR 2008- Computer Modeling Tutorial
Posted by: Aaron
- Week 1: Intoduction to Computer Modeling
- Session 1: Introduction. Contents of the course, some history of agent-based models and demonstrations of Schelling's segregation model and Conway's Game of Life.
- Session 2: ABM Bestiary. Various kinds of agent-based models and their properties. Comparison of different agent-based modeling platforms/software packages. Hands on running and analyzing the Rabbits/Grass/Weeds model.
- Session 3: Components of agent-based models. How to decide what is appropriate for your problem. Benefits and limitations of agent-based modeling. Hands on running and analyzing the Rabbits/Grass/Weeds model. Tinkering with the Cooperation model to generate desired behavior.
- Week 2: Getting Started with Netlogo
- Session 4: How to analysze agents based models from contingent behavior. Hands on running and analyzing the Rabbits/Grass/Weeds model. Tinkering with the Cooperation model to generate desired behavior. Details of the Netlogo inferface (buttons, plots, resolution, etc.) Considerations for using Netlogo and where to get help.
- Session 5: Students' Camo and Modeling from Scratch. Take a look at some student's Segregation variations, show some tricks, and then spend some time creating the camouflage for the contest. Walk through creating a model from scratch to demonstrate writing code, conventions, and how easy it is. Introduce the Hatfield and McCoy project if time permits.
- Download the Fish and Butterflies Model that we created from scratch in class (you may need to right-click and select "save link as" to download the file).
- Session 6: Introduce the Hatfield and McCoy project. Show how it builds from known knowledge and briefly discuss some new features that will help write the code. If you want to take the fast track (to be able to code your own model for presenting at the end of the course) then I highly recommend working on this model over the weekend. You can only learn modeling by doing it!
- Hatfields and McCoys Basic: Here is a very rough version of the project outlined in the slides of day 6. It doesn't work right because there are several strategically placed errors in the code. If you've built a model (or partially built one) from scratch then you can use this one as a comparison. Remember that some parts of the code are not right (in addition to being ugly and kludgy). After I cover several of the relevant helping codes in the third week and I will post an advanced version (v03) of the model that does work (again for comparison of code and technique).
- Week 3: Practice in Building Models and Extensions in Netlogo
- Session 7: Continue the Hatfield and McCoy project. I will present certain bits of code that are helpful and non-obvious: creating turtles and breeds, refering to independent procedures, ifelse clauses, getting properties of turtles, local variables, etc. Some from the code examples provided by Netlogo, and others from the basic and refined Hatfield and McCoy implementations. (Note slight differences in code from the version 3 slides to the current version 4 format.)
- Hatfields and McCoys Refined: Here is an expanded version of the model that includes many more parameters to mess around with. The code is still inelegant and done with brute force so you can get experience fixing it (e.g. by using symmetries in the agent properties). It's still selectively broken in some respects and fails to include many coding practices I taught you. Fixing this and making it beautiful is great exercise for modeling.
- Session 8: A few more useful code bits for loops and model interaction. Then time to work on a model (whether your own or the Hatfield and McCoy) with my help. Or if people want, I'll give more cool and helpful examples.