CS 222: AI Agents and Simulations

STANFORD UNIVERSITY, FALL 2024
Location: M W 01:30p-02:50p; Lathrop Library, Rm 299
Contact: cs222-ai-simulations@cs.stanford.edu
Prompt: Sims-like sprite game environment of an autumn day, in a bustling campus town; linear perspective

Announcement

Monday 10.21.2024. 1) Assignment 2 is released (Due Monday October 30). We recommend getting started early!
Monday 10.14.2024. The instructions for the project proposal have been released! They are due the same day as your presentation.

Teaching Staff

Instructor
Joon Sung Park

Joon Sung Park

Office Hours: Friday 1:00-2:00 pm

Location: Gates Office #360

Course Assistants
Carolyn Zou

Carolyn Zou

Office Hours: Wednesday 3:00-4:00 pm

Location: Gates Office #360

Helena Vasconcelos

Helena Vasconcelos

Office Hours: Monday 9:30-10:30 am

Location: Gates Office #377

Overview

How might we craft simulations of human societies that reflect our lives? Many of the greatest challenges of our time, from encouraging healthy public discourse to designing pandemic responses, and building global cooperation for sustainability, must reckon with the complex nature of our world. The power to simulate hypothetical worlds in which we can ask "what if" counterfactual questions, and paint concrete pictures of how a multiverse of different possibilities might unfold, promises an opportunity to navigate this complexity. This course presents a tour of multiple decades of effort in social, behavioral, and computational sciences to simulate individuals and their societies, starting from foundational literature in agent-based modeling to generative agents that leverage the power of the most advanced generative AI to create high-fidelity simulations. Along the way, students will learn about the opportunities, challenges, and ethical considerations in the field of human behavioral simulations.

Schedule

Note: Reading commentaries are due at 10:00 PM the day before the lecture on Canvas.

DATE TOPIC LECTURE AGENDA ASSIGNMENTS
M, 9/23
(Week 1)
A Tour of Simulations: Past, Present, and Future [Slides]

What are simulations of human behavior? Where have we been, where are we now, and where are we headed? An introduction to the motivation and history behind simulations, from early methods like cellular automata and game theory, to agent-based modeling, and now modern generative AI-driven simulations.

W, 9/25 Wicked Problems [Slides]

What are the complex problems that simulations can help us tackle—problems that have been otherwise unsolvable or extremely challenging? An overview of the “wicked problems” faced by individuals and societies, and discussion of the grand challenges of our time and how simulations might offer new approaches.

Required readings:
  • H. W. J. Rittel, M. M. Webber, Dilemmas in a General Theory of Planning (1973). [pdf]
  • T. C. Schelling, Micromotives and Macrobehavior, Ch. 1: Introduction (1978). [pdf]
M, 9/30
(Week 2)
Individuals, Groups, and Populations [Slides]

When simulating human behavior, at what level of detail should we focus? Should we simulate the interactions of individuals and their groups, or predict the behaviors of entire populations? A look at the strengths and limitations of simulations at different levels of granularity.

Required readings:
  • J. S. Park, L. Popowski, C. J. Cai, M. R. Morris, P. Liang, M. S. Bernstein, Social simulacra: Creating Populated Prototypes for Social Computing Systems, in Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology (ACM, 2022). [pdf]
  • L. P. Argyle, E. C. Busby, N. Fulda, J. R. Gubler, G. Rytting, D. Wingate, Out of one, many: Using language models to simulate human samples. Political Analysis (2023). [pdf]
W, 10/2 Cognitive Architectures [Slides]

How do we create a cognitive unit of the human mind? What were the foundational architectures that were envisioned, and how were they inspired by (and stylized differently from) human minds? What were their limitations? A history of cognitive architectures.

Required readings:
  • A. Newell, Précis of Unified Theories of Cognition. Behav. Brain Sci. 15, 425-492 (1992). [pdf]
  • J. F. Lehman, et al., A Gentle Introduction to Soar, an Architecture for Human Cognition: 2006 Update. [pdf]
M, 10/7
(Week 3)
Architecting Generative Agents [Slides]

How might we merge the vision of cognitive architectures with the advances in generative AI to build high-fidelity agents? What are the architectural similarities to past cognitive models, and what new opportunities do they bring? A review of generative agent architectures and the modern technologies that drive them.

Required readings:
  • J. S. Park, J. C. O'Brien, C. J. Cai, M. R. Morris, P. Liang, M. S. Bernstein, Generative agents: Interactive simulacra of human behavior, in Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology (ACM, 2023). [pdf]
  • T. R. Sumers, S. Yao, K. Narasimhan, T. L. Griffiths, Cognitive Architectures for Language Agents. Trans. Mach. Learn. Res. (2024). [pdf]
[Assignment 1 Release]
W, 10/9 Interactive Worlds [Slides]

How should the generative agents we create interact with one another and with human users? What are the building blocks and environments in which these interactions should occur? A discussion of the environments and worlds where agents interact.

Required readings:
  • S. Chang, A. Chaszczewicz, E. Wang, M. Josifovska, E. Pierson, J. Leskovec, LLMs generate structurally realistic social networks but overestimate political homophily. Preprint (2024). [pdf]
  • R. Louie, A. Nandi, W. Fang, C. Chang, E. Brunskill, D. Yang, Roleplay-doh: Enabling Domain-Experts to Create LLM-simulated Patients via Eliciting and Adhering to Principles. Preprint (2024). [pdf]
M, 10/14
(Week 4)
Believability vs. Accuracy [Slides]

How do we know that our simulations are meaningful and representative of the world we live in? What are the axes for validating simulations, and what applications does each validation method empower? A discussion of methods for demonstrating simulation fidelity and their challenges.

Required readings:
  • J. Bates, The Role of Emotion in Believable Agents. Commun. ACM 37, 122-125 (1994). [pdf]
  • A. Ashokkumar, L. Hewitt, I. Ghezae, R. Willer, Predicting Results of Social Science Experiments Using Large Language Models (2024). [pdf]
[Project Proposal Release]
W, 10/16 Models of Individuals [Slides]

How might we create models of individuals that simulate how real people might behave and feel? How does this align with the original vision of bottom-up simulations, and what new advances enable this now? A discussion of generative agents that model individual behavior.

Required readings:
  • S. Ansolabehere, J. Rodden, J. M. Snyder Jr., The Strength of Issues: Using Multiple Measures to Gauge Preference Stability, Ideological Constraint, and Issue Voting. American Political Science Review (2008). [pdf]
  • (Optional) P. Resnick, N. Iacovou, M. Suchak, P. Bergstrom, J. Riedl, GroupLens: an open architecture for collaborative filtering of netnews. In Proceedings of the 1994 ACM Conference on Computer Supported Cooperative Work (CSCW '94), ACM, New York, NY, USA, 175-186 (1994). [pdf]
M, 10/21
(Week 5)
AgentBank-CS222 [Slides]

How might we create a shared resource of models that emulate individuals to power generative agent-based models? What ethical considerations and boundaries ought we to consider, and can we draw inspiration from prior works? In this lecture, we will create a bank of agents that represent CS222.

Required readings:
  • E. Bruch, J. Atwell, Agent-Based Models in Empirical Social Research. Sociological Methods & Research (2015). [pdf]
  • J. M. Epstein, R. L. Axtell, Growing Artificial Societies: Social Science from the Bottom Up (MIT Press, 1996): Chapter 1 and 2 [pdf]
[Due: Assignment 1]
[Assignment 2 Release]
[In class activity]
W, 10/23 Generative Agent-Based Models

How can we combine generative agents of individuals to create a new generation of agent-based models capable of solving complex problems? What are the building blocks of these models, and what questions might they enable us to address? How does this approach differ from the previous generation of agent-based models?

Required readings:
  • International Human Genome Sequencing Consortium. (2001). Initial sequencing and analysis of the human genome. Nature, 409(6822), 860-921. https://doi.org/10.1038/35057062 [pdf]
  • Kinder, M. (2024). Hollywood writers went on strike to protect their livelihoods from generative AI. Their remarkable victory matters for all workers. Brookings. April 12. [pdf]
M, 10/28
(Week 6)
Equilibria and Butterflies

Will generative agent-based models help us discover complex equilibria, or will they devolve into chaos? What new theories and scientific foundations do we need to interpret the equilibrium and chaos in worlds populated by generative agents?

Required readings:
  • E. N. Lorenz, The Essence of Chaos (University of Washington Press, 1993). [pdf]
  • C. A. Holt, A. E. Roth, The Nash equilibrium: A perspective. Proc. Natl. Acad. Sci. U.S.A. (2004). [pdf]
W, 10/30 Language and Schema of Simulations

How might we make simulations easy to create? What language and schema ought to describe the building blocks of our simulations, and where can we find inspiration for such a system? This discussion will explore prior systems that developed useful language and schema for complex systems (e.g., in data visualization, agent-based modeling).

Required readings:
  • Bostock, M., Ogievetsky, V., & Heer, J. (2011). D3: Data-Driven Documents. IEEE Transactions on Visualization and Computer Graphics, 17(12), 2301-2309. [pdf]
  • Wilensky, U. (2021, January 15). NetLogo User Manual. Center for Connected Learning and Computer-Based Modeling, Northwestern University. [pdf]
[Due: Assignment 2]
M, 11/4
(Week 7)
Project Proposal: Day 1

Students will present and discuss their project proposals, outlining their goals, methodologies, and expected outcomes for their final project.

[Presentation]
W, 11/6 Project Proposal: Day 2

Continuation of project proposal presentations and feedback.

[Presentation]
M, 11/11
(Week 8)
Ethics and Limitations

What ethical considerations and limitations must be addressed with the rise of powerful simulation technologies? How might simulations impact our ability to represent or reduce bias, protect privacy, and preserve human autonomy?

Required readings:
  • A. Wang, J. Morgenstern, J. P. Dickerson, Large language models cannot replace human participants because they cannot portray identity groups (2024). [pdf]
  • S. Santurkar, E. Durmus, F. Ladhak, C. Lee, P. Liang, T. Hashimoto, in Proceedings of the 40th International Conference on Machine Learning (2023). [pdf]
W, 11/13 Guest Lecture 1: TBD

Required readings:
TBD

M, 11/18
(Week 9)
Simulating Ourselves and Our Societies With AI

Can simulations of human behavior be the killer application of modern AI? What are the potential implications, blue-sky use cases, and how might simulating ourselves and our societies shape the world we live in?

Required readings:
  • T. C. Schelling, An Astonishing Sixty Years: The Legacy of Hiroshima (Nobel Prize in Economic Sciences Lecture, 2005). [video]
  • M. Weiser, The Computer for the 21st Century. Sci. Am. (1991). [pdf]
W, 11/20 Guest Lecture 2: Serina Chang

How might we simulate social networks with LLMs, and the dynamic processes over networks in the context of modeling disease spread (e.g., COVID)? This lecture will explore networks as an environment for simulations, and recent applications of AI in simulating complex systems.

Required readings:
  • S. Chang, E. Pierson, P. W. Koh, J. Gerardin, B. Redbird, D. Grusky, J. Leskovec, Mobility network models of COVID-19 explain inequities and inform reopening. Nature 589, 82-87 (2021).[pdf]
  • S. Chang, Z. Lin, B. Yan, S. Bembde, Q. Xiu, C. H. Wong, Y. Qin, F. Kloster, A. Luo, R. Palleti, J. Leskovec, Learning production functions for supply chains with graph neural networks. Preprint (2024). [pdf]
M, 12/2
(Week 10)
Project Presentation: Day 1

Students will present their final projects, discussing their simulation outcomes, challenges, and insights gained throughout the course.

[Final Presentation]
W, 12/4 Project Presentation: Day 2

Continuation of the final project presentations and course wrap-up discussion.

[Final Presentation]