TL;DR
This paper introduces MART, a novel framework that uses Large Language Models (LLMs) to create more dynamic and interactive merchant Non-Player Characters (NPCs) in games. By enabling LLMs to both appraise item values and negotiate prices, MART addresses the passivity of current game merchants, leading to more immersive player experiences.
What Problem Does This Paper Address?
In many open-world role-playing games, merchant NPCs are notoriously passive. Their interactions are typically limited to fixed prices and scripted dialogue, lacking the dynamic negotiation and price adjustment seen in real-world transactions. This passivity limits player immersion and the depth of in-game economies. The paper identifies two core issues: passive pricing (merchants can't adjust prices based on item specifics or market conditions) and passive communication (interactions are pre-defined and lack free-form negotiation). The authors aim to bridge this gap by making merchant NPCs more active and responsive, mirroring real-world economic interactions.
Methods
The proposed framework, MART, consists of two main modules:
- Appraiser Module: This module uses LLMs to estimate the retail price of in-game items. It leverages item descriptions (including stats, level, and effects) to infer value, similar to how real-world assets are appraised. The paper explores two approaches:
- In-Context Learning (ICL): Providing the LLM with a few examples in the prompt to guide its prediction without explicit training.
- Supervised Fine-Tuning (SFT): Training smaller LLMs on a dataset of item descriptions and prices, often with an adapter to fine-tune parameters.
- Negotiator Module: This module enables the merchant NPC to engage in price negotiations with players. It uses LLMs to generate persuasive dialogue, aiming to reach a mutually agreeable price. The paper investigates:
- Zero-Shot Prompting (ZSP): Using LLMs with pre-defined negotiation tactics embedded in the prompt, without specific training on negotiation dialogues.
- Knowledge Distillation (KD): Training smaller LLMs to mimic the behavior of a larger, more capable "teacher" LLM, allowing for efficient deployment of persuasive negotiation skills.
Datasets
The paper utilizes a dataset derived from World of Warcraft (WoW) Classic auction data. This dataset was curated to include 3,270 items, with prices converted to a common unit (coppers) and then split into training (80%), validation (10%), and test (10%) sets. For the negotiator module, a dataset of 2,943 conversations was generated by simulating negotiations between a teacher LLM (Llama 3.1 405B) and a player agent (GPT-40).
Key Insights and Ideas
- LLMs as Economic Agents: The core idea is that LLMs can go beyond simple information retrieval and actively participate in economic simulations within games, making them more dynamic and engaging.
- Bridging the Gap Between Game Logic and Real-World Economics: MART aims to inject real-world economic principles like price negotiation and appraisal into game design, moving beyond static, developer-defined values.
- Efficiency vs. Performance Trade-offs: The research highlights that while larger LLMs (like Llama 3.1 405b) offer superior performance in both appraising and negotiating, smaller LLMs can achieve comparable results through fine-tuning (SFT) or knowledge distillation (KD), making active merchant NPCs more accessible for developers with limited resources.
- The Importance of Negotiation Tactics: The negotiator module's effectiveness is significantly boosted by incorporating specific persuasion tactics, demonstrating that structured approaches can enhance LLM-driven dialogue.
Key Results
- Appraiser Module:
- The ICL-405b model achieved the best performance with a Mean Absolute Percentage Error (MAPE) of 1.34%.
- SFT-8b demonstrated strong performance with a MAPE of 2.66%, showing that smaller, fine-tuned models can be highly effective and efficient.
- Smaller ICL models (ICL-1b, ICL-8b) showed significantly higher error rates and unexpected outputs, indicating that scale matters for ICL.
- Negotiator Module:
- KD-8b performed best overall, achieving a persuasiveness score of 3.99.
- ZSP-405b showed the strongest dominance (0.47), while ZSP-8b achieved the highest agreement rate (96.94%).
- Statistical tests confirmed significant differences in persuasiveness and dominance across models, with KD models generally outperforming ZSP models of the same size.
Limitations and Future Work
- LLM Family Specificity: The study primarily used the Llama LLM family. Future work could explore the generalizability of these findings to other LLM architectures.
- Simulated Player: The player in the negotiation experiments was simulated by GPT-40. Real human players might employ different strategies, requiring further investigation.
- Adversarial Threats: The study focused on inherent LLM misbehaviors (giveaways, improvisations, arithmetic errors) rather than external threats like prompt injection. Future work should address these security aspects.
- Irregular Cases: The paper identified three common irregular cases:
- Giveaways: Merchants offering extra items, which might not be supported by game systems.
- Improvisations/Hallucinations: Merchants suggesting non-existent items, requiring mitigation strategies like retrieval-augmented generation or approval systems.
- Arithmetic Errors: Smaller models struggling with price calculations, suggesting the use of external calculators.
The authors suggest that these findings can serve as a foundation for integrating LLMs into active merchants in various open-world games and trading NPCs.
Summary updated