- Tuesdays and Thursdays, 1 - 2:30pm
- Weiser Hall 269
- The course will be in person, but some office hours and occasional course meetings may also be held via zoom as needed, at: https://umich.zoom.us/j/95806757765 (password information is on Canvas)

**Instructor: Prof. Marisa Eisenberg (she/her)**- Email: marisae@umich.edu
- Office Hours - Weiser Hall 735
- Typically after class, for an hour on Tuesdays and a half hour or an hour on Thursdays depending on the week (but we can set up other times as needed if those don’t work)
- Usually in person but sometimes via zoom (link above)

**GSI: Conrad Kosowsky**- Email: coko@umich.edu
- Office Hours
- Regular office hours: 703 Weiser Hall
- Tuesday 10:30am-11:30am
- Tuesday 3:30pm-4pm
- Thursday 3:30pm-4pm

- By appointment in 715A Weiser Hall

- Regular office hours: 703 Weiser Hall

**HW/Lab guidelines**- guidelines on how to turn in your HW assignments, what needs to be turned in, and the grading rubric we will use. Note that assignments are turned in via Canvas!**Final project information**- information on the course final project (will be updated as we go)**Final project proposal template**

Topics are subject to change and rearrangement! (We may also not get through all the topics listed)

Lecture slides, links to assignment instructions, and readings will be posted in each topic as we get to them.

Topics covered: overview of basic concepts, coding intro, why model?, intro to ABMs and their pros/cons, philosophy of complex systems, emergent behavior/phenomena, classic examples in biological, social, and physical systems, etc.

- Lecture 1: Introduction and overview
- Slides - what are models, why model, emergent behavior, complex systems
- Emoji simulator: forest fire model, blank model, more models!
- Readings
- To Do: Get comfortable with python if you haven’t used it much! You can use Google Colab to get started or install python on your computer (e.g. the Anaconda distribution). See the Additional useful info section below for tutorials and more info!

- Lecture 2: Introduction to Agent-Based Models
- Slides - how to choose a modeling framework, intro to ABMs
- Readings
- Think Complexity, Chp. 1
- Wilensky and Rand, Chp. 2
- Considerations and Best Practices in Agent-Based Modeling to Inform Policy (gives a nice introduction to the PARTE framework for thinking about ABMs)

- Lecture 3: Case study: Modeling the Ancestral Puebloan communities
of Long House Valley (the Artificial Ancestral Puebloan Project (AAP))
- Slides
- Readings
- Papers on the AAP (see also the references in the slides)
- Axtell et al.,
*PNAS*, 2002. Population growth and collapse in a multiagent model of the Kayenta Anasazi in Long House Valley - An interesting replication study that examines some of the issues and underpinnings of the AAP: Janssen, JASSS, 2009. Understanding Artificial Anasazi

- Axtell et al.,

- Papers on the AAP (see also the references in the slides)

- Lab 1: Introduction to ABMs, NetLogo, and Python
**Lab 1 Assignment**- For emoji, you can copy-paste from here: https://emojipedia.org/
- Quick intro to NetLogo
- Template code for the Python portion

- Readings
- Wilensky and Rand, Chp. 3-4

- Intro to the PyCX library for simulating complex systems models in
Python
- Intro to PyCX (pdf version)
- Download from the PyCX GitHub
- PyCX example files
- PyCX Simulator file - 2019 version - use this if the current version causes issues!
- PyCX model template script
- PyCX voter model example
- PyCX in Google Colab - Unfortunately the GUI part of PyCX doesn’t run in Google Colab, but this demonstrates how to run PyCX files in Colab or other Jupyter notebook types of things.

- Readings

- Extra Notes: Chaos Game!
- Board notes
- Interesting links & extra things
- Chaos game simulator - lets you try out chaos games with other shapes and settings, also includes some proofs for why the Chaos Game works
- Another chaos game example
- A somewhat systematic exploration of some chaos game simulations
- Barnsley fern
- Sierpinski Tetrahedrons
- Neat fractal landscapes

Topics covered: overview of basic cellular automata (CA) concepts, emergent behavior, classes of CA, examples of CA (e.g. Conway’s Game of Life), coding and analysis methods for CA, applications

- Lecture 4: Intro to cellular automata
- Slides
- Readings
- Miscellaneous interesting things
- A neat continuous version of Conway’s Game of Life! (thanks to Chethan Prakash for sharing!) And another video with more explanation of how the model works
- COVID Cellular Automata model
- Cellular Automata used for a herd immunity explainer on NPR
- Visualizing 3D, 4D, and 5D Cellular Automata
- Turing completeness and Game of Life - simulating Game of Life in Game of Life

- Lecture 5: Cellular automata dynamics

- Lab 2: Cellular Automata and Intro to Networks

- Lecture 6: Introduction to Networks

- Lecture 7: Random networks, dynamics
*on*networks and*of*networks

- Lecture 8: Adaptive networks, mean-field approximation of networks

- Lab 3: Network Dynamics

- Lecture 9: Sampling, visualization, uncertainty
- Slides
- Readings
- PARTE (Properties, Actions, Rules, Time, Environment) framework
- ODD (Overview, Design concepts, and Details) Protocol
- Yang Y, Roux AV, Auchincloss AH, Rodriguez DA, Brown DG. A spatial agent-based model for the simulation of adults’ daily walking within a city . American journal of preventive medicine. 2011 Mar 1;40(3):353-61.

- Lecture 10: Sensitivity analysis
- Slides
- Example code - Sensitivity analysis with the SIS network model
- Readings
- Marino, Simeone, et al. “A methodology for performing global uncertainty and sensitivity analysis in systems biology.” Journal of theoretical biology 254.1 (2008): 178-196.
- A nice table of different sensitivity analysis methods
- The wikipedia page is also pretty comprehensive!
- Active nonlinear testing

- Jeff Dunworth Guest Lecture - Computational neuroscience: how network structure impacts function

- Lecture 11: Analyzing Model Outputs

- Lab 4: Parameter sampling and sensitivity

- Lecture 12: Parallel Computing
- Slides
- Example Code
- Additional tools for more advanced parallel computing:

Topics covered: parameter estimation, MCMC, parameter identifiability & uncertainty, model comparison (e.g. AIC/BIC/etc)

- Lecture 13: Introduction to parameter estimation
- Thinking about the challenges of linking data with models, and what these approaches can (and can’t) tell you
- Maximum likelihood methods, optimization basics
- Slides
- Example code - Basic optimization
- Example code - Maximum likelihood

- Lecture 14: Introduction to Bayesian parameter estimation & MCMC
- Sampling based methods, including basics of approximate Bayesian computation, sample importance resampling, MCMC (Markov Chain Monte Carlo), etc.
- Slides
- Example code - Basic MCMC
- MCMC Mean Field SIR Model
- MCMC Mean Field SIR Model - Identifiability Issues
- ABC Rejection Sampling Example
- Readings
- Menzies NA, Soeteman DI, Pandya A, Kim JJ. Bayesian methods for calibrating health policy models: a tutorial. PharmacoEconomics. 2017 Jun 1;35(6):613-24.

- A big compendium of packages to run MCMC in python

- Lecture 15: Identifiability

- Lecture 16: Model selection and the AIC

- Potential Topics:
- decision/game theory
- chaos and fractals
- classic example complex systems models (Kuramoto oscillators, Sugarscape, etc.)
- more advanced environments (e.g. putting ABMs on GIS)
- active subspaces, dimension reduction
- model selection
- clustering, PCA
- machine learning and complex systems
- webpage scraping, basics of API’s, pulling data from various places (social media, google, government sources)

- Lecture 17: Machine learning and AI
- Slides
- AI slides part 1
- AI slides part 2
- Readings

- Lecture 19: Game & decision theory

- Additional Materials: ABM Environments and Mapping/GIS
- Intro to mapping with Folium
- Predator-prey bubble tea example
- Mapping tutorials
- Making
3 Easy Maps in Python - the point map example here may be
particularly useful for visualizing agents on a map (where you can
define their x,y locations in terms of e.g. latitude and longitude).
This uses the module
`folium`

, which is one of the common mapping packages. - Making
maps in Basemap This is another package for mapping, and you can
similarly do point maps and plot other features on the map. The syntax
for
`basemap`

seems pretty straightforward, so this may be a useful package to consider also. There’s an additional tutorial for Basemap here also.

- Making
3 Easy Maps in Python - the point map example here may be
particularly useful for visualizing agents on a map (where you can
define their x,y locations in terms of e.g. latitude and longitude).
This uses the module

Useful links and extra readings will be posted here.

**Coding and typesetting resources**

Overall Coding Resources

- NetLogo installation information
- Python
- Anaconda distribution for Python
- Tutorials
- 10-minute Python - very short tutorial with just the basics (often useful if you’ve coded in other things or have used python but not in a while)
- The Python Tutorial - the official tutorial, gives more details and a good reference. Good to start with if you’ve never used python.
- Think Python - the book is a good reference too—you may want to start with Chapters 2 and 3
- A nice collection of python tutorials

- Spyder - the built in tutorial is pretty good! You can find it under
the
`help`

menu - Jupyter/IPython resources

ABM Resources

- Modules/packages for agent-based modeling
- PyCX module for Python (we will use this!) (reference for PyCX)
- CoMSES ABM Library - potentially useful for project ideas!

Math Resources

- Typesetting math: \(\LaTeX\) resources from Paul Hurtado

**Books used in the course**

- Introduction to the Modeling and Analysis of Complex Systems by Hiroki Sayama
- Think Complexity by Allen Downey
- Think Python by Allen Downey
- An Introduction to Agent-Based Modeling by Uri Wilensky and William Rand (you may need to be on the UM network or connected to the VPN for the download to work)

**Interesting papers and extra readings**