π― Overview
This tool helps you build a chess opening repertoire by analyzing a database of games and using an engine (Stockfish) to suggest the best moves for your chosen side.
π Step 1: Load Database
- Load a PGN file - Upload a file with multiple games (e.g., from Mega Database, your own games, or downloaded from the web)
- OR Load a JSON database - If you've previously saved a processed database, you can load it directly
π¨ Step 2: Apply Filters (Optional but Recommended)
- Player Name - Enter a specific player's name (e.g., "Kamsky") to only use their games
- Player's Color - Choose if you want games where this player played White or Black
- Result - Filter by game outcome (wins, losses, draws)
- Enable Filter - Check this to apply the filters
Example: To build a repertoire for Kamsky as White, set Player="Kamsky", Color="White", Result="Any"
π¨ Step 3: Build Database
Click "Build Database" - this creates a statistical database from the PGN file. The result is a JSON-like structure in memory containing:
- All unique positions (by FEN)
- For each position, all moves played and how many times
- Move percentages based on frequency
πΎ Save Database - You can save this database as a JSON file for later use (saves processing time next time)
βοΈ Step 4: Configure Repertoire Settings
- Training Side - Choose which color YOU will play (White or Black)
- Min. Reach Probability - Stop expanding lines that fall below this percentage (e.g., 1% means stop if a line has less than 1% chance of occurring)
- Top N Gegner-ZΓΌge - Number of opponent moves to consider at each position (e.g., top 3 most frequent moves)
- Min. Gegner-Zug % - Only consider opponent moves that appear at least this percentage of the time
- Engine Depth - How deep Stockfish analyzes (higher = stronger but slower)
- Max. Plies - Maximum depth of the repertoire tree (1 ply = half move)
- Starting Position - Choose where to start:
- Initial position - Start from move 1
- After move sequence - Enter moves like "e4 e5 d4 exd4"
- From FEN - Paste a specific FEN position
π Step 5: Generate Repertoire
Click "Generate Repertoire Tree" - this builds the actual repertoire:
- π© Green moves = Your moves (chosen by the engine)
- π¨ Yellow moves = Opponent moves (from the database statistics)
- π΄ Red gaps = Coverage gaps (opponent moves not covered by your repertoire)
- Percentages show how likely each position is to occur
π Understanding the Output
- Tree View - Visual representation of the repertoire tree
- PGN Export - Complete repertoire as PGN with lines and probabilities
- Stats - Shows nodes, complete lines, coverage percentage, and gaps
π What do the parameters mean?
- Top N Gegner-ZΓΌge - At each opponent position, only include the N most frequent moves from your database. Example: If opponents play 10 different moves but you set N=3, you'll only prepare against the top 3.
- Min. Gegner-Zug % - Filter out rare moves. Example: Set to 5% to ignore moves played less than 5% of the time.
- Min. Reach Probability - Stops building lines that become too rare. Example: 1% means if a line has less than 1% chance of occurring, stop expanding it.
π Note: The database stores positions and move frequencies. When generating the repertoire, YOUR moves are chosen by Stockfish (the engine) to be the best responses, while OPPONENT moves are based on what people actually played in your database.
π‘ Tips
- Start with a small database (e.g., 100 games) to test settings
- Save your database as JSON to avoid reprocessing large PGN files
- For a complete repertoire, use multiple databases (e.g., games from different players)
- Export PGN to study and learn and train the repertoire in the opening-repertoire-trainer or in your favorite chess software