13. Rewrite Fate

Project Access

AI Music Screenshot 1 AI Music Screenshot 2 AI Music Animation 1 AI Music Animation 2
File / Folder Purpose
app.py Flask backend – handles frontend, emotion analysis, generation
generate_continuation.py Loads nanoGPT model & generates text continuations
index.html Web interface – scene display, letter input, result section
script.js Frontend logic – handles submission, response rendering
style.css Styling for chapter and letter scenes
story_scenes.json JSON file with story scene data and character info
ckpt.pt Simulated trained nanoGPT checkpoint
vocab_stoi.json / vocab_itos.json Token index mapping for nanoGPT
static/img/ Visual assets (backgrounds, UI elements, etc.)

Project Introduction

Rewrite Fate is a speculative interactive fiction experience combining AI-generated storytelling, emotional analysis, and narrative intervention—based on Les Misérables. It asks: “What if we could intervene in a novel by warning its characters about what’s to come?”

Players are invited to write letters to characters such as Jean Valjean or Cosette, potentially changing the course of events in the story. After sending a letter, an AI system evaluates its emotional tone and predicts whether the character’s fate might shift. A continuation is then generated—an AI-written extension of the narrative—to simulate how events might unfold differently.

Core Features

Project Background & Research

The project explores whether AI can simulate moral imagination and emotional reasoning. By allowing users to write emotionally charged letters to literary characters, it examines how AI interprets human tone, predicts narrative outcomes, and reshapes fictional destiny.

Key theoretical foundations draw on AI ethics and narratology, including:

  1. Binns, R. (2018). Fairness in Machine Learning: Lessons from Political Philosophy. ACM FAT*.
  2. Gao, T., McCoy, J., & Riedl, M. (2018). Emotional Intelligence for Interactive Narrative Agents. AAAI.

System Architecture

The project integrates Flask for backend logic, PyTorch and Hugging Face Transformers for AI analysis and generation, and a web-based interface built with HTML, CSS, and JavaScript.

Interaction Flow

  1. User reads story context and original fate.
  2. Writes a letter to a character.
  3. Submits the letter for AI analysis.
  4. AI predicts emotional tone (DistilBERT).
  5. Fate Score + outcome message are displayed.
  6. nanoGPT generates the rewritten continuation.
  7. The player experiences an alternate ending.

Critical Reflection

While Rewrite Fate simulates emotional reasoning and narrative continuation, it exposes current AI limitations:

Ultimately, the project questions authorship, empathy, and control in the age of generative AI—inviting users to reflect on what it means when machines start rewriting human stories.

← Back to Home