Dynamic Personality in LLM Agents: A Framework for Evolutionary Modeling and Behavioral Analysis in the Prisoner’s Dilemma (2025)

Abstract: Using Large Language Model agents to simulate human game behaviors offers valuable insights for human social psychology in anthropomorphic AI research. While current models rely on static personality traits, real-world evidence shows personality evolves through environmental feedback. Recent work introduced dynamic personality traits but lacked natural selection processes and direct psychological metrics, failing to accurately capture authentic dynamic personality variations. To address these limitations, we propose an enhanced framework within the Prisoner’s Dilemma, a socially significant scenario. By using game payoffs as environmental feedback, we drive adaptive personality evolution and analyze correlations between personality metrics and behavior. Our framework reveals new behavioral patterns of agents and evaluates personality-behavior relationships, advancing agent-based social simulations and human-AI symbiosis research.

## introduction large language model (llm) agents excel in natural language processing, effectively simulating human interactions and game behaviors. this simulation capability represents a key research frontier, providing a controlled, cost-effective experimental paradigm for human social psychology studies. it also offers valuable insights into anthropomorphic behavioral patterns of agents @xcite , which are crucial for understanding human-ai symbiosis in evolving sociotechnical systems. the authentic simulation of human psychological and behavioral traits, particularly personality, is crucial for modeling interactive game scenarios. personality, as a fundamental psychological attribute @xcite , reflects individual cognitive and behavioral patterns and can ob-* corresponding author tain successive subtle mutations on a long temporal scale with environmental feedback @xcite @xcite . this dual nature of stability and adaptability make personality simulation a key challenge in developing anthropomorphic agents. current research demonstrated that llm agents can manifest anthropomorphic personality traits @xcite . @xcite suggested that the agents possess advanced cognitive capabilities during interactions. @xcite and @xcite explored the reliability of using humanapplicable methodologies to assess the personality of agents. @xcite indicated that the game environment can influence reciprocity preferences and belief biases within agents, leading to diverse behavioral patterns. these findings provide a psychological foundation for the implementation of dynamic personalities using llm agents. recent research on the behavioral simulation using llm agents employed various methods. specific frameworks perceived agents as rational entities, exclusively based on their reasoning capabilities, without explicitly modeling the personality. others assigned static personality traits to agents, revealing behavioral variations and correlations similar to human social psychology experiments. however, existing research had significant limitations on using static personality, which ignored the dynamic evolution of personality traits through environmental feedback, lacking a necessary natural selection process. although recent work @xcite introduced dynamic personality mutations in the prisoner's dilemma, they explicitly set the mutation directions (albeit randomly) and lack the simulation of natural selection. this prevents accurate reproduction of real-world personality evolution @xcite and separates the bidirectional causal relationship between personality traits and environmental feedback. in addition, existing frameworks primarily focus on lexical elements while neglecting direct psychological metrics. this limitation leads to inaccurate evaluation of dynamic personality. specifically, @xcite analyzed correlations between behavior and certain word frequency statistics, but their approach lacked conciseness and crucial direct psychological metric like the big five inventory (bfi). consequently, they failed to capture subtle variations of results, leading to limited explainability of behavioral fluctuation @xcite . to address these limitations, we propose a novel framework for anthropomorphic llm agents. in this framework, game-theoretic payoff mechanisms serve as primary environmental feedback to drive the dynamic evolution of personality. we evaluate the correlation between behavioral manifestations and multiple personality metrics, including bfi. we implement our framework in the prisoner's dilemma, whose simplistic structure clearly separates the behavioral influence of personality in the game. it reveals the dominant effect in a single round while it captures the adaptive adjustment for environmental feedback on a long temporal scale. our specific contributions are as follows: prior work on agent behavior in game scenarios can be broadly categorized into two types: classical games and negotiation scenarios @xcite . in classical games, frameworks such as alympics @xcite , pokergpt @xcite , and competeai @xcite found the behavioral patterns of agents in competitive environments. in negotiation tasks, aucarena @xcite , negotiationarena @xcite , and other research in specific scenarios such as werewolf @xcite investigated the strategic and collaborative regulations of agents. specifically, several studies have discovered the behavior patterns of llm agents in the iterated prisoner's dilemma. @xcite indicated that training data, prompt, objectives, and behavior of co-agents may influence the behavioral tendencies of agents in social scenarios. @xcite and @xcite revealed that llm agents may exhibit behavioral traits that align more closely with human behavior as opposed to traditional rational agents. similar to human @xcite , no strategy can necessarily dominate in a long-term iteration @xcite . the studies investigated highly representative scenarios but lacked dynamic modeling of adaptive personality evolution to environmental feedback. specific work @xcite @xcite focused on environmental feedback mechanisms in certain scenarios, avoiding this defect without the explicit model of personality. recent research @xcite @xcite @xcite showed that llm agents can exhibit evaluable anthropomorphic intelligence and personality traits in social scenarios. this capability allows us to explicitly model personality traits for agents, thereby capturing their evolutionary regulations more accurately. certain studies @xcite are devoted to explicitly modeling the personality traits of agents. these frameworks use static personality, limiting their applicability to game scenarios. @xcite introduced a simulation framework with dynamic personality mutations in the prisoner's dilemma. however, they explicitly set the direction of personality mutation and lacked analysis with direct psychological metrics. therefore, the impact of subtle personality mutation on the behavioral patterns of agents was not comprehensively captured. these limitations highlight the need for a more accurate framework of dynamic personality modeling. agents are randomly grouped to replay the game, starting the next evolutionary generation. agent 9 agent 27 agent 15 agent 6 the prisoner's dilemma with mutation process of persaonlity agent with the top 50% of payoffs are copied ... collaboration +0 defection agent 17 round 1 +4 +5 +1 +0 +4 +5 +1 2 3 4 ... ... ... ... ... 30 +0 +5 78 75 collaborative but occasionally self-focused. team-oriented but sometimes self-focused on individual aims. works well with others but sometimes prioritizes self. agent 12 collaboration defection defection defection defection collaboration collaboration collaboration personality description behavior behavior personality description payoffs payoffs total payoffs * mutation game 1 game 1 agent 17 agent 12 ... 78 75 game 2 agent 3 agent 9 68 92 game 3 agent 27 agent 15 85 10 game 15 agent 22 agent 6 88 7 7 10 agent 22 85 88 92 payoffs agent ... agent 1 agent 2 agent 3 agent 16 agent 17 agent 18 agent 15 agent 30 ... agent with the bottom 50% of payoffs are eliminated payoffs sum the selection process of persaonlity sort agents by total payoffs * in each round of the game, the agent's personality has a probability of subtle mutation based on the original description without any preset tendency. each evolutionary generation contains multiple games. figure 1 : an instance of our dynamic simulation of personality in the prisoner's dilemma scenario. the simulation consists of multiple evolutionary generations. in each generation, agents are first grouped in pairs and play multiple rounds of the game. the personality of each agent has a probability of subtle mutation based on the original description during the game. at the end of all games, all agents are sorted by their payoffs from highest to lowest. the half of agents with higher payoffs retain and copy their personality descriptions, while the half with lower payoffs are eliminated, which is the selection process of personality. after the selection process, the renumbered agents are randomly grouped to start the next generation. ## results in this section, we present our framework's results, focusing on three key aspects: the impact of dynamic personality on agent behavioral evolution, the correlation between dynamic personality traits and behavioral patterns, and the predictive accuracy of different personality metrics on agent behavior. these analyses offer insights into the interplay between personality evolution and behavioral dynamics in our simulation. ## conclusion we propose a framework using llm agents to simulate and evaluate dynamic personality traits in the prisoner's dilemma. dynamic personality introduction results in two behavioral tendencies: stable collaboration and stable defection, strongly correlating with specific personality metrics, notably bfi's dimension o (openness) for glm-4-air and dimension a (agreeableness) for deepseek-v3. certain bfi dimensions approach or surpass word frequency and embedding vectors, underscoring dynamic personality's role in agent behavior. this study contributes to anthropomorphic ai and social psychology by elucidating dynamic personality evolution under environmental feedback. it provides a direct evaluation framework and comparisons with human experiments, offering insights into ai and social psychology. future research can extend our framework in promising directions.