langchain/docs/use_cases/agent_simulations.md
mbchang 4bc209c6f7
example: multi player dnd (#3560)
This notebook shows how the DialogueAgent and DialogueSimulator class
make it easy to extend the [Two-Player Dungeons & Dragons
example](https://python.langchain.com/en/latest/use_cases/agent_simulations/two_player_dnd.html)
to multiple players.

The main difference between simulating two players and multiple players
is in revising the schedule for when each agent speaks

To this end, we augment DialogueSimulator to take in a custom function
that determines the schedule of which agent speaks. In the example
below, each character speaks in round-robin fashion, with the
storyteller interleaved between each player.
2023-04-25 21:20:39 -07:00

1.2 KiB

Agent Simulations

Agent simulations involve interacting one of more agents with eachother. Agent simulations generally involve two main components:

  • Long Term Memory
  • Simulation Environment

Specific implementations of agent simulations (or parts of agent simulations) include

Simulations with Two Agents

  • CAMEL: an implementation of the CAMEL (Communicative Agents for “Mind” Exploration of Large Scale Language Model Society) paper, where two agents communicate with each other.
  • Two Player D&D: an example of how to use a generic simulator for two agents to implement a variant of the popular Dungeons & Dragons role playing game.

Simulations with Multiple Agents