A Pokemon battle strategy TUI application with MCTS-based decision making, built with Textual.

- Monte Carlo Tree Search (MCTS): Advanced AI decision making for Pokemon battles
- Textual TUI: Beautiful terminal user interface built with Textual
- Real-time Battle Analysis: Live analysis of battle states and optimal moves
- Pokemon Showdown Integration: Connect to Pokemon Showdown servers
- Comprehensive Battle State Management: Full Pokemon battle state tracking
pip install baton-passgit clone https://github.com/yourusername/baton-pass.git
cd baton-pass/src
pip install -e .# Start the application
baton-pass# Install with development dependencies
pip install -e .[dev]
# Run setup for development environment
baton-pass-setup-devThe main application provides a TUI interface for Pokemon battle strategy analysis:
from baton_pass.app import start
# Start the application
start()The MCTS component provides AI-powered decision making:
from baton_pass.mcts_component import MctsSearchComponent
# Create MCTS search component
mcts = MctsSearchComponent()Manage Pokemon battle states:
from baton_pass.battle import BattleState
from poke_engine import State
# Create a battle state
state = State()
battle = BattleState(state)# Run all tests
pytest
# Run with coverage
pytest --cov=baton_pass
# Run specific test categories
pytest -m "asyncio"
pytest -m "integration"# Install pre-commit hooks
pre-commit install
# Run pre-commit on all files
pre-commit run --all-filesbaton_pass/
├── app.py # Main application entry point
├── battle.py # Battle state management
├── mcts_component.py # MCTS search implementation
├── web_interface.py # Web interface components
├── constants.py # Application constants
├── config.toml # Configuration file
├── ui/ # UI components
├── scripts/ # Utility scripts
└── tests/ # Test suite
- textual: Terminal UI framework
- poke_engine: Pokemon battle engine
- websockets: WebSocket communication
- aiohttp: Async HTTP client
- rich: Rich text and formatting
- toml: Configuration file parsing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Pokemon Showdown for the battle protocol
- Textual for the excellent TUI framework
- The Pokemon community for inspiration and feedback
- Issues: GitHub Issues
- Documentation: GitHub README
- Discussions: GitHub Discussions