Modeling latent character states is crucial for consistent and engaging role-playing (RP) with large language models (LLMs). Yet, existing prompting-based approaches mainly capture surface actions, often failing to track the latent states that drive interaction. We revisit finite-state machines (FSMs), long used in game design to model state transitions. While effective in small, well-specified state spaces, traditional hand-crafted, rule-based FSMs struggle to adapt to the open-ended semantic space of RP. To address this, we introduce Codified Finite-State Machines (CFSMs), a framework that automatically codifies textual character profiles into FSMs using LLM-based coding. CFSMs extract key states and transitions directly from the profile, producing interpretable structures that enforce character consistency. To further capture uncertainty and variability, we extend CFSMs into Codified Probabilistic Finite-State Machines (CPFSMs), where transitions are modeled as probability distributions over states. Through both synthetic evaluations and real-world RP scenarios in established artifacts, we demonstrate that CFSM and CPFSM outperform generally applied baselines, verifying effectiveness not only in structured tasks but also in open-ended stochastic state exploration.


翻译:对潜在角色状态进行建模对于实现与大型语言模型(LLM)一致且引人入胜的角色扮演(RP)至关重要。然而,现有的基于提示的方法主要捕捉表面行为,往往难以追踪驱动交互的潜在状态。我们重新审视了有限状态机(FSM)——这一在游戏设计中长期用于建模状态转换的工具。传统手工构建的、基于规则的FSM在小型、明确指定的状态空间中虽然有效,却难以适应RP开放式的语义空间。为解决这一问题,我们提出了编码有限状态机(CFSM)框架,该框架利用基于LLM的编码技术,自动将文本角色描述编码为FSM。CFSM直接从角色描述中提取关键状态和转换,生成可解释的结构以强制保持角色一致性。为进一步捕捉不确定性和可变性,我们将CFSM扩展为编码概率有限状态机(CPFSM),其中状态转换被建模为状态上的概率分布。通过在合成评估和既有作品中的真实RP场景进行实验,我们证明CFSM和CPFSM优于普遍应用的基线方法,验证了其不仅在结构化任务中有效,在开放式随机状态探索中同样有效。

0
下载
关闭预览

相关内容

多模态基础模型的机制可解释性综述
专知会员服务
43+阅读 · 2025年2月28日
基于大型语言模型的游戏智能体综述
专知会员服务
66+阅读 · 2024年4月3日
使用多模态语言模型生成图像
专知会员服务
32+阅读 · 2023年8月23日
面向多智能体博弈对抗的对手建模框架
专知
18+阅读 · 2022年9月28日
基于关系网络的视觉建模:有望替代卷积神经网络
微软研究院AI头条
10+阅读 · 2019年7月12日
一大批中文(BERT等)预训练模型等你认领!
PaperWeekly
15+阅读 · 2019年6月25日
这可能是「多模态机器学习」最通俗易懂的介绍
计算机视觉life
113+阅读 · 2018年12月20日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员