AIChessGM User Guide

Version: 0.2.72
Last Updated: March 2026


Table of Contents

  1. Introduction
  2. System Requirements
  3. Getting Started
  4. Database Management
  5. Game Operations
  6. Playing Against the Engine
  7. Engine vs Engine
  8. Engine Analysis
  9. Board Video Export
  10. Features and Motifs
  11. Named Layouts
  12. Piece Path Visualization (Game Flow Mode)
  13. Opening Books
  14. Repertoire Builder Pane
  15. Repertoire Scan and Split Workflows
  16. Training Mode
  17. AI Chat Assistant
  18. Rules Platform and Auto-Load Automation
  19. Workspace Customization
  20. Appearance Settings
  21. Keyboard Shortcuts Reference
  22. Menu Organization
  23. Position Setup Mode
  24. Captured Pieces Strip
  25. Right Panel Sizing
  26. Default Folders and Generated Files
  27. Tips and Best Practices
  28. Troubleshooting
  29. Additional Resources
  30. Screenshots
  31. About AIChessGM

Introduction

AIChessGM is a comprehensive chess database and analysis application for macOS, designed for chess players who want to study games, analyze positions, build opening repertoires, and improve their skills through structured training.

Key Features

Who AIChessGM Is For

Workflow Overview

5-Minute Quick Start

  1. Install and configure a UCI engine (Stockfish recommended).
  2. Import a PGN into a working database.
  3. Run Analysis → Start Engine Analysis for live position evaluation.
  4. Save your game/database changes.
  5. Build or open a repertoire tree and start training from it.

Architecture Overview (High Level)

AIChessGM combines a native Swift application layer, SQLite-backed storage, external UCI engines, optional AI services, and a Documents-based workspace on disk.

SwiftUI App (Swift 6)
  -> AppState + ViewModels + Services
  -> SQLite-backed game storage (.cgmdb)
  -> UCI engine processes (Stockfish/lc0/etc.)
  -> Optional AI provider integration (chat, annotations, vision)
  -> Filesystem workspace (~/Documents/AIChessGM)

System Requirements

Minimum Requirements

Optional Components

Supported File Formats


Getting Started

If you’re new to AIChessGM, these are the quickest high-value setup steps.

1) Set up your MyGames database - Use Database → MyGames → Create Default MyGames to create the default personal database. - If you already opened a database you want to treat as your personal library, choose Database → MyGames → Set Current Database as MyGames. - Open it anytime via Database → MyGames → Open MyGames. - When no database is active, Game → Add to Database… and Game → Paste PGN and Add to MyGames automatically target MyGames.

2) Configure a UCI engine (Stockfish recommended) - Open Engines → Engines Manager… (⇧⌘,) - Click Add Engine, then select the UCI engine executable (example: Stockfish). - Optional tuning: Threads, Hash Size, and MultiPV for analysis depth.

Quick Install: Stockfish (Built-In Helper)

AIChessGM now includes a built-in Stockfish install helper in the Browser pane.

  1. Open the Sites pane and click Stockfish (included by default in new installs and auto-added for existing users).
  2. In the Browser pane toolbar, open the Stockfish menu.
  3. Click Download + Auto-Configure.
  4. AIChessGM will:
  5. If auto-detection cannot find the executable, AIChessGM opens a manual fallback picker:

You can also use these manual helper actions from the same Stockfish menu: - Download Apple Silicon Build (download only) - Use Downloaded Stockfish… (manual select/configure) - Open Engine Settings… (jump directly to engine configuration)

System Privacy and Security (macOS)

Because chess engines are standalone executables, macOS may block them the first time you run them. This is normal for unsigned or newly downloaded apps.

If macOS blocks the engine:

  1. In Finder, Control-click the stockfish executable and choose Open, then click Open in the confirmation dialog.
  2. Or go to System Settings → Privacy & Security, find the security warning about the blocked app, and click Open Anyway.
  3. After you allow it once, return to Engines → Engines Manager… and re-select the engine if needed.

Only override these warnings for engines you trust, and only from sources you recognize.

3) Set up AI assistant access (optional) - Open Settings… → AI. - Choose a provider and paste your API key. - If a key is missing, the AI chat pane will prompt you to configure one.

4) Open or create a working database - File → New Database… (⌘N) or Database → New Database… (⇧⌘N) to create a new collection. - File → Open… (⌘O) to open an existing database or PGN. - For large PGNs, AIChessGM can convert to .cgmdb for faster browsing.

5) Add opening books (optional) - Load .bin, .ctg, or .otb files when you want book-assisted play and opening prep.

Note: AIChessGM requires at least one database to be active. MyGames is a good default if you’re unsure.


Database Management

Databases are the foundation of AIChessGM, storing your game collections, analysis, and annotations.

Creating a Database

Method 1: File Menu - Go to File → New Database… (⌘N) - Enter a name and optional description - Choose a save location

Method 2: Database Menu - Go to Database → New Database… (⇧⌘N)

Validation: Database names cannot contain: / \ : * ? " < > | Canonical location: Use File → New Database… as the primary entry point. Database → New Database… is an alternate path to the same action.

Opening an Existing Database

You can open databases and chess files in a few ways:

Supported items include:

Tip (large PGNs): When opening a large .pgn (roughly > 20 MB), AIChessGM may offer to convert it to a .cgmdb database for faster opening and browsing.

Importing Games

From PGN Files:

  1. File → Import… (⌘I) or Database → Import PGN File… (⌘I)
  2. Select one or more PGN files
  3. Choose deduplication options (optional)
  4. Monitor the import progress

Tip: For large PGN files (100,000+ games), the import may take several minutes. You can continue using the application during import. Canonical location: Use File → Import… for standard file imports. Database → Import PGN File… is provided for database-centric workflows.

Searching Games

Quick Search: - Database → Search Games… (⇧⌘F) - Enter a search query (player names, openings, ECO codes)

Position Search: - Database → Find Position - Searches for games containing the current board position

Database Browser: - Database → Open Database Browser (⌘D) - Browse all games in the active database - Filter by player, opening, date, result, etc.

Exporting Data

Export Single Game: - File → Export… (⌘E) - Choose PGN, FEN, or JSON format - Select destination (file or clipboard)

Export Entire Database: - Database → Export Database… (⇧⌘E) - Exports all games to a single PGN file

ECO Codes

ECO (Encyclopedia of Chess Openings) codes identify chess openings.

Add ECO Codes Automatically: - Database → Add Missing ECO Codes… - Scans games and adds ECO codes based on opening moves - Option to overwrite existing codes


Game Operations

Creating a New Game

Warning: If the current game has unsaved changes, you’ll be prompted to save first.

Making Moves

Click and Drag: 1. Click on a piece 2. Drag to the destination square 3. Release to complete the move

Click to Select: 1. Click on a piece (it highlights) 2. Click on the destination square

Promotions: - When promoting a pawn, a dialog appears to select the piece (Queen, Rook, Bishop, Knight)

Move Validation: - Only legal moves are allowed - Illegal moves are rejected with visual feedback - The engine automatically handles castling and en passant

Keyboard Shortcuts: - First Move: ↑ (Up Arrow) or ⌘↑ - Previous Move: ← (Left Arrow) or ⌘← - Next Move: → (Right Arrow) or ⌘→ - Last Move: ↓ (Down Arrow) or ⌘↓

Menu Options: - Game → First Move - Game → Previous Move - Game → Next Move - Game → Last Move

Undo/Redo: - Undo Move: ⌘Z or Edit → Undo Move - Redo Move: ⇧⌘Z or Edit → Redo Move

Editing Game Information

Edit Headers: - Game → Edit Header… - Modify player names, event, site, date, round, result, ratings, etc.

Save Game: - Save Game: ⌘S or Game → Save - Save Game As…: ⇧⌘S

Board Orientation

Flip Board: - Game → Flip Board (⌘F) - Toggles between White’s perspective (bottom) and Black’s perspective

Position Setup

Set Up a Position: - Edit → Set Up Position… - Allows custom position setup (useful for puzzles and exercises)

Copy/Paste FEN: - Copy Position (FEN): ⇧⌘C (Game → Copy Position (FEN)) - Paste Position (FEN): ⇧⌘V (Game → Paste Position (FEN))

Use Case: Copy a position to share or analyze elsewhere, or paste a FEN from a puzzle site.

Printing


Playing Against the Engine

AIChessGM can run a timed game against a UCI engine using your current board UI, with an in-game clock overlay and optional opening book support.

Starting a Game vs Engine

  1. Open Game → Play vs Engine… (⌥⌘P).
  2. Choose an engine (configure one first in Engines → Engines Manager…).
  3. Optional settings:

Opening Books in Engine Games

The setup dialog includes an Opening Books section:

During the Game

When a game is active you’ll see a compact overlay with:

When the game ends (checkmate, stalemate, time, repetition, etc.), you can:

Ending an Engine Game


Engine vs Engine

AIChessGM can run two UCI engines against each other with independent strength, book, and time-control settings. This is useful for testing engine options, comparing books, and generating training games.

Starting an Engine vs Engine Match

  1. Open Game → Play Engine vs Engine… (⌥⌘E).
  2. Select a White Engine and Black Engine (configure engines first in Engines → Engines Manager…).
  3. Configure per-engine options:
  4. Configure Time Control:
  5. (Optional) Use current scratch position to start from the current board position.
  6. Game Options:

During the Match

The Engine vs Engine pane shows engine names, clocks, and game status. Controls include: - Pause/Resume - Stop - Declare Draw - Save to Database (available after the game ends)

Ending and Saving


Engine Analysis

Chess engines provide computer-assisted analysis, evaluating positions and suggesting the best moves.

Setting Up Engines

  1. Open Engines Manager: Engines → Engines Manager… (⇧⌘,)
  2. Add a UCI Engine:
  3. Configure Engine Settings:

Recommended Engines: Stockfish (free, very strong), Leela Chess Zero (neural network-based)

Starting and Stopping Analysis

Start Analysis: - Analysis → Start Engine Analysis (⌘A) - The engine begins evaluating the current position

Stop Analysis: - Analysis → Stop Engine Analysis (⇧⌘A)

Viewing Analysis

Analysis Pane: - Analysis → Toggle Analysis Pane (⌘1) - Displays: - Evaluation score (in pawns or centipawns) - Search depth - Nodes searched - Principal variation (best line of play) - Multiple PV lines (if MultiPV is enabled)

Engine Console: - Analysis → Show Engine Console (⌘2) - Shows raw engine output (for debugging)

Reading Analysis Output

Evaluation: - +2.5: White is better by approximately 2.5 pawns - -1.2: Black is better by approximately 1.2 pawns - M5: Mate in 5 moves - 0.0: Equal position

Depth: - How many moves ahead the engine has searched - Higher depth = more accurate but slower

Principal Variation (PV): - The best sequence of moves according to the engine - Click on moves to explore the line

Best Move Arrows

When enabled, arrows on the board indicate the engine’s recommended moves.

Diagram Puzzle Engine Preference

For tactical PDF diagram puzzles, you can prefer Stockfish over Lc0:

  1. Open the Analysis pane and click Settings.
  2. Enable Prefer Stockfish for PDF Diagram Puzzles.

Behavior:


Board Video Export

AIChessGM can turn board play into a narrated video suitable for sharing, review, or posting.

Open it from:

Use Cases

Export Modes

Batch Export (Loaded Game)

  1. Open a game in the board pane.
  2. Start Game → Save Video….
  3. Configure the output settings in the sheet.
  4. Click Export.

AIChessGM renders each move frame, generates narration for selected content, and writes the final video.

Real-Time Session Export

Configuration

AIChessGM uses NSSpeechSynthesizer for reliable file-based text-to-speech on macOS.

Video Defaults in Settings

Use Settings → Video to control defaults used by Game → Save Video…:

Supported Output and Location

Performance Notes


Features and Motifs

AIChessGM can compute and store position features, move features, and higher-level motifs (recognizable strategic/tactical patterns) for a game. These are visualized in the Features Pane, and the selected motif can be explored in depth in the Motif Pane.

Running Feature Analysis

Feature analysis is separate from standard engine analysis. It’s designed to produce durable annotations you can browse later.

What You See in the Features Pane

For a game that has feature data, the Features pane typically includes:

If you select a motif in the Features pane, AIChessGM stores the selection and the Motif Pane shows rich details for that motif.

Motif Detail Pane

The Motif pane can show:

Finding Motifs Associated with Mistakes

Use this flow to identify motifs that are strongly linked to your errors:

  1. Run Analysis → Analyze Games… and keep Include feature analysis enabled.
  2. Open an analyzed game, then select a motif in the Features pane.
  3. In the Motif pane, review Player Error Correlation:
  4. Use motifs with high error share/rate as targets for training.

Filtering Your Database by Motifs

In the Database pane, you can filter games by motifs (games without analyzed features will not match):

  1. Open a database in the Database pane.
  2. Click Motifs (filter button near the database path).
  3. Select one or more motifs and choose a scope (all games vs current filter).

Batch Feature Analysis

You can analyze features for many games at once:


Named Layouts

Named Layouts allow you to save different workspace configurations and switch between them instantly. This is useful when you want different setups for different tasks—analysis-focused, database browsing, training, or any custom arrangement.

What a Layout Saves

Each named layout preserves: - Pane positions: Which panes are where in the dockable workspace - Pane sizes: Column widths, bottom row height, and vertical splits - Pane order: The sequence of panes in each column and row - Window size: The main window dimensions (optional) - Tab groups: Any pane groupings you created

Saving a Layout

  1. Arrange your workspace panes exactly as you want them
  2. Go to Window → Save Layout…
  3. Enter a descriptive name (e.g., “Analysis Focus”, “Database Only”, “Training Setup”)
  4. Click Save

The layout is saved to your user preferences and persists across app launches.

Loading a Layout

Quick Load: - Window → Load Layout and select from your saved layouts - You can also use the submenu to quickly access frequently used layouts

Auto-Load on Startup: You can configure a layout to load automatically when AIChessGM starts: 1. Go to Window → Load Layout → Auto-load on Startup 2. Select your preferred layout (or “None” to disable) 3. The selected layout will be applied every time you open the app

Managing Layouts

Practical Layout Ideas

Analysis Setup - Board (left), Analysis (center), Engine Output (right top), PGN (right bottom) - Good for deep position analysis with engine feedback

Database Research - Board (left), Database (center), Game List (right), Filters (bottom) - Optimized for browsing and searching through games

Training Focus - Board (left), Training (center), Notes (bottom) - Minimal layout with just the essentials for practice

Opening Preparation - Board (left), Repertoire Builder (center), Book Moves (right), ECO Browser (bottom) - Maximum opening-related tools in one view

Resetting to Default

If you want to restore the original layout: - Window → Reset Layout (⌥⌘R) - This restores the bundled default layout


Piece Path Visualization (Game Flow Mode)

Game Flow Mode is a powerful visual analysis tool that helps you understand how Grandmasters maneuver their pieces during a game. By displaying the complete journey of each piece from a starting position, you can quickly grasp strategic plans and piece coordination patterns.

What Game Flow Mode Shows

When enabled, Game Flow Mode tracks and displays:

Each piece is color-coded by its original color (white or black), making it easy to track both sides’ plans simultaneously.

Enabling Game Flow Mode

  1. Navigate to a position in any game where you want to visualize piece plans
  2. Click the Game Flow button (map icon) in the toolbar under the board
  3. The button turns orange when Game Flow Mode is active
  4. A Game Flow Mode badge appears on the board while the mode is enabled

Game Flow Mode captures the current position as the starting point when you enable it. If you click a move in the Game pane while Game Flow is active, it stays in Game Flow mode and re-anchors from that new current position. Selected pieces are preserved by exact identity across position changes (for example, one specific knight stays selected, not both), and only drop out if that piece is captured. As you navigate through the game using the move navigation buttons or keyboard shortcuts, the visualization updates to show all piece movements from that captured position.

Show Variations as Game Flow

ShowVariationsAsPlan (shown in the UI as Show Variations as Game Flow) lets you preview a variation line with the same chip-and-path visualization used by Game Flow Mode, without turning Game Flow Mode on.

When enabled:

Typical use:

  1. Navigate to a position that has one or more variations
  2. Turn on Show Variations as Game Flow
  3. Keep Game Flow Mode off
  4. Select or step through the variation and inspect the overlayed plan paths

Important Squares Submode

Important Squares Submode lets you focus Game Flow on moves that interact with critical squares.

When enabled:

How to use:

  1. Open the Game Flow menu (map icon in the toolbar)
  2. Turn on Important Squares Submode
  3. (Optional) Turn on Show Important Squares to highlight marked squares
  4. Right-click squares on the board to mark/unmark them
  5. Use Clear Important Squares in the Game Flow menu to reset all marks

Notes:

Using Game Flow Mode Effectively

Selecting Individual Pieces

You can click on any piece’s starting square to toggle its path display. This is useful when: - You want to focus on a specific piece’s journey (e.g., “How did this knight reach that outpost?”) - The board becomes too cluttered with all paths visible - You’re analyzing how two specific pieces coordinate (e.g., bishop and knight pairing)

Navigating to Any Point in a Path

Click on any marker (circle or X) to jump directly to that position in the game. This allows: - Quick inspection of intermediate positions - Verification of tactics at capture points - Understanding the timing of strategic maneuvers

Clearing the Starting Position

To capture a new starting position: 1. Move the board to your desired starting position 2. Toggle Game Flow Mode off and on again

The capture happens automatically when you enable Game Flow Mode. While it is active, navigation in the Game pane re-anchors the flow from the new current position.

Practical Applications

Understanding Opening Plans

Start Game Flow Mode at move 10-15 and watch how: - Bishops develop to active squares - Knights find optimal outposts - The queen coordinates with minor pieces - Pawns create strategic structures

Analyzing Middlegame Restructuring

A strong mid-game plan often involves: - Knight relocations to better squares - Bishop pair activation after pawn moves - Rook penetration on open files - Queen centralization

Game Flow Mode makes these patterns visually obvious.

Studying Endgame Technique

Endgame studies become clearer when you can: - See exactly how the king approached the opposition - Track passed pawn advancement - Observe rook activation patterns - Understand piece sacrifice timing

Tips for Best Results


Opening Books

Opening books provide pre-analyzed opening moves based on master games and theory.

Supported Formats

  1. Polyglot (.bin): Open format, widely available
  2. ChessBase (.ctg): Commercial format with rich statistics
  3. Repertoire Builder (.otb): AIChessGM native tree format with persisted stats

Loading Opening Books

  1. Open a Book File: File → Open… (⌘O)
  2. Select a .bin (Polyglot), .ctg (ChessBase), or .otb (Repertoire Builder) file
  3. The book becomes active and displays moves for the current position

AIChessGM also supports side-specific books via the Opening Book — White and Opening Book — Black panes. This is useful for keeping separate repertoires for each color.

Where to Find Books: - Polyglot books: Available online (search “polyglot opening book download”) - ChessBase books: Bundled with ChessBase products

Using Opening Books

Viewing Book Moves: - The Opening Book pane displays available moves with statistics: - Polyglot: Weight (frequency of play) - CTG: Number of games, win/draw/loss percentages, performance rating

Filtering Options:

CTG Books: - Game Percentage Threshold: Show moves played in at least X% of games (default: 10%) - Performance Percentage Threshold: Show moves with at least X% performance (default: 2%) - Minimum Game Count: Minimum number of games required

Polyglot Books: - Weight Threshold: Shows all moves, weighted by frequency

Book Statistics (CTG)


Repertoire Builder Pane

Opening Tree (Repertoire Builder)

The Opening Tree is the fastest way to build, analyze, and train a real repertoire from your own games and reference databases. Unlike a static opening book, it’s built from your data, updated anytime, and it understands transpositions, so the same position is always tracked as one node no matter how you reached it.

Why it matters

What you get at every position

Opening the Pane

Via Menu: - Workspace → Repertoire Builder Pane (⌘⇧7)

Via Toolbar: - Click the Repertoire Builder icon in your pane toolbar

The pane works in conjunction with your open database. If no database is loaded, you’ll need to build a tree first or open an existing .otb file.

Building Your First Repertoire Builder

Build a Repertoire Tree in 5 Minutes

  1. Create or open a database containing your repertoire games (your games + model games).
  2. Run Database → Convert Database to Repertoire Builder… (depth 20 is a strong starting point).
  3. Set a display filter like Min plays = 5 or 10 to hide noise.
  4. Run Openings → Smart Analyze Tree to evaluate only what matters.
  5. Add comments at your key decision points.
  6. Open Training → Repertoire Training and drill your lines.

From a Database

  1. Open the database you want to analyze
  2. Go to Database → Convert Database to Repertoire Builder…
  3. Configure options:
  4. Click Convert
  5. The Repertoire Builder Pane will display, showing statistics from your database

From a PGN File

  1. Go to Openings → Convert PGN File to Repertoire Builder…
  2. Select your .pgn file
  3. Configure depth and options
  4. Click Convert

Opening an Existing Tree

The Repertoire Builder Interface

The pane displays move statistics for the current board position. Each row represents a legal move, showing:

Column Description
Move SAN notation of the move
Plays Number of games with this move
% Percentage of total games at this position
W Win % for side to move
D Draw %
L Loss %
Avg Elo Average player rating
Eval Engine evaluation (if analyzed)
Score Combined quality score

Click any move to play it on the board and update statistics. Click a column header to sort by that metric. Use the search field to filter moves by notation or name.

Position Details and Quick Actions

The lower bar in Repertoire Builder is the fastest way to work position-by-position:

AI Go To Navigator

Use AI Go To to jump directly to positions that need attention:

  1. Choose a target class (for example, leaf nodes, multi-move positions, eval/backsolve mismatches, or fix queue).
  2. Optionally limit by side (AI Color) or scope (From Here).
  3. Use Prev and Next to cycle matching positions.

This is useful for cleanup passes when you want to fix only unresolved or inconsistent positions.

Fix Queue side awareness: when the loaded repertoire file is recognized as side-specific (for example a known White or Black split repertoire), Fix Queue suppresses opposite-side multi-move/missing-eval items. Eval/backsolve mismatch candidates are still included.

Engine Analysis on the Tree

You can run engine analysis directly on positions in your tree.

Batch Analysis

  1. Click Analyze Tree (or use the menu: Openings → Analyze Repertoire Builder)
  2. Configure:
  3. Click Start Analysis

The engine will analyze each position, and results appear in the Eval column.

Smart Analysis

Smart Analysis only analyzes positions that need it—those without existing evaluations or with evaluations below a quality threshold:

  1. Go to Openings → Smart Analyze Tree
  2. Set the quality threshold (lower = stricter)
  3. Click Start

This is much faster than full batch analysis for large trees.

Analysis Settings and Defaults

In addition to one-click Analyze Tree and Analyze Branch…, use:

Backsolved Evaluations

Backsolving propagates evaluations from analyzed child positions upward:

Even if you haven’t analyzed a parent position, AIChessGM can estimate it from analyzed child positions so your tree is never full of blanks.

  1. Go to Openings → Backsolve Tree
  2. Positions without direct analysis get evaluations from their most evaluated child moves

This fills gaps in your analysis quickly.

You can run three backsolve modes from the pane:

Branch Analysis

Focus analysis on a specific line:

  1. Navigate to the starting position of your branch
  2. Right-click and select Analyze Branch, or use Openings → Analyze Branch from Position
  3. Choose settings and click Start

Only positions in that line are analyzed, saving time.

Display Filters

Fine-tune what you see in the tree:

Enable Filters: - Toggle Display Filters in the pane toolbar - Set minimum plays (hide rarely played moves) - Include/exclude unknown results

Common Filters: - Hide moves with < 10 plays to focus on main lines - Show only moves with > 50% win rate - Filter by minimum average rating

Importing External Data

From CTG Books

Import ChessBase book statistics:

  1. Go to Openings → Import Book Stats → From CTG Book…
  2. Select your .ctg file (and companion files if required)
  3. Configure merge options (add counts or replace)
  4. Click Import

Statistical data from the CTG book is merged into your tree.

From Another Repertoire Builder

Merge or replace statistics from another .otb file:

  1. Openings → Import From Book into Repertoire Builder…
  2. Select the source .otb file
  3. Choose import options:
  4. Choose merge policy for overlapping stats:

This lets you combine multiple sources or update a tree with new data.

Copying Analysis from Games

Import engine evaluations from analyzed games into your tree:

  1. Go to Openings → Copy Eval from Games → Filtered Games
  2. Select options:
  3. Click Copy

Evaluations from your database games are added to tree positions.

You can also export tree evals back to games from the same Sync menu:

Editing and Annotating

Adding Comments

  1. Right-click a move row
  2. Select Add Comment
  3. Enter your annotation
  4. Comments appear in the position tooltip

Editing Move Names

You can rename moves for clarity:

  1. Right-click a move
  2. Select Rename Move
  3. Enter a custom name

This is useful for remembering “that move where Carlsen surprised everyone.”

Deleting Nodes

Remove unwanted lines:

  1. Right-click a move
  2. Select Delete Branch
  3. Confirm deletion

The entire subtree below that move is removed.

Auto-Add Board Moves

Automatically add moves you play on the board to the tree:

  1. Enable Auto-Add Board Moves in the pane toolbar
  2. Play moves on the board
  3. Moves are added to the tree (if a parent node exists)

This lets you build a tree from your own games as you play.

Tools Menu Workflows

The Tools menu in Repertoire Builder includes advanced workflows:

Training With Your Tree

The Repertoire Builder integrates with Training Mode:

  1. Go to the Training pane
  2. Select the Repertoire Training agent
  3. Configure depth and other settings
  4. Start training

The tree becomes your training partner, testing you on moves from your database. Repertoire Training continues through trainer replies and child moves until a leaf node is reached (or your depth limit is reached).

Repertoire Training behavior:

Book vs Book Training: - Load White and Black repertoire builders - Select Book vs Book in Training Mode - Practice both sides of your repertoire

Save and Backup

Saving Your Tree: - Click Save in the pane toolbar, or Openings → Save Tree - Use Save As to create a new file

Automatic Backups: When you save, AIChessGM creates timestamped backups:

MyOpenings/
├── Backups/
│   ├── MyTree.otb.20250110-211849.bak
│   └── MyTree.otb.20250109-153022.bak
└── MyTree.otb

Quit Prompt: If you have unsaved changes, you’ll be prompted to save when quitting.

Converting Trees to Databases

Export your analyzed tree back to a database:

  1. Go to Openings → Convert Tree to Database…
  2. Choose format:
  3. Configure options (include variations, comments, etc.)
  4. Click Export

This creates a new database containing all positions from your tree.

Tips and Best Practices

Building Your Repertoire Tree: 1. Create a database of games with your preferred opening lines 2. Build a tree from just those games 3. Use filters to hide opponent’s rare responses 4. Analyze the main lines 5. Export to training mode

Studying a New Opening: 1. Build a tree from master games (2700+ players) 2. Sort by plays to see the main line 3. Sort by win rate to find successful replies 4. Use branch analysis on critical positions 5. Take notes on key positions

Building a Global Reference: 1. Combine multiple databases (your games, master games, online games) 2. Import CTG book data for additional statistics 3. Run full engine analysis on main lines 4. Save with descriptive name (“Complete_Reference_2025.otb”)

Performance Tips: - For databases with 100,000+ games, build trees incrementally - Use branch analysis on specific lines rather than full tree analysis - Enable display filters to reduce visual clutter - Use Smart Analysis to skip well-analyzed positions

Data Management: - Regularly clean old backup folders if disk space is tight - Consider exporting analyzed trees to databases for backup - Use descriptive names: “My_Sicilian_Defense_2025.otb”


Repertoire Scan and Split Workflows

This workflow ties together database scanning, owner-side detection, split repertoires, and puzzle generation.

Run Repertoire Scan

From the Analysis menu: - Analyze Repertoire (Filtered Games)… - Analyze Repertoire (All Games)…

During setup: - If Owner name is set (Rules tab), matching games auto-detect owner side. - If no owner match is found, the scan uses your selected fallback side (White/Black). - You can skip games already scanned.

Review Repertoire Scan Results

Open results using: - Analysis → Repertoire Scan Results… - Or Workspace → Repertoire Scan Pane

The pane shows: - Scan timestamp, players, owner side - Owner and opponent departure move (ply + SAN/UCI) - Matched split-tree names/paths for White and Black when available - Full file paths for base repertoires and matched split files

Puzzle CSV Export (Automatic)

After a successful repertoire scan, AIChessGM writes: - repertoire_puzzles_white.csv - repertoire_puzzles_black.csv

These files are generated in your Puzzles folder (see Default Folders and Generated Files).

Use Repertoire Puzzle CSV in Training

  1. Open the Training pane.
  2. Select a Puzzle Files (Local CSV) agent.
  3. Use Select Puzzle File and choose repertoire_puzzles_white.csv or repertoire_puzzles_black.csv.
  4. Start training, then use Next Puzzle to continue through positions.

Split Database by Player

Use Database → Split Database by Player… to split one source database into side-specific outputs.

Generated outputs are named from your player name stem: - {Player}AsWhite.pgn or .cgmdb - {Player}AsBlack.pgn or .cgmdb - Optional build step also creates {Player}AsWhite.otb and {Player}AsBlack.otb

Split Repertoire by Opening (OTB)

In the Repertoire Builder pane, use Split Repertoire by Opening… to split a source .otb by deepest ECO opening name.

Output behavior: - Creates a sibling folder named <SourceStem>-Split - Writes one .otb file per opening inside that folder - Keeps parent branches needed to preserve valid tree paths

This split output is also used by owner-side auto-load logic when a matching split file is found.


Training Mode

Training Mode is a powerful feature for improving your chess skills by practicing move selection with immediate feedback.

Training Agents

The Training pane discovers agents dynamically based on what you currently have loaded (analysis, a game, books, database trees). Common agents include:

How Training Works

  1. Select a Training Agent:
  2. Start Training:
  3. Make Moves:
  4. Get Hints (optional):
  5. Progress Tracking:

Mistake Training

Mistake Training lets you practice finding a better move in positions where a player made an Inaccuracy, Mistake, or Blunder.

Prerequisites

Starting Mistake Training

  1. Open the Training pane.
  2. Select Mistake Training.
  3. Choose:
  4. Click Start Training.

AIChessGM switches to a temporary scratch training position so your original game is not modified.

Solving Positions

Tuning What Counts as a Mistake

The thresholds shown in the Mistake Training settings use your configured centipawn-loss cutoffs:

(These thresholds come from your Analysis settings.)

Motif-Targeted Puzzle Training (From Mistakes)

After analysis is complete, you can generate motif-specific puzzle files and train directly on those motifs.

Step 1: Generate Analysis Puzzle Files

From the Analysis menu:

Choose which error classes to include (inaccuracies, mistakes, blunders), then export.

Step 2: Understand the Generated Files

AIChessGM writes:

Step 3: Start Training for a Specific Motif

  1. Open an analyzed game and select a motif in the Features pane.
  2. In the Motif pane, go to Motif Puzzle Training.
  3. Click Train White or Train Black.

AIChessGM automatically points the Puzzle Files (Local CSV) agent at that motif’s CSV and starts the session.

Lichess and Local Puzzle Training

Puzzle training supports both online and local-file workflows.

Online puzzle feeds

Local puzzle files

From the Training pane (when Puzzle Files / Local CSV agent is selected), you can:

Notes:

Creating Puzzle Files from PDF Diagrams

Use this workflow to convert printed-book diagrams into trainable local puzzles:

  1. In the Chess Book (PDF) pane, capture a diagram (for example via macOS screenshot selection).
  2. Open Position Recognition and click Paste + Recognize.
  3. Confirm side to move (auto-detection uses cues like W? / B? and nearby move notation), then review legality checks.
  4. Click Apply to Scratch Board and fix any recognition mistakes in setup mode.
  5. Click Done in setup mode to confirm the corrected position.
  6. Click Create PDF Diagram Puzzle.

Optional puzzle options:

Output:

Training Tips


AI Chat Assistant

AIChessGM includes optional AI features for explanations, annotations, and automation.

Ideas Annotations

In addition to move-by-move comments, AIChessGM supports higher-level Ideas annotations.

Note: AI features require an API key (or a configured local model provider, depending on your setup).

Setting Up AI

  1. Obtain an OpenAI API Key (if you want AI features enabled).
  2. In AIChessGM open Settings (⌘,) and configure the AI settings.
  3. AI keys are stored in the macOS Keychain.

Vision Model Selection (Diagrams vs Scoresheets)

Under Settings → AI → Model Settings, AIChessGM supports separate vision models:

This lets you keep diagram recognition fast while assigning a stronger vision model for messy handwriting OCR.

AI Tools (Menus)

In addition to the Chat pane, AIChessGM exposes several AI actions from the Analysis menu. Common examples:

AI annotations inserted by AIChessGM are typically tagged in the PGN so you can identify them later.

AI Snapshots Folder

Feature analysis and related AI artifacts are stored under the app’s Application Support folder. You can open it via:

Notes


Rules Platform and Auto-Load Automation

The Rules tab in Settings now includes two layers:

Open it via: - Settings → Rules

Board Orientation Rules (Current)

Core behavior: - Rules are evaluated in order. - First match wins. - You can reorder rules using up/down controls. - Rules can be enabled/disabled individually.

Rule types: 1. Player name match 2. ECO code range

For player rules, you can define: - Match mode (Exact or Contains) - Bottom side behavior (matched player at bottom/top, or force White/Black at bottom)

Owner Name and Owner-Side Logic

Set Owner’s name once in Rules settings.
When matched, AIChessGM can infer whether you are White or Black in the active game and apply owner-relative automation.

Optional Repertoire Auto-Load (Per Rule)

Player rules can auto-load repertoires to one of these targets: - Repertoire Builder - Opening Book (by owner side) - Split Repertoire Builder (by owner side) - Opening Book — White - Opening Book — Black

For split workflows, AIChessGM attempts to resolve split assets (for example, <stem>-Split folders and intersect trees) and falls back to the base repertoire when needed.

Rules Platform (Preview): Starter Bundles

Use Load Starter Bundles (Top 20) to install a built-in starter set with high-impact rules grouped into bundles such as:

Starter bundles are merged non-destructively by rule ID so loading again is safe.

Dry-Run Safety Before Enable

Before enabling a bundle (or Enable All Seed Rules), AIChessGM runs a dry-run preview:

You must confirm the preview before enable actions are applied.

Import/Export and Portability

Use these buttons in Settings → Rules:

The current snapshot includes: - Auto-orient toggle - Owner name - Full orientation rules list (including repertoire auto-load targets such as Split Repertoire Builder (by owner side)) - Default White/Black repertoire paths - Configured White/Black split folder/tree paths

This is the recommended way to carry your orientation and auto-load setup into a fresh app install.

Optional Analysis Preferences (Per Rule)

Orientation rules can also apply analysis defaults automatically: - Mapping mode: White/Black or Owner/Opponent - MultiPV values - Centipawn filter values

This is useful when you want strict settings for your side and wider settings for opponent responses.

AI Rule Authoring and Website Rule Packs (Roadmap)

Direction for upcoming releases:

Until website pack sync ships, use RulesSettings.json export/import for manual portability.


Workspace Customization

AIChessGM’s workspace uses a dockable pane system for flexible layouts.

Available Panes

PDF Pane + Position Recognition (Recent Workflow)

The PDF and Position Recognition workflow is optimized for diagram extraction and puzzle creation:

This lets you go from scanned diagram to local training puzzle without manual CSV editing.

Toggling Pane Visibility

Via Menu: - Analysis → Toggle Analysis Pane (⌘1) - Analysis → Show Engine Console (⌘2) - Workspace menu provides direct pane toggles (including Repertoire Scan, Repertoire Builder, Training, Features, Chat, Database, and more)

Via Toolbar: - Click pane icons in the toolbar to show/hide

Note: Specific pane shortcuts may vary. Check the application’s Workspace menu for current bindings.

Docking and Resizing

Docking Areas: - Left Column: Typically the board - Right Column: Analysis, books, chat, etc. - Bottom Row: Database browser, game lists

Resizing: - Drag the splitters between panes to adjust sizes - Panes within the same dock slot share the available space

Important Layout Rule: > If no panes are docked in the bottom row or the right column, those areas should only be as high (bottom row) or as wide (right column) as the docking target.

Resetting the Layout

If your layout becomes disorganized: - Look for Workspace → Reset Layout in the menu (exact location may vary) - Or close and reopen the application (layout is saved)

Detaching Panes (Multi-Window)

Panes can be detached into separate windows.

How to detach: - Click the Open in New Window icon in a pane header. - The detached pane keeps working as a live view with the same app state.

Use cases: - Keep Analysis or Repertoire Builder on a second monitor - Keep Repertoire Scan Results visible while browsing games in the main workspace


Appearance Settings

Customize the look of the board and pieces to suit your preferences.

Changing Board Themes

  1. Open Preferences (⌘,)
  2. Go to the Appearance tab
  3. Select a board theme from the dropdown

Available Themes: - wood, slate, marble, maple, cherry - aluminium, brazilwood, cumaru, lanta, lapis - mahogony, purpleheart, sand, sandlewood, silverwood

Changing Piece Sets

Available Piece Sets: - merida: Classic tournament style - berlin: Modern clean design - leipzig: Traditional figurine style - alpha: Minimalist style

Changing Piece Styles

Styles: - shadow: Pieces with drop shadows - outline: Pieces with outlines - plain: Flat pieces without effects

Additional Appearance Options

Accessibility

For better visibility: - Use high-contrast themes (e.g., marble with dark pieces) - Enable board coordinates - Increase piece scale


Keyboard Shortcuts Reference

Shortcuts listed here reflect current menu bindings as of March 2026. If something differs, the app menus are the source of truth. Conflict policy: ⌥⌘A is reserved for Analyze Games… to avoid collisions.

Notation Legend

File Menu

Command Shortcut Description
New Database… ⌘N Create a new chess database
Open… ⌘O Open a file (PGN, database, or book)
Import… ⌘I Import PGN games into the database
Save Game ⌘S Save the current game
Save Game As… ⇧⌘S Save the game with a new name
Export… ⌘E Export game or data to file
Email Game… ⇧⌘E Compose an email with the current game (PGN export + attachment)
Print… ⌘P Print the current game

Edit Menu

Command Shortcut Description
Undo Move ⌘Z Undo the last move
Redo Move ⇧⌘Z Redo a previously undone move
Set Up Position… Enter position setup mode

Game Menu

Command Shortcut Description
New Start a new game
Edit Header… Edit game metadata (players, event, etc.)
Save Save the current game
Add to Database… ⇧⌘D Save the current scratch game into the active database (or MyGames if none is active)
Delete Moves After Current ⇧⌘⌫ Truncate the line after the current ply
Flip Board ⌘F Flip board orientation
Play vs Engine… ⌥⌘P Start a timed game against a configured engine
End Engine Game ⌥⇧⌘P End an active engine game
Play Engine vs Engine… ⌥⌘E Start a match between two configured engines
Stop Engine vs Engine ⌥⇧⌘E End an active engine vs engine match
Play on Lichess… ⌥⌘L Start a Lichess session
End Lichess Game ⌥⇧⌘L End a Lichess session
First Move Jump to the start of the game
Previous Move Go back one move
Next Move Go forward one move
Last Move Jump to the end of the game
Copy Position (FEN) ⇧⌘C Copy the current position in FEN notation
Paste Position (FEN) ⇧⌘V Set the position from FEN in clipboard
Save Video… Open board video export (batch or live recording)
Paste PGN and Add to MyGames Parse PGN from clipboard and append it to MyGames

Engines Menu

Command Shortcut Description
Engines Manager… ⇧⌘, Open the engines configuration dialog

Analysis Menu

Command Shortcut Description
Start Engine Analysis ⌘A Begin engine analysis
Stop Engine Analysis ⇧⌘A Stop engine analysis
Analyze Games… ⌥⌘A Batch-analyze games
Analyze Position Features (Current Game) ⌥⇧⌘F Compute features and motifs for the current game
Analyze Features (Filtered Games)… ⌥⌘F Batch feature analysis for the currently filtered set
Analyze Features (All Games)… Batch feature analysis for the entire database
Analyze Repertoire (Filtered Games)… Batch repertoire scan on the current filtered set
Analyze Repertoire (All Games)… Batch repertoire scan on the entire database
Create Analysis Puzzle Files (Filtered Games)… Build local puzzle CSVs from analyzed mistakes in filtered games
Create Analysis Puzzle Files (All Games)… Build local puzzle CSVs from analyzed mistakes in the entire database
Repertoire Scan Results… Open the Repertoire Scan Results pane
Open AI Snapshots Folder Open the app’s AI artifacts folder in Finder
Toggle Analysis Pane ⌘1 Show/hide the analysis pane
Show Engine Console ⌘2 Show raw engine output
AI: Describe Current Position ⌥⌘D Describe the current position
AI: Annotate Current Move (Append) Add an AI comment for the current move (append)
AI: Annotate Current Move (Replace) Add an AI comment for the current move (replace)
AI: Add Comments for Mistakes/Blunders/Inaccuracies (Current Game) ⌥⌘T Generate targeted AI comments for error moves
AI: Annotate Game (Ideas) – Append ⌥⌘G Add idea-focused commentary to the whole game
AI: Annotate Game (Ideas) – Replace ⌥⇧⌘G Replace existing idea-focused commentary

Database Menu

Command Shortcut Description
Find Position Search for the current position in the database
Open Database Browser ⌘D Open the database game browser
New Database… ⇧⌘N Create a new database (alternate)
Import PGN File… ⌘I Import PGN games (alternate)
Export Database… ⇧⌘E Export entire database to PGN
Search Games… ⇧⌘F Search games by player, opening, etc.
Convert Database to Repertoire Builder… Build an .otb tree from a database
Split Database by Player… Generate side-specific outputs (AsWhite / AsBlack)
Add Missing ECO Codes… Automatically add ECO codes to games

Openings Menu

Command Shortcut Description
Open Tree… Open an existing .otb in the Repertoire Builder pane
Convert CTG Book to Repertoire Builder… Convert .ctg to .otb
Import From Book into Repertoire Builder… Merge a book into an existing .otb
Convert Repertoire Builder to Database… Export .otb to .pgn or .cgmdb

Commands may appear in multiple menus by design. The intent is fast access from either a file-centric flow or a database/workspace-centric flow.

Canonical menu locations: - File: create/open/import/export at the file level - Database: search, browser, ECO, split, and database-wide workflows - Analysis: live engine analysis, batch analysis, and AI annotation actions

File Menu

Edit Menu

Game Menu

Engines Menu

Analysis Menu

Database Menu

Openings Menu

Workspace Menu

Layouts Menu

Settings → Rules


Position Setup Mode

Captured Pieces Strip

Right Panel Sizing

Default Folders and Generated Files

AIChessGM now uses a Documents-based root folder:

Core subfolders are auto-created:

Important generated files:

Repertoire Builder split outputs:

Migration behavior:


Tips and Best Practices

Database Management

Engine Analysis

Training

Performance Optimization

FEN and Position Sharing

Keyboard Efficiency


Troubleshooting

Engines Not Detected

Problem: Engine doesn’t appear in Engines Manager
Solutions: - Ensure the engine executable has execute permissions: chmod +x /path/to/engine - Verify the engine is UCI-compatible (most modern engines are) - Check the path is correct (absolute path recommended) - Try running the engine in Terminal to confirm it works

macOS Blocked Engine (Gatekeeper)

Problem: macOS blocks the engine with a security warning
Solutions: - In Finder, Control-click the engine executable and choose Open, then confirm Open. - Or go to System Settings → Privacy & Security and click Open Anyway for the blocked app. - After allowing it once, re-add the engine in Engines → Engines Manager… if needed.

Opening Books Won’t Load

Problem: Opening book file fails to load
Solutions: - Confirm the file format (.bin for Polyglot, .ctg for ChessBase, .otb for Repertoire Builder) - Check file permissions (must be readable) - For CTG books, ensure all related files are present (.ctg, .cto, .cyi) - Try a different book to rule out file corruption

Slow Performance

Problem: Application is slow or unresponsive
Solutions: - Close unnecessary panes - Stop engine analysis if running - Reduce engine threads/hash if analysis is slow - Check database size (very large databases may be slower) - Restart the application

Import Stalls or Fails

Problem: PGN import doesn’t complete
Solutions: - Check PGN file validity (some malformed PGNs cause issues) - Try importing in smaller batches - Ensure sufficient disk space - Check Console logs for error messages

Board Video Export Fails or Is Empty

Problem: Export creates a short, silent, or blank video

Solutions: - Confirm a game is loaded, or a real-time recording session has active frames. - Ensure the narration source is available if narration is enabled. - Try a lower FPS and shorter export duration. - Close/disable intensive panes and retry if the app was under heavy load. - Use Preview Voice to confirm the selected narration voice is valid and audible. - If export appears paused, switch to 720x720, disable narration, and retry to isolate rendering vs audio issues. - Check Console logs for BoardVideoExport messages.

Keyboard Shortcuts Don’t Work

Problem: Shortcuts are unresponsive
Solutions: - Check for conflicts with system or other app shortcuts (System Preferences → Keyboard → Shortcuts) - Ensure AIChessGM is the active application - Try the menu command directly to confirm the feature works - Restart the application

AI Assistant Errors

Problem: Chat assistant fails to respond
Solutions: - Verify API key is correct (Settings → AI → Test Connection) - Check internet connectivity - Ensure OpenAI service is operational (status.openai.com) - Review API usage/quotas on OpenAI dashboard - Try a lighter or alternate model if requests time out or fail, then retry your preferred model.

Layout Issues

Problem: Panes are misaligned or missing
Solutions: - Reset layout via Workspace menu - Close and reopen the application (layout is persisted) - Manually resize panes by dragging splitters - Check that panes aren’t hidden (toggle visibility via toolbar/menu)

Build Errors (for developers)

Problem: Swift build fails
Solutions: - Ensure Xcode Command Line Tools are installed: xcode-select --install - Verify Swift version: swift --version (should be Swift 6) - Clean build: swift package clean && swift build - Check for missing dependencies in Package.swift - Ensure macOS 14+ SDK is available


Additional Resources

Learning Chess

UCI Engines

Opening Books

PGN Game Collections

Screenshots

Screenshots illustrate key workflows and concepts throughout this documentation.

Board Operations

Board Flip

docs/flip-board.png - Board orientation toggle (White ↔︎ Black)

Board Coordinates

docs/board-coordinates.png - File/rank labels (a-h, 1-8) shown on squares

Position Operations

docs/copy-position.png - Copy current position to clipboard (FEN) docs/paste-position.png - Paste position from clipboard into board

Engine Analysis

Analysis Pane

docs/analysis-pane.png - Engine evaluation display with best move arrows

Best Move Arrows

docs/best-move-arrows.png - Arrows showing engine-recommended moves on board

MultiPV Lines

docs/multi-pv-lines.png - Multiple principal variation lines displayed in analysis

Opening Books

Book Loading

docs/loading-book.png - Opening book file selection dialog

Book Statistics

docs/book-statistics.png - CTG/Polyglot book showing game counts, percentages

CTG Filters

docs/ctg-filters.png - CTG book filter controls (game percentage, score percentage, minimum games)

Training Mode

Agent Selection

docs/agent-selection.png - Training pane dropdown for choosing training agent

Training Controls

docs/training-controls.png - Start training, hints, progress tracking

Hint Feedback

docs/hint-feedback.png - Visual feedback when requesting hints during training

Position Setup

Setup Mode

docs/setup-mode.png - Drag pieces to set custom position, Done button

Castling UI

docs/castling-ui.png - Castling rights selector (O-O, O-O-O)

FEN Operations

docs/fen-operations.png - Copy FEN, Paste FEN from clipboard

Quick Reference

Keyboard Shortcuts

docs/keyboard-shortcuts.png - Common keyboard shortcuts for navigation

Engine Settings

docs/engine-settings.png - Engine manager interface showing configured engines

Note: macOS screenshot shortcuts are ⌘⇧3 (full screen), ⌘⇧4 (selection), and ⌘⇧5 (capture/record toolbar).


About AIChessGM

AIChessGM is built with Swift 6 and SwiftUI, designed specifically for macOS 14+. It leverages modern Apple technologies for performance and native integration.

Created by James Coons — contact: james@coons.com.

Project Structure: - Swift Package Manager for build system - UCI protocol for engine communication - SQLite for database storage - SwiftUI for user interface

For developer documentation, see: - README.md: Build and development instructions - FEATURES.md: Complete feature list and implementation status - Training.md: Training system architecture - Docs/AddingNewPanes.md: Guide for extending the workspace


Enjoy using AIChessGM to improve your chess! If you have feedback or encounter issues, please consult the troubleshooting section or refer to the developer documentation.