Hierarchical Memory Consolidation and Context-Efficient Retrieval forPersistent Personality in LLM-Based Game NPCs
Open accessThe DOI matches its Crossref record; 6 of the 6 references it cites were found in a registry or an index.
Abstract
Large Language Model (LLM) agents offer a practical path toward fully autonomous Non-PlayerCharacters (NPCs) in games, yet two engineering problems limit their adoption at scale. First, supplyingagents with uncompressed event histories causes context token usage to grow linearly with simulationlength, making concurrent multi-NPC deployment economically unviable. Second, generic episodicsummarization strips character-defining context from long-term memory, causing gradual personalityerosion over extended play sessions. We introduce a three-tier hierarchical memory architecture, Short-Term Memory (STM), Episodic, and Core, combined with a graph-based retrieval engine adapted fromHippoRAG. Our personality-aware consolidation pipeline injects each agent’s OCEAN psychologicaltrait scores and personal values into the episodic summarization prompt, producing identity-biasedmemory summaries that preserve character alignment over time. The architecture is implementedand evaluated inside Clone World, a multi-agent simulation framework built on hexagonal ports-and-adapters architecture. Over a 14-day agent simulation with𝑛=3agents, the hierarchical systemachieves a 94.8% reduction in context token usage relative to a full-history retrieval baseline (19.32×efficiency gain), confirmed over 1,809 observed decision cycles. Graph-based retrieval outperformsnaive vector cosine similarity for relational memory recall (Mann–Whitney𝑈=0, rank-biserial𝑟=1.000,Cohen’s𝑑=6.437). An analysis of 78 episodic summaries (39 OCEAN-aware, 39 generic) shows thatOCEAN-injected consolidation produces measurably more value-aligned content for 2 of 3 testedagents. Results suggest this architecture constitutes a scalable, economically viable approach forpersistent, personality-driven NPCs in production game environments.
Overview
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
Citations
Cites
Individual Comparisons by Ranking Methods
Wilcoxon, F. (1945) · Biometrics Bulletin · doi:10.2307/3001968 · Cited by 15,354
Human Memory: A Proposed System and its Control Processes
Atkinson, R. C., & Shiffrin, R. M. (1968) · Psychology of Learning and Motivation · doi:10.1016/s0079-7421(08)60422-3 · Cited by 7,216
An Introduction to the Five‐Factor Model and Its Applications
McCrae, R. R., & John, O. P. (1992) · Journal of Personality · doi:10.1111/j.1467-6494.1992.tb00970.x · Cited by 6,835
Generative Agents: Interactive Simulacra of Human Behavior
Park, J. S., O'Brien, J., Cai, C. J., Morris, M. R., Liang, P., & Bernstein, M. S. (2023) · Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology · doi:10.1145/3586183.3606763 · Cited by 2,187
The hippocampal memory indexing theory.
Teyler, T. J., & DiScenna, P. (1986) · Behavioral Neuroscience · doi:10.1037/0735-7044.100.2.147 · Cited by 871
Evaluating Very Long-Term Conversational Memory of LLM Agents
Maharana, A., Lee, D.-H., Tulyakov, S., Bansal, M., Barbieri, F., & Fang, Y. (2024) · Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2024.acl-long.747 · Cited by 96
Research works printed but not linked: 20
- P Anokhin, 2024, AriGraph: Learning knowledge graph world models with episodic memory for LLM agents
- J Chen, 2025, AgentSociety: Large-scale simulation of LLM-driven generative agents advances understanding of human behaviors and society
- Y Chen, 2025, MIMIC: Integrating diverse personality traits for better game testing using large language model, Proceedings of the 40th IEEE/ACM International Conference on Automated Software Engineering (ASE 2025
- A Cockburn, 2005, Hexagonal Architecture (Ports and Adapters)
- D Edge, 2024, From local to global: A graph RAG approach to query-focused summarization
- B J Guti�rrez, 2024, HippoRAG: Neurobiologically inspired long-term memory for large language models
- X Hu, 2024, Enabling long-term memory for LLM agents via hierarchical summarization and selective retrieval
- P Lewis, 2020, Retrievalaugmented generation for knowledge-intensive NLP tasks, Advances in Neural Information Processing Systems (NeurIPS), 33, 9459
- X Li, 2024, Think twice before assigning personality to GPT, Evaluation of personality consistency in LLMs
- C Packer, 2023, MemGPT: Towards LLMs as operating systems
- G Rao, 2023, Can LLMs express personality? an exploration using the Big Five
- T Shen, 2025, A survey of graph retrieval-augmented generation for customized large language models
- N Shinn, 2023, Reflexion: Language agents with verbal reinforcement learning, Advances in Neural Information Processing Systems (NeurIPS)
- S Sun, 2025, PersonaAgent with GraphRAG: Communityaware knowledge graphs for personalized LLM
- E Tulving, 1972, Episodic and semantic memory, Organization of Memory, 381
- Z Wang, 2025, From experience to strategy, Empowering LLM agents with trainable graph memory
- G Xiong, 2026, Graph-based agent memory: Taxonomy, techniques, and applications
- S Yao, 2023, ReAct: Synergizing reasoning and acting in language models
- W Zhang, 2025, Memory in the age of AI agents: A survey
- Y Zhou, 2025, Enabling personalized long-term interactions in LLM-based agents through persistent memory and user profiles
Cited by
Still being checked.
Metadata
- Authors
- Damastuti, F. A., Firmansyah, K., Barakbah, A., & Hariadi, M.
- Affiliations
- Institut Teknologi Sepuluh Nopember (ID)
- Corresponding author
- Damastuti, Fardani Annisa
- Venue
- SSRN Electronic Journal
- Publisher
- Elsevier BV
- Published
- 2026
- ISSN
- 1556-5068 (ISSN-L)
- OpenAlex
- W7151540001
- Cited by
- 0
- References
- 6
- Type
- posted content
- Language
- en
- Open access
- green
- doi.org
- Locations
- SSRN Electronic Journal (acceptedVersion)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Artificial Intelligence in Games
- Physical Sciences › Computer Science › Artificial Intelligence › Psychiatry, Mental Health, Neuroscience
- Physical Sciences › Computer Science › Artificial Intelligence › AI-based Problem Solving and Planning
- Keywords
- LLM agents, memory hierarchy, memory consolidation, graph-based retrieval, multi-agent simulation
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.