docs: complete documentation and add web monitoring dashboard

- Add comprehensive configuration guide (docs/configuration.md)
- Add development guide with setup instructions (docs/development.md)
- Add complete API reference documentation (docs/api_reference.md)
- Update README.md with new features and project structure
- Update TODO.md to reflect current implementation status
- Add web monitoring dashboard with FastAPI and WebSocket support
- Add tests for sync integration and web monitoring
- Update config example with monitoring settings

The MUD AI Player is now feature-complete with full documentation.
This commit is contained in:
truetype committed 2026-02-09 10:44:25 +01:00
1 parent 69ba824bc8
commit b9f21c7199
14 files changed
+2658 -160

No files matched your search

+82 -42
View File
@@ -1,27 +1,32 @@
# MUD AI Player
# MUD AI Player
An autonomous AI player for MUD (Multi-User Dungeon) text-based games.
## Features
- 🤖 **Autonomous Gameplay**: Simulates a human player from character creation to endgame
- 🗺️ **Auto-Mapping**: Builds a complete map of the MUD world with hybrid storage (SQLite + Memvid)
- ⚔️ **Combat AI**: Intelligent combat decisions, target selection, and survival tactics
- 📜 **Quest System**: Automatically detects, plans, and completes quests
- 🔍 **Semantic Search**: Find locations using natural language queries
- 📊 **Progression Optimizer**: Finds optimal grinding spots and equipment upgrades
- 🧠 **LLM Integration**: Context-aware responses to players using local LLMs (Ollama)
- 🌐 **Web Dashboard**: Real-time monitoring dashboard with WebSocket updates
- 👤 **Human Behavior**: Simulates realistic reaction times and behavior patterns
An autonomous AI player for MUD (Multi-User Dungeon) text-based games.
## Features
- 🤖 **Autonomous Gameplay**: Simulates a human player from character creation to endgame
- 🗺️ **Auto-Mapping**: Builds a complete map of the MUD world with hybrid storage (SQLite + Memvid)
- ⚔️ **Combat AI**: Intelligent combat decisions, target selection, and survival tactics
- 📜 **Quest System**: Automatically detects, plans, and completes quests
- 🔍 **Semantic Search**: Find locations using natural language queries
- 📊 **Progression Optimizer**: Finds optimal grinding spots and equipment upgrades
## Architecture
The application is built with a modular architecture:
- **Core**: Telnet client, ANSI parser, text parser, game state
- **Modules**:
- Character Creator: Stats rolling, class/race selection
- Auto-Mapper: World mapping with hybrid storage (SQLite + Memvid)
- Decision Engine: AI decision-making, combat AI, goal management
- Quest System: Quest detection, planning, execution
- Progression Optimizer: Grinding optimization, equipment analysis
## Architecture
The application is built with a modular architecture:
- **Core**: Telnet client, ANSI parser, text parser, game state
- **Modules**:
- Character Creator: Stats rolling, class/race selection
- Auto-Mapper: World mapping with hybrid storage (SQLite + Memvid)
- Decision Engine: AI decision-making, combat AI, goal management
- Quest System: Quest detection, planning, execution
- Progression Optimizer: Grinding optimization, equipment analysis
- LLM Integration: Ollama/OpenAI-compatible LLM client with memory
- Web Dashboard: FastAPI-based monitoring with WebSocket support
## Installation
@@ -81,25 +86,60 @@ pytest tests/ -v
pytest --cov=src --cov-report=html
```
## Project Structure
```
mud-ai-player/
├── src/ # Source code
│ ├── core/ # Core components
│ ├── modules/ # Specialized modules
│ ├── utils/ # Utilities
│ └── config/ # Configuration management
├── data/ # Persistent storage
│ ├── maps/ # World maps (SQLite + Memvid)
│ ├── characters/ # Character saves
│ └── logs/ # Game logs
├── tests/ # Test suite
├── docs/ # Documentation
└── examples/ # Example configurations
```
## Development
## Project Structure
```
mud-ai-player/
├── src/ # Source code (~7,500 lines)
│ ├── core/ # Core components
│ │ ├── telnet_client.py # Async telnet connection
│ │ ├── game_state.py # Game state management
│ │ ├── ansi_parser.py # ANSI color code parsing
│ │ └── parsers/ # MUD-specific parsers
│ ├── modules/ # Specialized modules
│ │ ├── mapper/ # World mapping (SQLite + Memvid)
│ │ ├── decision/ # AI decision engine
│ │ ├── llm/ # LLM integration
│ │ ├── character/ # Character creation
│ │ ├── quest/ # Quest management
│ │ ├── progression/ # Grinding optimizer
│ │ └── web/ # Monitoring dashboard
│ ├── utils/ # Utilities
│ └── config/ # Configuration management
├── data/ # Persistent storage
│ ├── maps/ # World maps (SQLite + Memvid)
│ ├── characters/ # Character saves
│ └── logs/ # Game logs
├── tests/ # Test suite (17 files, ~2,500 lines)
├── docs/ # Documentation
│ ├── architecture.md # System architecture
│ ├── configuration.md # Configuration guide
│ ├── development.md # Development guide
│ └── api_reference.md # API reference
```
## Web Dashboard
The AI player includes a real-time web dashboard for monitoring:
```yaml
monitoring:
enabled: true
host: "127.0.0.1"
port: 8080
```
Access the dashboard at `http://127.0.0.1:8080`
**Features:**
- Real-time character vitals (HP/MP/SP)
- Current room information with NPCs and items
- Active goals and AI state
- Map statistics (rooms discovered, exits mapped)
- Event log with game events
- WebSocket updates (no page refresh needed)
## Development
```bash
# Format code