description: "The official implementation of the [ICML 2024] paper 'Learning to Simulate Human Behavior in Text-based Games'.\n\nText-based games provide an ideal testbed for developing embodied AI agents that can adapt to diverse situations and interact with dynamic environments. Current approaches for text-based game AI typically rely on either large language models (LLMs) or reinforcement learning (RL). However, RL agents require extensive interaction with the environment, making them data inefficient, while LLMs often struggle with long-term planning and adapting to new game states. Here, we introduce the concept of a Human Behavior Simulator (HBS), a novel approach for developing text-based game agents that combines the strengths of both LLM and RL methods. Our HBS is an LLM-based agent trained on human gameplay data to predict the next action a human player would take given the current game state. By leveraging human expertise, the HBS can generate human-like actions, and its inherent LLM capabilities allow for reasoning and planning in complex situations. We demonstrate that the HBS can be used as a powerful data augmentation tool for RL, significantly improving the RL agent's data efficiency and final performance. Our HBS-augmented RL agent outperforms state-of-the-art LLM and RL baselines in several challenging text-based games, highlighting the potential of combining human behavior simulation with reinforcement learning for developing more capable and adaptable AI agents." labels: - Text-based Games - Human Behavior Simulation - Large Language Models - Reinforcement Learning - Embodied AI authors: - name: "Zirui Chen" affiliations: - "Peking University" - name: "Yichao Hong" affiliations: - "Peking University" - name: "Xinrun Wang" affiliations: - "Peking University" - name: "Zhenyao Wu" affiliations: - "Peking University" - name: "Yingruo Hu" affiliations: - "Peking University" - name: "Xiaojian Ma" affiliations: - "Peking University" links: - name: "Paper" url: "https://arxiv.org/abs/2406.01258" - name: "Code" url: "https://github.com/PKU-RL/HBS" - name: "Demo" url: "https://pku-rl.github.io/HBS/" venue: "ICML" year: 2024