This document explains the Multi-AI functionality in Grok Plays Pokémon, which allows you to use different AI models to control different aspects of gameplay.
Grok Plays Pokémon now supports two AI models:
- Grok - The original AI player
- Claude 3.7 Sonnet - A new AI model with different playing strategies
You can use these AIs in two different modes:
In Single AI Mode, one AI controls everything - both player movement during exploration and Pokémon actions during battles. This is similar to the original implementation, but now you can choose which AI you want to use.
- Select the AI you want in the Player AI dropdown
- Set mode to Single AI
- The Pokémon AI setting is ignored in this mode
In Dual AI Mode, two different AIs can control different aspects of the game:
- Player AI controls character movement, world exploration, and NPC interactions
- Pokémon AI takes over during battles to control Pokémon move selection and battle strategies
This mode is great for seeing how different AIs approach different aspects of gameplay. For example, Grok might excel at exploration while Claude might have better battle strategies, or vice versa!
- Open the web interface at
http://localhost:5000 - In the AI Selection section:
- Choose your preferred Player AI (Grok or Claude)
- Choose your preferred Pokémon AI (Grok or Claude)
- Select your mode (Single AI or Dual AI)
- Click Apply AI Settings
- Start the game with the Start Game button
You can also control the AIs via the command line using multi_ai_controller.py:
# Run with Grok as player AI and Claude as Pokémon AI in dual mode (default)
python multi_ai_controller.py
# Run with Claude for everything (single mode)
python multi_ai_controller.py --player claude --mode single
# Run with Grok for player movement and Grok for battles in dual mode
python multi_ai_controller.py --player grok --pokemon grok --mode dual
# Run for a specific number of steps with custom delay
python multi_ai_controller.py --steps 200 --delay 0.5The two AIs have different gameplay styles:
- More explorative and risk-taking
- Prefers direct, aggressive battle strategies
- Favors Squirtle as a starter Pokémon
- More methodical and strategic
- Considers type advantages during battles
- More likely to use items strategically
- Favors Bulbasaur as a starter Pokémon
The multi-AI functionality is implemented through:
- An AI controller framework (
ai_controller.py) - A command-line interface (
multi_ai_controller.py) - Backend API endpoints for AI settings
- Frontend UI for AI selection
The system detects whether the game is in battle mode and automatically switches between the appropriate AIs in dual mode.
This is an experimental feature! If you notice interesting differences between the AIs or have suggestions for improvements, please open an issue on the GitHub repository.