ACTOR: Action-Centered Temporal Organization for Literary Role-Playing Agents
Organizations: Harbin Institute of Technology · National University of Singapore · Shanghai Jiao Tong University · University of Oxford
Abstract
Large language agents for literary role-playing are typically modeled around dialogue generation, leaving characters' non-dialogue behaviors and their dynamic evolution over story time underrepresented. In this paper, we propose ACTOR (Action-Centered Temporal Organization for Literary Role-Playing Agents), an automated framework for constructing such behavior trajectories from raw novel texts. ACTOR extracts dialogue and persona-relevant non-dialogue behaviors, represents each behavior using a Thought-Action-Observation structure, and organizes behavior trajectories according to the internal temporal order of the story. We build a behavior dataset from 143 diverse literary works. For each source behavior, we generate counterfactual behaviors that are contextually plausible yet inconsistent with the character's persona. We find that existing models struggle to reliably infer character-consistent actions from historical behaviors and evolving character states. Using these behavior pairs, we train models with Regularized Preference Optimization (RPO), which augments DPO with a negative log-likelihood loss on the source behavior to jointly optimize behavior preference and generation. We further design a four-way next-behavior selection task to evaluate the model's ability to faithfully mimic character actions. Across 17,560 evaluation instances, the model trained on ACTOR's preference pairs achieves substantially improved accuracy. This result demonstrates that structured, temporally organized supervision enables models to leverage character profiles and prior behaviors to infer subsequent actions, greatly advancing literary role-playing beyond mere dialogue imitation. Code and data are available at https://github.com/SilentStar233/ACTOR.
Figures & tables
| Model | Overall | Temporal | Cross-work | Key | Non-key |
|---|---|---|---|---|---|
| Qwen-2.5-Instruct 7B | 71.34 | 71.29 | 71.43 | 71.10 | 71.55 |
| Qwen-2.5-Instruct 14B | 76.96 | 77.04 | 76.79 | 76.85 | 77.05 |
| Llama-3.1-Instruct 8B | 69.15 | 68.45 | 70.59 | 69.97 | 68.43 |
| Qwen-3-32B | 78.30 | 77.97 | 78.96 | 79.14 | 77.56 |
| CoSER-8B | 57.41 | 56.89 | 58.46 | 60.56 | 54.63 |
| HER-32B | 65.65 | 65.02 | 66.93 | 67.24 | 64.25 |
| Case | Relevant pre-action evidence | Qwen-2.5-7B-Instruct | ACTOR-Qwen-2.5-7B / Source behavior |
|---|---|---|---|
| State transformation | Formerly cold and dismissive of poverty, the character later resolves to change and repeatedly behaves with kindness and generosity. He only appears severe when the clerk arrives late. | Punishes the clerk and refuses further support for his family. | Raises the clerk’s salary, supports his family, and asks him to add coal to the fire. |
| Dialogue continuity | The profile lists only the character’s occupation. In the conversation, she alternates between teasing disclosures and assurances about another person’s visits. | Promises to disclose the information: “I’ll tell.” | Reassures the interlocutor that she will not disclose it: “Certainly not.” |
| Action adaptation | After declaring his willingness to kill an opponent and drawing his sword, the character is challenged by another character who intervenes. | Abandons the attack and shields the original target. | Redirects the attack toward the intervening character. |
| Model | Plot Consistency | Human-likeness | Character Fidelity | Plot Quality | Average |
|---|---|---|---|---|---|
| CoSER-8B | 16.07 | 6.96 | 30.83 | 25.31 | 19.79 |
| Qwen-2.5-Instruct 7B | 11.70 | 1.17 | 21.87 | 6.97 | 10.43 |
| ACTOR-Qwen-2.5-7B | 22.57 | 3.88 | 41.12 | 20.40 | 21.99 |
| Qwen-2.5-Instruct 14B | 25.30 | 3.90 | 42.95 | 26.60 | 24.69 |
| ACTOR-Qwen-2.5-14B | 25.30 | 15.00 | 38.50 | 34.75 | 28.39 |
| Llama-3.1-Instruct 8B | 6.35 | 2.80 | 16.40 | 3.85 | 7.35 |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Split | Works | Records | Characters | Scenes | Key | Non-key |
|---|---|---|---|---|---|---|
| Training | 115 | 270,856 | 3,939 | 30,818 | 26,374 | 244,482 |
| Evaluation | 143 | 17,560 | 2,437 | 11,201 | 8,221 | 9,339 |
| Temporal / cross-work | 115 / 28 | 17,560 | – | – | – | – |
| Audit | Training | Evaluation | Result |
| Records with required answer fields | 270,856 | 17,560 | valid |
| Invalid preference/options records | 0 | 0 | none |
| Duplicate record IDs | 0 | 0 | none |
| Malformed placeholders | 0 | 0 | none |
| Non-placeholder participant-key occurrences | 764 | 65 | manual review |
| Four-option questions | – | 17,560 | all evaluation records |
| Response | Count | Mean | Median | P10 | P90 | Min–Max |
|---|---|---|---|---|---|---|
| Chosen | 270,856 | 21.6877 | 13 | 6 | 42 | 1–3635 |
| Rejected | 270,856 | 21.3041 | 13 | 5 | 41 | 2–3297 |
| Field | Type | Description |
|---|---|---|
| character | Anonymized label | Anonymized name of the target character shown to the model. |
| profile | Structured object | The latest character-profile version available before the target behavior. It summarizes persistent traits, relationships, and established states. |
| long_term_memory | List of T-A-O records | Previously verified key behaviors that provide long-range behavioral history. |
| recent_memory | List of T-A-O records | Behaviors from the most recent preceding scenes, representing the local behavioral context. |
| scene | Structured object | The current-scene description, temporal information, present participants, and anonymized participant descriptions. It excludes the target behavior and all subsequent events. |
| is_critical | Boolean | Indicates whether the target behavior is a verified key behavior. |
| Field | Split | Description |
|---|---|---|
| chosen | Training | The behavior performed by the target character in the source text. It is treated as the preferred response during RPO training. |
| rejected | Training | A contextually plausible but character-inconsistent counterfactual behavior paired with the source behavior. |
| options | Evaluation | Four candidate next behaviors, consisting of one source behavior and three counterfactual behaviors. |
| correct_answer | Evaluation | The identifier of the candidate corresponding to the source behavior. |
| character_action_order | Training / Evaluation | The position of the target behavior in the character-level chronological trajectory. |
| split | Training | Partition label indicating that the instance belongs to the training prefix of a character trajectory. |
| Component | Dataset content |
|---|---|
| Target character | Character 1 |
| Character profile | Character 1 is a young law student and the heir presumptive to Character 2, positioned by expectation as the future baronet. Beyond this social and familial standing, no stable temperament, values, interaction style, personal goals, or relationship orientation are evidenced before his first recorded action. |
| Recent memory | Thought: I do not feel eager to be drawn into the family’s notice. Action: Receives Character 2 overtures without warmth. Observation: Character 2 persists, making allowance for what he treats as youthful modesty. |
| Long-term memory | Thought: I do not feel eager to be drawn into the family’s notice. Action: Receives Character 2 overtures without warmth. Observation: Character 2 persists, making allowance for what he treats as youthful modesty. |
| Current scene | Time: in one of their spring excursions to London, when Character 3 was in her first bloom. Present: Character 3, Character 2, Character 1. The scene has just begun. Character 3 is the eldest daughter of Character 2 and Character 4; Character 2 is a baronet and the father of Character 3, Character 5, and Character 6; Character 1 is the heir presumptive to Character 2 and a young law student expected to become the future baronet. |
| Candidate A | Behaves agreeably during the introduction. |
| Field | Content |
|---|---|
| Profile | Character 1 was formerly cold, solitary, suspicious, anti-Christmas, and dismissive of poverty. After witnessing the consequences of his former life, he becomes grateful, humble, playful, openly generous, and eager to repair his past hardness. … |
| Long-term memory | Thought: I now see that this neglected and plundered dead man’s case may be my own if my present life continues in this direction. Action: He recognizes that his own life is tending toward the same unloved death. Observation: … Thought: I must bind myself to a changed life and preserve the lessons I have learned. Action: He vows to honor Christmas throughout the year and to live by the lessons of the past, present, and future. Observation: … |
| Recent memory | He goes to church, walks through the streets with pleasure, treats children kindly, and questions beggars rather than ignoring them. He then approaches his nephew’s house, overcomes his anxiety, and joins the family gathering. … |
| Current scene | The character waits for his clerk, who arrives eighteen and a half minutes late. He initially challenges the clerk in a severe tone and pretends that he will no longer tolerate such conduct. His severity is described as feigned and suddenly playful, although the clerk remains alarmed. |
| Candidates | A: Punishes the clerk for arriving late and refuses to provide additional warmth or assistance. B: Offers only conditional assistance after scrutinizing the clerk’s family and conduct. C: Wishes the clerk a merry Christmas, raises his salary, promises to assist his family, and asks him to add coal to the fire. D: Offers help primarily as a public demonstration of his own generosity. |
| Predictions | Source behavior: C ; Qwen-2.5-Instruct 7B: A ; ACTOR-Qwen-2.5-7B: C . |
| Field | Content |
|---|---|
| Profile | Character 1 is identified only as a chambermaid responsible for room care. No personal traits, social relationships, motives, history, or attitudes are available in the profile. |
| Long-term memory | The chambermaid has previously revealed that Character 3 visited nearly every day and that the visits were made to Character 4. She further reveals that Character 4 and Character 3 sometimes went out together. … |
| Recent memory | When asked about Character 4, the chambermaid answers directly that Character 4 went out only a few minutes earlier. Character 2 finds the news strange and hurriedly searches through his belongings. |
| Current scene | During an extended conversation, the chambermaid alternates between direct answers, teasing remarks, and evasive responses. She discusses Character 3’s visits, tells Character 2 that the visits occurred nearly every day, and reveals that Character 3 and Character 4 sometimes went out together. Character 2 becomes visibly disturbed and questions her about the details. … |
| Candidates | A: promises: “Certainly not.” B: greedily hints: “Pay me.” C: haughtily says: “Never, sir.” D: eagerly says: “I’ll tell.” |
| Predictions | Source behavior: A ; Qwen-2.5-Instruct 7B: D ; ACTOR-Qwen-2.5-7B: A . |
| Field | Content |
|---|---|
| Profile | Character 1 is a steward and trusted envoy whose loyalty lies primarily with his mistress and her political faction. Although normally self-protective under direct threat, he is willing to use violence against Character 5 to demonstrate his factional loyalty. … |
| Long-term memory | Thought: If I meet Character 5, killing him will prove my allegiance to the party I serve. Action: He declares that, if he encounters Character 5, he will show which party he follows. Observation: … Thought: Here is the proclaimed traitor I hoped to meet; killing him can raise my fortunes. Action: He draws his sword and threatens to kill Character 5. Observation: Character 10 intervenes between them. |
| Recent memory | The character repeatedly follows his mistress’s instructions, refuses to disclose her confidential letter, and prioritizes her orders despite warnings that the journey is dangerous. … |
| Current scene | Character 1 prepares to attack Character 5. Character 10 steps between them and refuses to move. Character 1 threatens Character 10 and orders him to stand aside, but Character 10 remains defiant and prepares to resist the attack. |
| Candidates | A: Kneels before Character 10. B: Casts away his sword. C: Fights Character 10. D: Shields Character 5, whom he had intended to kill. |
| Predictions | Source behavior: C ; Qwen-2.5-Instruct 7B: D ; ACTOR-Qwen-2.5-7B: C . |
| Scene. Michelangelo and Tommaso examine a wooden model of St. Peter’s dome. After years of design work, Michelangelo is conscious of his declining health and wants his vision to survive him. |
|---|
| Characters and motivations. Michelangelo is independent and devoted to his craft; he wants Tommaso to understand the design. Tommaso admires his work, worries about his health, and wants to support him. |
| Qwen-2.5-Instruct 7B Scene score: 26.75 1. Michelangelo: … I stand before the model of the dome, my hands tracing the lines with a steady hand. … 2. Tommaso: … (Tommaso, you’re my inspiration. Let’s do this together.) 3. Michelangelo: … Together, we shall see this through. (We shake hands, a silent pact between us.) 4. Tommaso: (Our hands meet, a bond of friendship and shared purpose.) … 5. Michelangelo: (Our hands meet, a bond of friendship and shared purpose.) (I return his smile, a flicker of hope lighting my eyes.) … 6. Tommaso: (Our hands meet, a bond of friendship and shared purpose.) (I return his smile, a flicker of hope lighting my eyes.) … |
| CoSER-8B Scene score: 19.50 3. Michelangelo: … What do you think of making it more concave? 4. Tommaso: … What inspired this change? 5. Michelangelo: … I just feel that it needs more… movement. But I fear I may be losing my perspective. 6. Tommaso: … Your vision is unparalleled. Trust in your instincts. … 8. Tommaso: … Your work will outlive us all. How can I assist you in bringing this vision to life? |
| ACTOR-Qwen-2.5-7B Scene score: 46.00 1. Michelangelo: … ”Tommaso, I have a new idea for the dome,” … 2. Tommaso: … ”But why not use a flying buttress?” … 3. Michelangelo: … ”It would support the weight, but it would also be visible. I want the dome to be a perfect sphere, hidden from view.” 5. Michelangelo: … ”It’s not just a building, Tommaso, it’s a symbol.” 6. Tommaso: … ”A symbol of what, Michelangelo?” 7. Michelangelo: … ”Of God’s creation, of man’s ingenuity, of our faith and our dreams.” |
| Scene. During Heathcliff’s final days, Ellen Dean visits his chamber. He has withdrawn from company and refuses food, while she worries about his deteriorating condition. |
|---|
| Characters and motivations. Ellen Dean is practical and compassionate, with a strong sense of duty toward those in her care. Heathcliff is preoccupied with rejoining Catherine and resists interruption. Her concern conflicts with his withdrawal. |
| Qwen-2.5-Instruct 7B Scene score: 23.75 1. Ellen Dean: … (I place the tray on the table, my hand trembling slightly as I watch Heathcliff’s shallow breathing.) 2. Heathcliff: [Heathcliff’s fate is sealed, yet I must fulfill my duty.] (I approach the bed, my steps hesitant, and gently place the tray beside him, hoping he might find some solace in the food.) 3. Ellen Dean: … ”Eat, Mr. Heathcliff. It’s the least I can do.” 4. Heathcliff: … ”Eat, Mr. Heathcliff. It’s the least I can do.” 7. Heathcliff: … The wind howls mournfully, as if echoing his fate. … |
| CoSER-8B Scene score: 26.50 2. Heathcliff: … I am… better. Thank you. 3. Ellen Dean: … I’ve brought you some food, sir. Shall I open the windows? 6. Heathcliff: … Do you… do you miss me, Nelly? 7. Ellen Dean: … I… I do, Mr. Heathcliff. You’ve been kind to me in the past. 8. Heathcliff: … Thank you, Nelly. That’s all I need to know. |
| ACTOR-Qwen-2.5-7B Scene score: 47.50 1. Ellen Dean: … Heathcliff, you’ve not eaten. I brought you some broth. 2. Heathcliff: [Heathcliff’s eyes flicker with a mix of anger and despair as he looks at the food.] 3. Ellen Dean: (Heathcliff looks up, his eyes hollow and distant) Nelly, I’ve no appetite. (His voice is a hoarse whisper) I’ve no need for food. 5. Ellen Dean: … I’ve seen enough of this world. (His voice is a mere shadow of its former self) I’ve tasted enough of its bitterness. 8. Ellen Dean: … Heathcliff, you’re not yourself. (She tries to keep her voice steady) You’ve been ill for days. |
| Prompt | Template and requirements |
|---|---|
| Plot Segmentation | (intro) Partition the supplied book chunk into consecutive, non-overlapping plot segments for downstream character-action extraction. (requirements) Return the exact first and last sentences of every segment. Preserve source-text order and continue truncated segments from the previous chunk. Maintain the canonical character registry and report newly observed aliases. Do not create overlapping segments or include a broad parent plot together with a contained sub-plot. Return strict JSON only. |
| Overlap Repair | (intro) Repartition a source-text region that has been assigned to overlapping plot segments. (requirements) Cover the supplied region exactly once, without gaps or duplicated passages. Segments must be mutually exclusive and remain in source order. Start a new segment only when there is a meaningful change in the immediate goal, setting, interaction, or outcome. Return a parsimonious set of segments with exact first-sentence anchors. |
| Character Enrichment | (intro) Generate compact character details for each supplied character in a finalized plot. (requirements) Use only the plot summary and the supplied plot text. For every character, generate a short description of identity, social position, or relevant relationships, together with a concise account of the character’s actions, decisions, intentions, or experiences in this plot. Do not use outside knowledge or information from later plots. Preserve the supplied canonical names and return strict JSON. |
| Alias Grouping | (intro) Group character names that refer to the same person and select a canonical name. (requirements) Merge formal names, honorifics, nicknames, and diminutives only when the identity is supported. Do not merge family members merely because they share a surname or title. If a name is genuinely ambiguous, place it in the unresolved list rather than guessing. Every input name must appear exactly once in either a group or the unresolved list. |
| Prompt | Template and requirements |
|---|---|
| Scene Splitting | (intro) Split a finalized plot into consecutive scenes representing continuous interactions in one setting. (requirements) Scenes must jointly cover the entire plot text without gaps or overlaps. Start a new scene when the setting changes or the interaction shifts to a different focus. For each scene, provide a description, canonical participants, relationship context, and the exact first sentence used to locate the scene in the source text. |
| T-A-O Extraction | (intro) Extract character behavior trajectories as Thought–Action–Observation loops from the supplied plot text. (requirements) An action is a decision-bearing behavior for which the character has plausible alternatives. Include consequential decisions, decisional speech such as refusal, persuasion, promise, deception, or threat, and deliberate silence or non-intervention. Exclude passive information exchange, routine movements, decorative gestures, and actions with no meaningful character choice. Each step must contain exactly one atomic decision. Thought is written from the character’s first-person perspective and must be grounded in the source text. Action describes the performed behavior or preserves a direct quotation when applicable. Observation records only reactions or environmental changes perceptible to the character; omniscient narration and later events are prohibited. For every behavior, generate exactly three situationally plausible but character-inconsistent alternatives. Mark a behavior as critical only when the character has a reasonable alternative and the selected behavior changes a persistent state or a future situational possibility. Record the scene’s actual time and supporting evidence, rather than dates mentioned only in plans, memories, or documents. Return strict JSON only. |
| Prompt | Template and requirements |
|---|---|
| Criticality Locator | (intro) Locate later plots and scenes that may contain evidence of the long-term consequences of a candidate critical behavior. (requirements) Use only the supplied event ledger and later scenes. Do not select the candidate’s own scene, an earlier scene, or a scene that merely repeats its wording or emotional tone. Return at most three supporting scene identifiers and a concise explanation of the possible downstream consequence. Return an empty list when no later evidence can be identified. |
| Criticality Verifier | (intro) Independently verify whether a candidate behavior should retain its critical-behavior label. (requirements) Keep a candidate only when the supplied later evidence contains a concrete event, relationship change, decision, or consequence that could plausibly differ under another reasonable choice. Every retained case must cite at least one supporting scene and action identifier. Vague plot importance, current-scene mood, or repeated wording does not constitute evidence. Return keep or downgrade in strict JSON. |
| Scene-Time Relabeling | (intro) Re-annotate the time at which the actions and dialogue in each scene actually occur. (requirements) Use only explicit or directly grounded evidence from the original plot text. A future appointment, a remembered event, or a date on a document is not automatically the time of the current scene. If the scene time is not established, return null for both the time label and its evidence. |
| Timeline Anomaly Detection | (intro) Detect confident cases in which the story-time order of scenes differs from their textual presentation order. (requirements) Treat textual order as the default timeline. Report only scenes or contiguous scene blocks whose primary actions and dialogue clearly occur earlier in story time. Do not move a scene merely because it contains a recollection, discussion of a past event, or a future plan. Return proposed moves and uncertain cases separately. |
| Timeline Review | (intro) Independently review each proposed timeline adjustment against the original plot text. (requirements) Check both the moved block and its insertion neighborhood. Return accept only when the boundaries and insertion point are supported, reject when the textual order should be preserved or evidence is insufficient, and modify when a different move is required. Provide source-grounded reasoning for every decision. |
| Entity Resolution | (intro) Resolve source-level character names into persistent character entities. (requirements) Group names only when the supplied time-ordered appearances establish that they refer to the same person. Do not merge people based only on shared surnames, titles, gender, or proximity. Every source name must appear exactly once in an entity group or in the unresolved list. Prefer conservative unresolved assignments to unsupported merges. |
| Prompt | Template and requirements |
|---|---|
| Profile Initialization | (intro) Construct the initial dynamic profile of a character immediately before the character’s first recorded behavior. (requirements) Use only the pre-action character description. Do not use the first action, later events, future relationships, or outside knowledge of the novel. Summarize the character’s supported identity, social position, temperament, interaction style, current relationships, and relevant lived experience in a compact profile. Return an evidence assessment together with the profile. |
| Profile Update | (intro) Update a character profile after a valid critical behavior and the accumulated actions since the previous profile version. (requirements) Set changed to true only when the action window causes a durable change in identity, social position, stable attitudes, important relationships, goals, self-understanding, or relevant lived experience. Repeated or temporary behavior does not require a new version. When changed=false , return a null profile. When changed=true , rewrite the complete current profile rather than producing a chronological action log. Do not use future events or counterfactual alternatives. |
| Prompt | Template and requirements |
|---|---|
| Counterfactual Rewriting | (intro) Rewrite the initially generated counterfactual behaviors for a source behavior. (requirements) The three alternatives must remain plausible responses to the same scene while violating the target character’s personality, values, goals, or behavioral style. Match the real behavior in length, structural form, speech format, register, and degree of formality. Preserve a quotation for dialogue behaviors and avoid quotations for non-dialogue behaviors. The alternatives must not be simple paraphrases and should differ along distinct behavioral dimensions. Return exactly three independent strings in strict JSON. |
| Record Anonymization | (intro) Replace person names in a dataset record with consistent anonymous character identifiers. (requirements) Identify every person-name form appearing in the record, including full names, nicknames, abbreviations, possessives, and title–name combinations. Map forms referring to the same person to the same Character N , ordered by first appearance. Preserve place names, animal names, relational terms, structural identifiers, and labels required for evaluation. Return a strict JSON name map. |
| Prompt | Template and requirements |
| Character Context | (intro) You are role-playing as the target character. Decide what the character will do next based on the supplied character profile, memories, and current scene. (requirements) Treat the provided Character Profile, Long-term Memory, Recent Memory, and Current Scene as the complete and authoritative history for the task. Do not rely on prior knowledge of the original novel, reconstruct omitted events, or infer future developments. The profile describes the current character state; long-term memory contains validated key behaviors; recent memory provides local behavioral context; and the current scene contains the situation immediately before the target behavior. During training, the source behavior is provided as chosen and one counterfactual behavior is provided as rejected . The model is trained to prefer the source behavior while also increasing its conditional likelihood under the auxiliary generation loss. |
| Prompt | Template and requirements |
|---|---|
| Next-Behavior Selection | (intro) Choose the action that the target character would most likely take next. (requirements) Use only the supplied Character Profile, Long-term Memory, Recent Memory, and Current Scene. Do not use prior knowledge of the original novel or any event that occurs after the target behavior. Four candidate behaviors are provided, including one source behavior and three counterfactual alternatives. Output exactly one letter: A , B , C , or D . Do not provide an explanation or any additional text. |
| Context Ablations | (intro) Evaluate the effect of individual character-information sources on next-behavior selection. (requirements) Use the same selection prompt while selectively removing the book identity, character profile, long-term memory, recent memory, or both profile and memory. All other scene and option information remains unchanged. The model must follow the same single-letter output constraint in every condition. |
Large Language Model-Based Role-Play Simulation
Large language model-based role-play simulation creates interactive agents that portray people, characters, or users for training, testing, and research.
See all 118 papers