Logic Quest
A Prolog Learning Adventure
Welcome to Logic Quest
Logic Quest is an immersive 80s cyberpunk terminal game that teaches Prolog and logic programming through interactive storytelling and hands-on puzzles.
🎮 Key Features
- Adaptive Difficulty System: Four complexity levels (Beginner, Intermediate, Advanced, Expert) that dynamically adjust puzzle parameters, hint availability, and scoring multipliers
- Complexity-Aware Learning: Automatic puzzle adaptation based on your skill level with type-specific modifications for different Prolog concepts
- Memory Stack Debugging: First adventure puzzle teaching system debugging through Prolog queries and stack trace analysis
- Comprehensive Error Handling: Advanced progressive hint system with 5 escalating help levels, specific error messages for common Prolog mistakes, and encouraging tone throughout
- Hello World Tutorial: Complete step-by-step tutorial with interactive exercises, progress tracking, and educational content delivery
- Recovery Mechanisms: Multiple help options for stuck users including alternative explanations, concept reviews, and adaptive support
- Full-Height Web Terminal: Experience authentic 80s computing in your browser with optimized layout that uses the entire viewport
- Progressive Learning: Master Prolog concepts step-by-step from facts to recursion with difficulty scaling
- Interactive Storytelling: Save Cyberdyne Systems’ AI while learning logic programming
- Real-time Validation: Get instant feedback on your Prolog syntax with intelligent error detection and helpful hints
- Modern Web Interface: Built with Reflex framework for responsive, cross-platform access with dynamic height calculations
- Educational Content Display: Centered explanation boxes with retro styling for clear presentation of learning materials
- Robust Terminal Rendering: Defensive programming with safe array bounds checking for stable display
- Optimized Performance: Lazy-loaded game components with efficient state management and improved terminal layout
🚀 Quick Start
# Install dependencies
uv sync
# Run the web application
reflex runOpen your browser to http://localhost:3000 to start your Prolog adventure!
🎯 Learning Objectives
Logic Quest teaches fundamental Prolog concepts through engaging gameplay:
- Facts: Learn to create statements of truth
- Queries: Ask questions and find answers
- Variables: Discover pattern matching and multiple solutions
- Rules: Define logical relationships and implications
- Unification: Master pattern matching and variable binding
- Backtracking: Explore alternative solutions systematically
- Recursion: Solve complex problems with elegant recursive solutions
🌆 The Story
You are a junior programmer at Cyberdyne Systems in 1985. The company’s AI research computer, LOGIC-1, has suffered a catastrophic logic failure. Racing against time, you must dive into the system’s memory banks and restore the logical pathways using pure Prolog reasoning.
Navigate through corrupted data structures, repair inference engines, and master the language of logic programming to prevent a complete AI meltdown.
🎨 Cyberpunk Aesthetic
- Authentic 80s terminal interface
- Multi-color neon scheme (green, cyan, yellow, red, white)
- ASCII art and retro typography
- Typewriter effects and glitch animations
- Immersive cyberpunk atmosphere
Ready to jack into the matrix of pure logic? Get started with your Prolog adventure!