CVCOVANewsComputing, Opportunities, Value & Analysis
Science & Future4 min read

A virtual town of 25 AI agents organized a Valentine's Day party on its own

Researchers from Stanford and Google gave ChatGPT-powered characters memory, reflection and plans, then set them loose in a Sims-like town. With no script, they invited each other to a party and showed up on time.

By COVA News newsroom
A virtual town of 25 AI agents organized a Valentine's Day party on its own

In Smallville, a digital town of miniature cartoon figures, Isabella Rodriguez runs a café and has one intention: to throw a Valentine's Day party on February 14, from 5 to 7 p.m. No one tells her whom to invite or when to decorate. Even so, over two days of simulated time she invites customers and friends, spends the afternoon of the 13th decorating the place and gets help from Maria, who in turn invites Klaus, her secret crush. On the 14th, five agents, including Klaus and Maria, turn up at the café at 5 o'clock sharp.

None of them is a person. They are “generative agents,” programs that use a language model (the technology behind ChatGPT) to simulate believable human behavior. They are described by Joon Sung Park of Stanford University, together with colleagues from Stanford, Google Research and Google DeepMind, in a paper presented at UIST '23, an Association for Computing Machinery symposium on user interfaces held in San Francisco from October 29 to November 1, 2023.

Memory, reflection and plans

The underlying problem is that a language model on its own can respond well at any given moment but struggles to stay coherent over time. The authors propose an architecture with three components. The first is a “memory stream”: a record, written in natural language, of everything the agent perceives and does. Because that record grows too large to fit into what the model can read at once, a retrieval system chooses which memories to show it based on three criteria: how recent they are, how important they seem (the model itself assigns them a score from 1 to 10) and how relevant they are to the current situation.

The second component is reflection. When the sum of the importance of recent events exceeds a threshold (150 in this implementation), the agent asks itself questions about what it has experienced and draws higher-level conclusions, which it also stores as memories. In practice, the agents reflected about two or three times a day. This way, Klaus, instead of choosing whoever he runs into most often, can infer that he is passionate about research and prefer Maria, who is also a researcher. The third component is planning: turning those conclusions and the environment into daily plans and then into concrete actions.

In their implementation, the team used gpt-3.5-turbo, the version of ChatGPT available at the time. Each of the 25 agents starts out with a paragraph describing its occupation and relationships. Users can converse with them, speak to them as an “inner voice” to give them instructions, or change the state of objects in the world. If they write that Isabella's stove is on fire, she turns it off and remakes breakfast.

What was evaluated and what failed

There were two evaluations. In the first, the researchers “interviewed” the agents in natural language to check whether they stayed in character and remembered, planned, reacted and reflected accurately. They compared the full version with variants that had their access to memory, reflection or planning removed. According to the paper, each component proved critical for the behavior to be believable. The second evaluation let the agents interact freely for two days of game time, which gave rise to phenomena such as the spread of news (Sam's run for mayor), new friendships and the party.

There are important caveats. This is a simulation in a video game environment, not an experiment with people, and the authors themselves clarify that saying the agents “go” or “decide” is a figure of speech: their behavior aims to appear believable, like that of an animated character, and does not imply genuine will. In addition, in the party example the user set two details, Isabella's plan and Maria's crush; the rest emerged from the architecture.

The authors see uses in prototyping social platforms, rehearsing difficult conversations, virtual worlds and video game characters that don't require hand-written scripts. They also warn of risks: parasocial relationships with these agents, fakes (deepfakes) and tailored persuasion. They propose tuning the agents to reduce the first, logging what they do to mitigate the second, and using them to complement, not replace, people in design processes.

It remains to be seen how this architecture performs with more recent models, which the authors expect will improve performance, and whether it holds up beyond a town of 25 inhabitants. For Latin America, the simulation's code is public, which allows developers and students in the region to explore it and test it in their own game or social simulation projects.

Source: Generative Agents: Interactive Simulacra of Human Behavior

Related news

Science & Future

Two astronauts install a new solar array on the Space Station during a spacewalk

Menon and Kutryk ventured outside the International Space Station to add a new solar array and set things up for the next spacewalk. NASA summed it up in two words: mission accomplished.

Science & Future

Robots that walk on a fungus's electrical signals: what Cornell achieved and what is still a promise

Cornell researchers connected living mycelium to two robots, got them to move using its electrical impulses, and made them react to ultraviolet light. Measuring soil in crop fields is, for now, only a plan.

Science & Future

Anthropic reveals it is working with six organizations to develop new medicines with Claude

The company says its scientists have spent months in research partnerships with six pharmaceutical organizations and that it has already begun its own drug discovery efforts.