| 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.) |
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.
DistilBERT model.nanoGPT model.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:
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.
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