AI agents for turn-based strategy game Diplomacy
Top 60.1% on sourcepulse
This repository extends the original Diplomacy game engine to integrate Large Language Models (LLMs) for enhanced AI-driven gameplay. It enables multi-turn negotiations, LLM-generated orders, and automatic phase summaries, targeting developers and researchers interested in AI-assisted strategy games.
How It Works
The core innovation lies in orchestrating LLM interactions within the Diplomacy game loop. lm_game.py
manages conversation rounds and calls LLM clients to generate orders. lm_service_versus.py
provides a base client for various LLM APIs (OpenAI, Claude, Gemini, DeepSeek), handling prompt construction and response parsing. The DiplomacyAgent
class in agent.py
maintains state, including goals and relationships, to ensure consistent strategic play. Phase summaries are generated by modifying the game engine to provide textual recaps of turn events.
Quick Start & Requirements
pip install diplomacy
npm install
, and python -m diplomacy.server.run
.Highlighted Details
Maintenance & Community
The project is part of the EveryInc
organization. Further community and development details are not explicitly detailed in the README.
Licensing & Compatibility
Limitations & Caveats
The project is explicitly marked as experimental and under active development, with features subject to change. Python version compatibility is limited to 3.5-3.7, which is outdated. Future explorations mention longer conversation phases and enhanced agent memory, indicating current limitations in these areas.
2 days ago
1 day