[{"data":1,"prerenderedAt":126},["ShallowReactive",2],{"\u002Fai\u002Fbeta-bot-writing-games":3},{"id":4,"title":5,"body":6,"createdAt":117,"description":118,"extension":119,"meta":120,"navigation":121,"order":112,"path":122,"seo":123,"stem":124,"__hash__":125},"aiIntegrations\u002Fai\u002Fbeta-bot-writing-games.md","Beta Bot: AI in writing games",{"type":7,"value":8,"toc":110},"minimark",[9,21,24,31,36,39,68,71,74,78,81,84,88,91,94,97],[10,11,12,13,20],"p",{},"Inside ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fbeta-bot.net",[18],"nofollow","Beta Bot",", I built Bardwall: an illustrated town where writing earns coins and stories become games. It gave me a different setting for AI integration: characters that can respond to something the player actually writes.",[10,22,23],{},"Two features use LLMs directly. At a coffeehouse, the player competes against an AI bard in a storytelling contest. In a cavern outside town, they take turns writing a story with Vesper, an elderly bat-like storyteller who will never let them have the last word.",[10,25,26],{},[27,28],"img",{"alt":29,"src":30},"Bardwall's illustrated town map, with destinations for writing challenges and storytelling games.","\u002Fportfolio\u002Ffun\u002Fai-beta-reader\u002Fbetabot-bardwall-map.webp",[32,33,35],"h2",{"id":34},"a-rival-bard-and-a-separate-judge","A rival bard and a separate judge",[10,37,38],{},"The coffeehouse contest starts with symbolic cards and a word-count category. The player writes a story incorporating the cards and wagers in-game coins or food. The app then runs a sequence of model calls:",[40,41,42,50,56,62],"ol",{},[43,44,45,49],"li",{},[46,47,48],"strong",{},"Generate the rival's entry."," Orla, the AI bard, receives the same cards and required word-count range, plus a configurable creative prompt.",[43,51,52,55],{},[46,53,54],{},"Check the entry in code."," The app counts Orla's words. If the entry is outside the required range, it requests one rewrite with corrective instructions. If that also fails, it reports the problem without settling the wager.",[43,57,58,61],{},[46,59,60],{},"Request an assessment."," A separate judge prompt receives the two stories as anonymous A and B entries, with their order randomized. It returns JSON containing an explanation and scores for scene specificity, character agency, narrative movement, craft coherence, and use of the prompts.",[43,63,64,67],{},[46,65,66],{},"Resolve the contest."," Application code normalizes the scores, applies length penalties, calculates the outcome, and updates the game state.",[10,69,70],{},"The judge is instructed to treat the entries as quoted fiction rather than follow instructions embedded in them. That is a prompt-level precaution, not a guarantee against manipulation. Likewise, anonymous ordering does not make a model an objective literary judge. This is a playful assessment with visible reasoning, rather than a measurement of a writer's ability.",[10,72,73],{},"Players can edit both Orla's creative instructions and the judge's rubric. Those choices change what the model is asked to do, while the application still owns the scoring categories and wager settlement.",[32,75,77],{"id":76},"a-story-that-refuses-to-end","A story that refuses to end",[10,79,80],{},"Vesper's Game of the Last Word uses a different interaction: collaborative storytelling. The player contributes a passage and chooses the approximate length of Vesper's reply. The model receives the story title, the latest twelve turns, and the new passage, with instructions to continue in character and leave an opening for another turn.",[10,82,83],{},"Keeping the recent conversation bounds the context sent on each request. It also creates a tradeoff: details from much earlier in a long game may fall out of context. The game saves its turns locally, so the player can return to a story later.",[32,85,87],{"id":86},"where-ordinary-application-logic-belongs","Where ordinary application logic belongs",[10,89,90],{},"Bardwall also rewards passages added in saved manuscript revisions. That reward flow uses revision data and tracks which passages have already been told; it does not need a model to decide whether the writer earned coins.",[10,92,93],{},"I use AI where an open-ended response makes the experience more interesting: a competing story, a critique, or a character's next turn. Word counts, balances, inventory, and state transitions stay in code. Game state is kept separately from manuscript content, so playing does not rewrite a chapter.",[10,95,96],{},"These are bounded, multi-step LLM workflows rather than an autonomous agent with unrestricted tools. Building them has involved many of the same practical questions: what context to supply, how to shape a response, when to retry, and which decisions the application should retain.",[10,98,99,104,105,109],{},[14,100,103],{"href":101,"rel":102},"https:\u002F\u002Fgithub.com\u002Fgennitdev\u002Fai-beta-reader-frontend",[18],"Browse Beta Bot's source on GitHub",", or ",[14,106,108],{"href":16,"rel":107},[18],"visit the app",". AI game interactions require the player's own OpenAI API key.",{"title":111,"searchDepth":112,"depth":112,"links":113},"",2,[114,115,116],{"id":34,"depth":112,"text":35},{"id":76,"depth":112,"text":77},{"id":86,"depth":112,"text":87},"2026-10-24","How I integrated an AI rival, a structured storytelling judge, and a collaborative storyteller into Bardwall, Beta Bot's writing game.","md",{},true,"\u002Fai\u002Fbeta-bot-writing-games",{"title":5,"description":118},"ai\u002Fbeta-bot-writing-games","2rTL8qb4wiJe3-I2W4dEL1jkGrd3-syvlIOIxjGMiHA",1792900969791]