English

Deriving Character Logic from Storyline as Codified Decision Trees

Computation and Language 2026-01-16 v1

Abstract

Role-playing (RP) agents rely on behavioral profiles to act consistently across diverse narrative contexts, yet existing profiles are largely unstructured, non-executable, and weakly validated, leading to brittle agent behavior. We propose Codified Decision Trees (CDT), a data-driven framework that induces an executable and interpretable decision structure from large-scale narrative data. CDT represents behavioral profiles as a tree of conditional rules, where internal nodes correspond to validated scene conditions and leaves encode grounded behavioral statements, enabling deterministic retrieval of context-appropriate rules at execution time. The tree is learned by iteratively inducing candidate scene-action rules, validating them against data, and refining them through hierarchical specialization, yielding profiles that support transparent inspection and principled updates. Across multiple benchmarks, CDT substantially outperforms human-written profiles and prior profile induction methods on 8585 characters across 1616 artifacts, indicating that codified and validated behavioral representations lead to more reliable agent grounding.

Keywords

Cite

@article{arxiv.2601.10080,
  title  = {Deriving Character Logic from Storyline as Codified Decision Trees},
  author = {Letian Peng and Kun Zhou and Longfei Yun and Yupeng Hou and Jingbo Shang},
  journal= {arXiv preprint arXiv:2601.10080},
  year   = {2026}
}
R2 v1 2026-07-01T09:05:18.887Z