Spaces:
Configuration error
Configuration error
AI Game Web Viewer
Real-time web interface for monitoring AI agents playing Catan.
π Features
- Real-time updates - Refreshes every second
- Player logs - View each AI agent's thinking and responses
- Chat history - See all player communications
- Agent memories - Monitor what each AI remembers
- Session management - Track multiple game sessions
- Clean UI - Dark theme, easy navigation
π Quick Start
Automatic (Recommended)
start.bat
This will automatically open:
- AI Tester window
- Web Viewer at http://localhost:5000
- Game console
Manual
# Terminal 1: Start web viewer
python examples/ai_testing/web_viewer.py
# Terminal 2: Start AI tester
python examples/ai_testing/test_ai_live.py
# Terminal 3: Start game
python examples/ai_testing/play_with_prompts.py
Then open http://localhost:5000 in your browser.
π¦ Requirements
pip install flask markdown
π¨ Interface
Sidebar Navigation
- Players - Click to view individual AI agent logs
- Chat History - See all player messages
- Agent Memories - View saved notes
- Session Info - Current session details
Main Content Area
- Updates automatically every second
- Shows player logs in formatted markdown
- Chat messages with timestamps
- Agent memories organized by player
π How It Works
web_viewer.pyreads from the current session directory- Loads
chat_history.json,agent_memories.json, andplayer_*.mdfiles - Updates the web interface every second via AJAX
- No need to refresh - everything updates automatically
π Data Sources
All data is read from:
examples/ai_testing/my_games/ai_logs/session_YYYYMMDD_HHMMSS/
βββ player_a.md # AI logs
βββ player_b.md
βββ player_c.md
βββ chat_history.json # Chat messages
βββ agent_memories.json # AI memories
π― Tips
- Leave the viewer open while playing
- Switch between players to see different strategies
- Monitor chat for negotiations
- Check memories to understand AI planning