Can #AI Play Text Adventure Games? Turns out AI does perfectly well at playing text adventures. I hooked Google Gemini 2.5 into the famous #Inform text adventure Curses, it became obsessed with fiddling around with the torch, got a game over twice for trying to take the gloves from the potting room, then got fed up and quit. Entirely too relatable. But that was boring, and I really wanted a blog post out of this idea! stuff.interfree.ca/2025/05/11/textadventure.html
@fastfinge I got CoPilot to write a text adventure out of the transit system. It added extra stops, skipped a few and completely removed the North south service. It was pretty cool. Lol!
@fastfinge I'm genuinely unclear why, upon being given an end of game choice, it transitioned to making up not only its own game but its own player actions narrative too. Which I think proves how little I'd be willing to trust this tech with anything involving automation or user input.
@jscholes I assume because the gameplay transcripts continued in that way after restart. If I was writing professional code, rather than slapping together a quick script for a blog entry, I could have solved this with Stop sequences: a way to tell the API to prevent the model from generating anything more when the Stop sequence is generated. For this application I could have used newline as the Stop sequence and it probably would have worked. I mean effectively that's what I did, by only passing line 1 to the interpreter anyway. But that would have been less interesting; the AI would have just died and restarted a couple times, then quit. Another technique is to give the AI JSON, and require valid JSON as output. If you don't get correctly formed JSON, you know the AI has gone off the rails and can make it retry.