Can LLMs build game trees from text?
From Natural Language to Extensive-Form Game Representations
This paper introduces GameInterpreter, a framework using LLMs to translate natural language game descriptions into extensive-form game representations (EFGs) for game-theoretic analysis. It addresses the challenge of representing imperfect information games, where players may not know all previous moves, by using a two-stage approach: first identifying information sets (groups of indistinguishable player decision nodes) and the partial tree structure, then generating the full EFG using pygambit, a Python interface for the game theory analysis tool Gambit. A self-debugging module improves the generated code. Experiments across various LLMs demonstrate the framework's effectiveness on games of varying complexity, showing improved performance with each module, particularly for imperfect information scenarios. The framework enables automated analysis, such as computing Nash equilibria, directly from natural language game descriptions, showcasing the potential of LLMs for multi-agent systems development.