GitHub logo

GitHub

Free

Playing Imperfect Information Games with Theory of Mind Aware GPT-4

FreeFree tier
Type
Open Source

About GitHub

Suspicion-Agent is an open-source research implementation of a GPT-4 agent augmented with Theory of Mind (ToM) reasoning for playing imperfect information games. It accompanies the paper 'Suspicion-Agent: Playing Imperfect Information Games with Theory of Mind Aware GPT-4' (arXiv:2309.17277). The repository provides a complete pipeline, including game configuration, agent models, baseline comparisons (CFR, NFSP, DQN, DMC), game data replay, and visualization tools. Built on the SkyAGI framework, it requires Python 3.8.5 and an OpenAI API key. Users can train and evaluate agents against classical game-theoretic and reinforcement learning baselines in environments such as 'The Resistance: Avalon' or similar social deduction settings.

Key Features

Implementation of the Suspicion-Agent paper using GPT-4 with Theory of Mind reasoning
Supports multiple baseline models: CFR, NFSP, DQN, and DMC
Provides game data replay and visualization for analysis
Open-source Python code (Python 3.8.5) with clear setup instructions
Builds on the SkyAGI framework for agent interaction
Includes demonstration and sample output for reproducibility

Pros & Cons

Pros
  • State-of-the-art integration of GPT-4 with explicit Theory of Mind modeling
  • Open-source and fully reproducible with provided code and data
  • Includes diverse classical baseline models for comparison (CFR, NFSP, DQN, DMC)
  • Offers game replay and visualization to interpret agent behavior
Cons
  • Requires an OpenAI API key, which incurs usage costs and depends on GPT-4 availability
  • Code is research quality and may not be production-ready or well-documented for broader use
  • Limited to specific imperfect information games implemented in the framework
  • Performance heavily relies on the underlying GPT-4 model and prompt design

Best For

Research on Theory of Mind in large language models for game playingBenchmarking AI agents in imperfect information games like social deductionReplicating academic experiments from the Suspicion-Agent paperEducational exploration of game-theoretic and deep RL baselines in complex environments

FAQ

What is Suspicion-Agent?
Suspicion-Agent is a research implementation of a GPT-4 agent that uses Theory of Mind reasoning to play imperfect information games, as described in the paper 'Suspicion-Agent: Playing Imperfect Information Games with Theory of Mind Aware GPT-4' (arXiv:2309.17277).
How do I run the agent?
Install dependencies with `pip install -r requirements.txt`, set your OpenAI API key via the OPENAI_KEY environment variable, and run `python main_vs_baseline.py --user --verbose_print --rule_model [cfr/nfsp/dqn/dmc]` to train and evaluate.
What baseline models are included?
The repository includes CFR (Counterfactual Regret Minimization), NFSP (Neural Fictitious Self-Play), DQN (Deep Q-Network), and DMC (Deep Monte Carlo) as baseline agents.
What games can Suspicion-Agent play?
The agent is designed for imperfect information games, specifically social deduction games like 'The Resistance: Avalon', as configured in the repository's game configuration files.