1.8 KiB
1.8 KiB
AI Interactive Fiction
A modern take on classic text adventures that combines traditional world modeling with Large Language Models (LLMs) to create natural language interactive fiction experiences.
Project Overview
This application reimagines the classic text adventure game genre by replacing the traditional parser with an LLM. The system consists of:
-
World Model: A traditional game engine that manages rooms, objects, actions, and game state - similar to old-school Infocom games.
-
LLM Interface: An AI layer that processes natural language input from players and translates it into actions the game engine can understand.
-
Narrative Generation: The LLM converts the world state changes into rich, contextual prose for the player.
Key Features
- Natural Language Understanding: Players can express their intent in plain language without worrying about specific command syntax.
- Rich Narrative: Dynamic descriptions that adapt to the current game state and player history.
- Consistent World Model: The underlying game engine enforces world rules to prevent hallucinations or inconsistencies.
- Modular Design: Easily swap between different world models, including YAML-based custom worlds or integrations with classic Z-machine games.
How It Works
- Player enters natural language input
- LLM analyzes input and translates it into game actions
- Game engine processes valid actions and updates the game state
- LLM receives the state change information and generates narrative prose
- Player receives the beautifully written response
Technical Structure
- YAML-based world definition (rooms, objects, actions)
- OpenRouter API integration for accessing suitable LLMs
- Modular design allowing for Z-machine integration in the future
Getting Started
[Installation and running instructions will be added here]