Reversi42
Tournament-grade Reversi with AI-powered opponents
50-100x faster • 11 AI players • 644 opening sequences • Modern web interface
🚀 Quick Start
pip install reversi42
reversi42
Open http://localhost:8000 in your browser and start playing!
✨ Features
🎯 High-Performance Engine
- Bitboard architecture - 50-100x faster than traditional implementations
- Advanced AI algorithms - Alpha-beta pruning, transposition tables, parallel search
- Configurable depth - From beginner (3 ply) to expert (16 ply)
- Temperature-based variety - Probabilistic move selection for more diverse gameplay
🤖 11 AI Opponents
- ELO ratings: 1250-1880 (beginner to expert)
- Unique strategies: Adaptive, defensive, aggressive, tactical, chaotic
- YAML-based configuration - Create custom AI players without coding
- Move variety - Lower-level players use temperature-based selection for more varied gameplay
📚 Professional Opening Book
- 644 tournament sequences - Derived from professional play
- Trie-based lookup - Instant move suggestions
- Multiple evaluation modes - Balanced and tactical openings
🌐 Modern Web Interface
- Real-time gameplay - FastAPI + WebSocket for instant updates
- Game management - Save/load games in XOT format
- Live analysis - Move evaluation and position visualization
🏆 Tournament System
- Automated competitions - Benchmark AI players
- Statistical analysis - Comprehensive performance metrics
- Custom configurations - Flexible tournament setups
🎮 AI Players
| Player | ELO | Strategy | Depth | Style |
|---|---|---|---|---|
| DIVZERO.EXE | 1880 | Adaptive | 8/12/16 | Maximum strength, parallel processing |
| The Oracle | 1850 | Endgame Focus | 7/9/14 | Endgame specialist, parity evaluation |
| Apocalyptron | 1850 | Balanced | Adaptive | Strong balanced AI |
| Fortress Eternal | 1800 | Defensive | 10 | Defensive specialist |
| The Executioner | 1770 | Aggressive | 9 | Aggressive, mobility-focused |
| The Strangler | 1750 | Mobility Control | 11 | Restricts opponent mobility |
| Corner Reaper | 1720 | Positional | 8 | Corner control specialist |
| Glitch Lord | 1500±200 | Chaotic | Variable | Unpredictable, randomized |
| Lightning Strike | 1400 | Speed | 4 | Fast-playing |
| Blitz Demon | 1350 | Rapid Fire | 5 | Ultra-fast |
| Zen Master | 1250 | Balanced | 3 | Beginner-friendly |
📖 View detailed player profiles →
📦 Installation
From PyPI
pip install reversi42
From Source
git clone https://github.com/lookee/Reversi42.git
cd Reversi42
pip install -e .
Requirements: Python 3.9+
🎨 Custom AI Players
Create your own AI opponents using YAML configuration files—no programming required!
cp config/players/00_AI_CONFIG_TEMPLATE.yaml config/players/enabled/my_ai.yaml
# Edit the configuration file
reversi42 # Your player is automatically discovered!
Move Variety (Temperature): Control how deterministic your AI plays:
temperature: 0.0- Always plays the best move (deterministic)temperature: 0.1-0.3- Mostly best moves, occasional varietytemperature: 0.4-0.5- High variety for more unpredictable gameplay- Auto-calculated based on depth (lower depth = higher temperature)
📊 Performance
- Speed: 50-100x faster than array-based implementations
- Search Depth: 4-16 ply (configurable)
- Parallel Processing: Multi-core support
- Memory: Optimized data structures
📖 Documentation
- User Guide - Getting started, rules, strategies
- API Reference - Complete API documentation
- Architecture - System design and technical details
- Tutorials - Create custom AI players
- Tournament Guide - Tournament system usage
🧪 Testing
# Run test suite
./scripts/run_tests.sh
# With coverage
pytest --cov=src tests/
572+ tests covering unit, integration, and characterization scenarios.
Test Coverage by Module
- Apocalyptron AI Engine: 800+ tests (evaluation, ordering, pruning, cache, search, observers)
- Board Module: 34 tests (BoardModel, BoardControl, ViewFactory)
- Players Module: 60+ tests (PlayerFactory, PlayerHuman, PlayerApocalyptron, config system)
- Core Module: 34 tests (config, game_config)
- Infrastructure: 10 tests (persistence/game_io)
- Integration Tests: 50+ tests (board integrity, player isolation, book instant mode)
- Bitboard Tests: Comprehensive move generation tests
- WebGUI Tests: Backend server, WebSocket observer, E2E tests
📈 Project Stats
- ~17,000 lines of Python code
- 572+ tests with comprehensive coverage (target: 80%+)
- 44 test files organized by module
- 40+ documentation files
- 11 AI players pre-configured
- 644 opening sequences from professional play
📄 License
GNU General Public License v3.0 or later
See LICENSE for details.
👤 Author
Luca Amore
🌐 www.lucaamore.com
📧 luca.amore@gmail.com
🙏 Acknowledgments
- Donato Barnaba and Federazione Italiana Gioco Othello (FNGO) - Reversi expertise
- PointyStone3 Project - Opening book contributions
Reversi42 - Professional-grade Reversi for players and researchers
GitHub •
PyPI •
Issues
Metadata
Release files for reversi42 7.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reversi42-7.0.13.tar.gz | 40.1 MB | Without provenance | Details for reversi42-7.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reversi42-7.0.13-py3-none-any.whl | Python 3 | none | any | Details for reversi42-7.0.13-py3-none-any.whl |
Total release size: 40.4 MB
Release files / reversi42-7.0.13.tar.gz
| Download URL | reversi42-7.0.13.tar.gz |
|---|---|
| Size | 40.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be75d107f08d856aa738d3cd7d8c4a562c194339019326a55d329b8f4c453c48
|
|
BLAKE2b-256 checksum How to use checksums |
84124950f8f38178c7efa79b099357e847aa740c786e84140dd08e9f9780370e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / reversi42-7.0.13-py3-none-any.whl
| Download URL | reversi42-7.0.13-py3-none-any.whl |
|---|---|
| Size | 337.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0368dab19fb20dc8b778e9db01efd1509994bfdc528de5a47b9090fdc40347c9
|
|
BLAKE2b-256 checksum How to use checksums |
2aa1017b34f83f7ae3f3b168f592056d3ee976cfd72e8959db29350e41827eb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for reversi42 7.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.