Generative Agents: Interactive Simulacra of Human Behavior

Joon Sung Park et al., 2023, ACM UIST

  • Social systems, like apps, games or cities, are hard to design: many problems only appear once lots of people are in them.
  • Simulated people could help, but they have been simple, following a few hand-written rules, like Schelling's shapes.
  • Language models can act human, but only in a single moment. Can agents built on them stay believable for days?
Figure 1 of the paper: the town of Smallville, with agents having coffee, walking in the park, arriving at school and sharing news.
Figure 1

Figure 1: the town of Smallville

  • 25 agents live in a small town, each from a one-paragraph biography.
  • They plan, notice, remember, reflect and talk.

A morning in the life of John Lin

Figure 3 of the paper: John Lin wakes up, brushes his teeth, showers, cooks breakfast, catches up with his son Eddy and his wife Mei, and heads to work.
Figure 3, Park et al., UIST 2023

Smallville

Figure 9 of the paper: Isabella's party invitation reaches nine agents directly, and Jennifer, Maria and Abigail through them.
Figure 9, Park et al., UIST 2023: how news of Isabella's party spread

The whole town

  • The authors gave one agent, Isabella, the idea of a Valentine's Day party.
  • Over two game days, the agents who knew about it grew from 1 to 13 of 25, with no one stepping in.
  • Five of the twelve invited came.

Who heard, and who came, emerged from many separate conversations.

The big ideas of Generative Agents

Agents that remember, reflect and plan behave believably over days, not just in one reply.

From one agent's idea for a party, the town's social life emerged: invitations spread, dates were made, and guests showed up together.

The result: the full architecture was the most believable

100 people ranked agents' answers to interview questions about their lives. Each kind of memory taken away made the answers less believable.

The paper also found answers that weren't believable: retrieval misses, when an agent failed to recall something it knew, and embellishments, details it added that weren't in its memory.

Discuss with your table

Appendix

1

The world is a grid

Every place an agent can go is a node in a tree: the town, a building, a room, an object. The real map has 19 sectors, 63 arenas and 222 objects.

2

Steps and walking

Each step is 10 game seconds, and an agent walks at most one tile per step. Routes are shortest path, found using BFS.

3

Plans determine actions

An hourly plan becomes detailed actions when each time block begins. Isabella follows those actions, walking to the right place first.

4

What an agent notices

Each step it looks around its room, within its vision radius, and attends to (notices) the closest few things.

5

Reactions and re-planning

Objects and people can make her react, have conversations, request replanning, and change the schedule.

6

New observations create memories and reflections

Agents start with seed memories and create new ones from plans, observations, and reflections, triggered at an importance threshold.

7

Retrieval ranks context for a task

Change the query or weights and watch memories move across the retrieval cutoff.

8

Actions are informed by retrieved memories

Agents retrieve memories for planning, reacting, reflection, and each conversational turn.

9

One full step

Everything the engine does between two ticks of the clock.

10

How reactions turn into decisions

Trace retrieved memories into the prompt, compare example answers, and see what the engine applies.

11

Reflections link to evidence for inspection

Choose a question, trace an inference to its evidence, then build a later reflection on earlier ones.

12

The inner voice

Give Isabella a thought, watch it enter memory, and see how it changes the rest of her plan.

13

Interviewing Isabella

Compare the same questions across four memory conditions. Hover a column or answer to inspect its memories.