Sci Simple

New Science Research Articles Everyday

# Computer Science # Artificial Intelligence # Computation and Language

Revamping Merchant NPCs: A New Gaming Experience

Making merchant NPCs more interactive for immersive gameplay.

Byungjun Kim, Minju Kim, Dayeon Seo, Bugeun Kim

― 9 min read


Revamping NPC Merchant Revamping NPC Merchant Interactions gaming experience. Enhancing NPC merchants for a richer
Table of Contents

In the world of gaming, non-player characters (NPCs) play a vital role in creating an engaging experience for players. Among them, merchant NPCs are particularly important as they facilitate the buying and selling of items. However, many of these merchant NPCs behave in a rather dull manner, offering fixed prices and limited interactions with players. Imagine walking into a store where the shopkeeper just stares at you without any conversation. Boring, right? This has led to a new approach aimed at making these merchants more lively and interactive.

The goal of enhancing merchant NPCs is to mimic how real-world traders operate. In contrast to the current scripted dialogues and unchanging prices, a more active merchant NPC would negotiate prices and engage in meaningful conversations. This means that instead of just tapping a button to buy an item, players would have the chance to chat with the merchant, discuss prices, and maybe even haggle a bit.

To achieve this, developers have turned to large language models (LLMs), a type of artificial intelligence that excels at understanding and generating human-like text. These models can help create a more dynamic interaction between players and merchant NPCs. The idea is simple: make the merchants smarter so they can better interact with players and respond to their needs.

The Role of Merchant NPCs in Games

Merchant NPCs have a unique function in many open-world role-playing games. They serve as hubs for exchanging items, much like how we shop at a supermarket or a cozy local store. However, the way these NPCs interact with players often lacks depth. Players typically find themselves in a one-way conversation where they are simply presented with a list of items and prices.

For instance, if a player wants to buy a shiny sword, they click on it, see the price, and make the purchase without any real interaction. It’s straightforward, but it doesn't feel personal. In the real world, shopping is often a dialogue filled with questions and negotiations. Merchants can adjust prices based on demand and can chat with customers to understand their needs better. By making merchant NPCs more interactive, players can enjoy a richer experience that mimics real-life shopping.

Identifying the Issues with Current Merchant NPCs

The challenge with current merchant NPCs can be boiled down to two main issues: passive pricing and passive communication.

Passive Pricing

With passive pricing, merchants stick to fixed prices without any room for negotiation. Imagine walking into a store and the price tag never changes, no matter what. In real-world settings, sellers often adjust prices based on factors such as availability, demand, and customer behavior. In contrast, game developers often set strict pricing policies that don't change.

This rigid pricing system can make the gaming experience feel less authentic. After all, players appreciate the challenge of negotiating a better deal or discovering that haggling can lead to a sweeter price. To make merchant NPCs more engaging, it’s essential to give them the freedom to adjust prices based on different circumstances, akin to real-world merchants who assess the value of their goods before selling.

Passive Communication

The second issue is how merchant NPCs communicate with players. Currently, many merchants rely on scripted messages that fail to create an immersive experience. Players interact with merchant NPCs through pre-written dialogues that don't respond to individual needs. It’s like talking to a robot that can only say a few phrases.

In the real world, communication is fluid, and it involves back-and-forth dialogue. Players would enjoy a more interactive experience if they could ask questions about items, receive personalized responses, and engage in negotiations similar to a real shopping experience.

Introducing Large Language Models

So how can developers fix these problems? The answer lies in large language models (LLMs). These models are trained on vast amounts of text and can generate human-like responses. By integrating LLMs with merchant NPCs, developers can create a richer experience where the NPCs can adjust prices dynamically and engage in natural conversations.

Think of LLMs as the brain behind an NPC. They can help the merchant understand the player's intent, answer questions, and even suggest variations in price based on the player's characteristics or past purchases. The goal is to make the merchant NPC more relatable and adaptable, just like a savvy shopkeeper who knows their inventory and customers well.

Developing the Merchant Framework

To bring the idea of a more active merchant NPC to life, a framework has been proposed that focuses on two main components: an appraiser module and a negotiator module.

Appraiser Module

The appraiser module is responsible for determining the value of items. Instead of relying on fixed prices, this module allows the merchant to assess the worth of an item based on its attributes and current market trends.

This is similar to how a jeweler assesses the value of a diamond. The appraiser module uses LLMs to analyze item descriptions and come up with a retail price. This dynamic pricing can make the shopping experience much more interesting for players, who can then negotiate a price based on the appraiser's assessment.

Negotiator Module

The negotiator module works hand in hand with the appraiser. Once a player expresses interest in buying an item, the negotiator engages in a back-and-forth dialogue about the price. This module employs LLMs to facilitate conversations and use various tactics to convince players to buy items.

For example, if a player wants to buy a sword, the negotiator might say something like, "I can offer you that sword for 100 gold, but if you buy a shield as well, I can lower the price to 90 gold." This back and forth not only keeps players engaged but also creates a sense of satisfaction when they manage to negotiate a good deal.

Conducting Experiments

To ensure these modules work effectively, a series of experiments were conducted. The focus was to compare different training methods to find out which ones resulted in the best performance for both appraisers and negotiators. Here’s a quick overview of what was tested:

Fine-Tuning Methods

Two primary training methods were explored: supervised fine-tuning (SFT) and knowledge distillation (KD). SFT improves a model’s performance by training it on a specific dataset, while KD transfers knowledge from a larger model to a smaller one, ensuring that smaller models can still perform effectively without requiring massive computational resources.

The experiments found that SFT methods, especially when applied to smaller language models, were effective in creating reliable appraisers. Similarly, KD methods also showed promise, demonstrating that smaller models could generate persuasive dialogues without requiring heavy computational demands.

Results of the Experiments

The results from the experiments provided valuable insights. The appraiser module was shown to effectively estimate item prices with a high level of accuracy, while the negotiator module demonstrated an ability to engage players in meaningful and persuasive dialogues.

Appraiser Performance

The appraisers using LLMs were able to generate retail prices that closely matched actual item values. This means that players could have confidence in the merchant’s offerings, making them more likely to engage in transactions. Players who were able to negotiate would often find that they could secure item prices that felt fair and justified.

Negotiator Performance

On the negotiation side, the results indicated that LLMs were capable of crafting persuasive arguments and maintaining an engaging dialogue. The negotiator's ability to use different tactics to convince players showcased the versatility of LLMs in creating a more interactive experience.

Players appreciated the chance to negotiate and felt that their actions had a real impact on the outcome—an experience that enhances immersion and enjoyment.

Addressing Irregular Cases

While the experiments yielded positive results, some irregularities also emerged. Developers need to be aware of these potential issues when designing merchant NPCs. For instance:

Giveaways

Merchants sometimes offered extra items or bonuses to encourage purchases. While this mirrors real-life sales tactics, it may disrupt the game’s balance if not properly managed. Developers must decide whether to allow such behaviors and how they fit within the game's rules.

Improvisations

There were instances where merchants suggested items that didn't exist or made odd remarks about their stock. This phenomenon, known as "hallucination," typically occurs with smaller models that lack robust training. Developers should prepare for unexpected outputs and implement systems to confirm the legitimacy of suggested items.

Arithmetic Errors

In some cases, merchants struggled with basic calculations during negotiations. For instance, they may misstate the total cost of multiple items. This can lead to confusion for players and disrupt the negotiation process. Developers may want to consider using external tools to assist with calculations to avoid this issue.

The Future of Merchant NPCs

Transforming merchant NPCs into more active and engaging characters can significantly enhance the overall gaming experience. As developers continue to refine their frameworks and utilize advanced technologies like LLMs, the interactions between players and merchants will become more authentic and enjoyable.

Imagine walking into a virtual market where every merchant greets you with a warm smile, remembers your previous purchases, and offers personalized deals. The possibilities are endless, and as technology evolves, so too will the experiences we have in gaming worlds.

Conclusion

In summary, rethinking how merchant NPCs engage with players can lead to a more vibrant and immersive gaming experience. By addressing the issues of passive pricing and communication, developers can create lively merchants who negotiate prices and facilitate rich interactions. With the help of large language models, it's possible to craft intelligent merchant NPCs that mimic real-world traders.

As the gaming landscape continues to evolve, developers have the opportunity to bring characters to life in ways that were once limited to our imaginations. In a world where every interaction can feel genuine, players are sure to find themselves immersed in a richer narrative, making each shopping trip an adventure rather than a chore.

So, next time you're shopping in a game, consider the possibilities: a chatty merchant who remembers your preferences, offers bargains, and maybe even shares a joke or two. Now, that would be gaming gold!

Original Source

Title: Leveraging Large Language Models for Active Merchant Non-player Characters

Abstract: We highlight two significant issues leading to the passivity of current merchant non-player characters (NPCs): pricing and communication. While immersive interactions have been a focus, negotiations between merchant NPCs and players on item prices have not received sufficient attention. First, we define passive pricing as the limited ability of merchants to modify predefined item prices. Second, passive communication means that merchants can only interact with players in a scripted manner. To tackle these issues and create an active merchant NPC, we propose a merchant framework based on large language models (LLMs), called MART, which consists of an appraiser module and a negotiator module. We conducted two experiments to guide game developers in selecting appropriate implementations by comparing different training methods and LLM sizes. Our findings indicate that finetuning methods, such as supervised finetuning (SFT) and knowledge distillation (KD), are effective in using smaller LLMs to implement active merchant NPCs. Additionally, we found three irregular cases arising from the responses of LLMs. We expect our findings to guide developers in using LLMs for developing active merchant NPCs.

Authors: Byungjun Kim, Minju Kim, Dayeon Seo, Bugeun Kim

Last Update: 2024-12-15 00:00:00

Language: English

Source URL: https://arxiv.org/abs/2412.11189

Source PDF: https://arxiv.org/pdf/2412.11189

Licence: https://creativecommons.org/licenses/by/4.0/

Changes: This summary was created with assistance from AI and may have inaccuracies. For accurate information, please refer to the original source documents linked here.

Thank you to arxiv for use of its open access interoperability.

More from authors

Similar Articles