Game Theory, ABMs and LLM Agents to Simulate Cooperation

📄Document👈

GameTheoryLLMAgents is a Python framework that integrates the Mesa agent-based modeling (ABM) platform with LangChain to create sophisticated LLM (Large Language Model) agents. These agents are designed to act as personas, capable of decision-making and reasoning based on their interactions and history. The framework is particularly suited for game theory simulations but can be adapted for any ABM or network-based models that utilize LLMs. This enables simulations where agents embody different personalities, allowing for complex behaviors and dynamics driven by language models.

This framework was created in collaboration with Emanuel Cura Costa, Ángela María Báez-Silva & Andrés Eduardo Ángel Huertas, as part of our project for the 2024 Santa Fe Institute (SFI) Global Complexity School

Key Features

  • LLM Integration: Agents use LangChain to interact as personas with their unique histories and reasoning processes.

  • RAG (Retrieval-Augmented Generation): The use of vector stores for contextual background retrieval enhances agent responses and decision-making.

  • Agent-Based Modeling: Built on top of Mesa, the framework maintains the flexibility and robustness of traditional ABM while extending it with LLM capabilities.

  • Game Theory Simulations: Includes built-in support for simulations like the Prisoner's Dilemma, with plans for more game types.

  • Inheritance Structure: Allows users to extend and modify agents and models while leveraging Mesa's full capabilities.

🎙️ PODCAST🎧 👇

Podcast: Integrating RAG-Augmented LLM Agents with ABMs and Game Theory

In this podcast, we dive into the research behind using Retrieval-Augmented Generation (RAG)-based Large Language Models (LLMs) to simulate cooperation and group formation in agent-based modeling. This podcast was generated from a script written by the team with NotebookLM, edited with Descript and CapCut, and showcases our commitment to leveraging AI tools throughout the project.

Previous
Previous

DoctorVoiceNotesAI

Next
Next

Detecting Corruption Risk in Government Procurement