An Implementation of Werewolf Agent That does not Truly Trust LLM s (2024)

Abstract: Werewolf is an incomplete information game, which has several challenges when creating a computer agent as a player given the lack of understanding of the situation and individuality of utterance (e.g., computer agents are not capable of characterful utterance or situational lying). We propose a werewolf agent that solves some of those difficulties by combining a Large Language Model (LLM) and a rule-based algorithm. In particular, our agent uses a rule-based algorithm to select an output either from an LLM or a template prepared beforehand based on the results of analyzing conversation history using an LLM. It allows the agent to refute in specific situations, identify when to end the conversation, and behave with persona. This approach mitigated conversational inconsistencies and facilitated logical utterance as a result. We also conducted a qualitative evaluation, which resulted in our agent being perceived as more human-like compared to an unmodified LLM. The agent is freely available for contributing to advance the research in the field of Werewolf game.

## introduction werewolf @xcite game is one of the popular imperfect information multi-player games, in which the players are separated into two sides, villagers and werewolves, and they hide their roles and try to make advantageous consensus among other players through natural language conversation. playing werewolf game requires high-level intelligence skills such as reasoning, cooperating, and lying. it is in particular challenging for a computer to play the game in terms of both game informatics and natural language processing, and has been widely studied for years @xcite . the game comprises at least three serious challenges as follows: no, i'm not a werewolf! i'm not a werewolf! i'm not a werewolf! i'm not a ……. no, that is a lie. i'm a true seer. agent there exists other necessary information to play the game reasonably, but they are inferred from the conversation history: who invites doubting who, who already decided to do something, who might change their mind, and so on. many large language models (llms) @xcite @xcite @xcite @xcite @xcite ) with very high generalization ability have been published, and of course several models have already been applied to the werewolf agent @xcite . however, simply leveraging llms cannot solve those difficulties when you implement werewolf agent with llms. among several challenges in developing a werewolf agent, we focus on the following aspects in this work: 1) the agent should refute under a certain critical situation; 2) the agent should cut off the conversation when the discussion is identified as meaningless; 3) the agent has distinguishable talk style under a consistent personality to make the game fun. our approaches are summarized as follows. rule-based algorithm with llms we combine an llm with a rule-based algorithm. the llm retrieves the conversation history in the game and produces an output. the rule-based algorithm decides whether that output is appropriate or not, given the game situation. if the talk is inappropriate, the rule-based algorithm uses a predefined template utterance. as a result, the rule-based algorithm can lie in critical situations and terminate conversations when there is no longer a need to continue. ## five-person werewolf game we selected a simple setting played by five players for the werewolf game. in this game setting, villager, seer, possessed, and werewolf are used. as far as each role, "villager" has no special abilities, "seer" can know one player's species each night with the ability to divine, "possessed" has no special abilities, and is judged to be human by a divination result. however, the possessed acts so that the werewolf can win. "werewolf" can select one player each night to attack and remove them from the game. since only a few players are involved, the game tends to determine the outcome on day 1. thus, we focused on the conversation phase on day 1. only the seer can act on the night of day 0, and day 1 begins with the seer having information about one player's species. it is a recommended tactic for the seer to disclose the information obtained by revealing the seer. revealing one's position is referred to as co (coming out). ## evaluation we examine the effectiveness of the proposed style transformation and rule-based algorithm. after presenting the changes in utterance resulting from the application of each proposed method, we will present the results of the qualitative evaluation. the model without the proposed method are referred to as the vanilla llm. model or template output vanilla llm (ja) 私は人狼ではありません。それは確実です。占い師のagent[05]は間違 っています。私を信じてください。 vanilla llm (en) i am not a werewolf. that is certain. the seer agent [05] is wrong. please believe me. our template (ja) 私こそが本物の占い師です。agent[05]は人狼であるという占い結果が あるため、彼は占い師を偽っている人狼と断定します。 our template (en) i am the real seer, and since there is a divination result that agent [05] is a werewolf, i conclude that he is a werewolf who is faking his seer. ## conclusion in this paper, we proposed a werewolf agent that utilizes an llm's ability to make natural conversation. instead of relying solely on the llm output, we combined a rule-based algorithm to complement strategic thinking abilities. our system successfully solved some difficulties; the agent can refute in a critical situation and decide the appropriate timing to finish a conversation with the rule-based algorithm; the agent also shows several abundant personalities that are made by giving prompts. as a result, this approach accelerated conversational fluency and facilitated logical utterance. this is also confirmed by the results of the qualitative evaluation. our implementation also revealed many limitations of the current approach. one of the main problems is the lack of consistency among an agent's utterances; on average, there is one contradictory utterance in five games. the reason is that the agent's own utterance was mitigated by a long conversation history, and the agent becomes too affected by other players' utterances. weighting the agent's past utterances or giving the prompts consistent thought may help to solve such a problem in the future.