Open-Source Release · MagicTree 3.3 · 8 August 2026

Download MagicTree

An MIT-licensed, open-source 64-bit Windows UCI chess engine written in C++ by Vikrant Malvankar. Requires a BMI2/PEXT-capable CPU.

MagicTree 3.3
MagicTree 3.3.zip · 909 KB · Windows x64 + C++ source
Released 8 August 2026
Download MagicTree 3.3

Complete open-source package with the 64-bit Windows binary, C++17 source code, build script, README, and MIT License.

Download the README separately

What's New in 3.3

Changes in MagicTree 3.3 compared with the previous release, MagicTree 3.2.

Open-source release

  • MagicTree 3.3 is released as open-source software under the MIT License.
  • The release package includes the C++17 source, Windows x64 executable, README, and separate LICENSE file.
  • Engine identity is updated to MagicTree 3.3 by Vikrant Malvankar, India.

Draws, repetition & legality

  • Repetition detection now distinguishes search-tree repetitions from genuine game-history threefold matches.
  • Repetition scans are bounded by the halfmove clock and the latest null-move boundary using new pliesFromNull state tracking.
  • Null moves no longer advance the fifty-move counter, and fifty-move draws now preserve checkmate precedence.
  • Quiescence search explicitly detects stalemate and stores an exact draw score.

Search correctness

  • Check extensions now use the total number of legal evasions rather than the running move index.
  • Singular-search handling now returns the correct fail-low result when the excluded transposition-table move is the only legal move.
  • Search draw checks use the revised ply-aware repetition semantics.

SEE & evaluation tuning

  • Static Exchange Evaluation now uses a faster attackers-to-square swap loop with occupancy and x-ray updates.
  • SEE explicitly handles en-passant occupancy, promotion value changes, and in-check non-king recapture legality.
  • Handcrafted evaluation and pawn-hash parameters were retuned across material, mobility, pawn structure, king safety, threats, space, initiative, and tempo.

Historical Releases

Download links and release notes for previous MagicTree releases.

MagicTree 3.2
MagicTree 3.2.zip · 829 KB · Windows x64
Released 24 June 2026

The final binary-only release before MagicTree became open source, focused on search heuristics, move ordering, correction history, and engine correctness.

Download MagicTree 3.2.zip
What's new in 3.2 vs 3.1

Search & move ordering

  • Deeper Late Move Pruning, more aggressive null-move pruning, and Internal Iterative Reduction.
  • Reworked history-aware SEE pruning, granular capture history, and 4-ply continuation history.

Evaluation & engine internals

  • Correction history expanded across pawn, non-pawn, and continuation components.
  • Added non-pawn Zobrist-key support, transposition-table prefetching, and bishop-colour draw fixes.
MagicTree 3.1
MagicTree 3.1.zip · 832 KB · Windows x64
Released 21 May 2026

A 64-bit Windows UCI chess engine requiring a BMI2/PEXT-capable CPU. Free binary-only release.

Download MagicTree 3.1.zip
What's new in 3.1 vs 3.0

Identity & UCI layer

  • Engine identity updated from MagicTree 3.0 to MagicTree 3.1 in the released executable.
  • Added an "eval" diagnostic command reporting the full static evaluation in centipawns from the side-to-move point of view.
  • Added an "evaltrace" diagnostic command printing a grouped middle-game / end-game evaluation trace with per-group deltas for symmetry auditing and tuning insight.

Position legality & hashing correctness

  • En-passant target squares are now retained only when a legal en-passant capture is actually available.
  • FEN loading clears an en-passant square that cannot legally be captured by the side to move.
  • Double pawn pushes set the en-passant square only when the opposing side has at least one legal en-passant capture after accounting for king safety.
  • This avoids different Zobrist keys for positions that are legally identical apart from a phantom en-passant square.

Pawn-structure evaluation fixes

  • Backward-pawn detection was corrected in both the full evaluator and the pawn hash logic.
  • A pawn with an occupied push square is no longer treated as backward merely because the square in front is attacked.
  • The corrected logic requires the square in front of the pawn to be empty and attacked by an enemy pawn before the backward-pawn penalty applies.

Static-evaluation exactness & correction history

  • Lazy evaluation now returns an EvalResult carrying both the score and an exact/inexact flag.
  • Inexact lazy-eval cutoffs are no longer stored as reusable exact static evals in the transposition table.
  • Pawn correction history is updated only when the raw static evaluation was exact, avoiding pollution from lazy-eval shortcut scores.
  • Root, main, and quiescence search share the same helper for probing a TT static eval or obtaining an exact static eval when needed.

Quiescence-search robustness

  • Quiescence search now distinguishes total search ply from quiescence ply, keeping qsearch depth limits focused on the quiescence part of the search.
  • In-check positions continue searching legal evasions even at the qsearch depth limit, while quiet non-check positions still stop at the configured cap.
  • Checkmate detection in qsearch tracks whether a legal evasion was actually searched, avoiding false mate results in edge cases.
  • Qsearch capture pruning can reuse the MovePicker’s cached SEE result instead of recomputing SEE for the same capture.

Move ordering & speed

  • MovePicker now caches the Static Exchange Evaluation gain for captures, reused for good/bad capture splitting, checking-sac classification, and qsearch capture pruning.
  • MovePicker scoring and pick-next routines include optional profiling hooks.
  • Large per-node move arrays are no longer value-initialized, reducing avoidable per-node memory work since reads are bounded by explicit move counts.

Dynamic time management

  • The soft time limit is now dynamically adjusted during iterative deepening.
  • When the best move stays stable across iterations, MagicTree can spend less than the original soft budget and save time for later positions.
  • When the best move changes at meaningful depth or the root score drops, the soft budget can extend toward the hard limit.
  • Fixed-movetime searches preserve the requested behavior because soft and hard limits are equal in that mode.

Diagnostics & build

  • Added prof.h and optional MAGICTREE_PROFILE instrumentation for eval, SEE, move scoring, and move picking (inactive in normal builds).
  • Added evaluation trace snapshots at key stages, including pawn hash, pieces, bishop pair, material imbalance, passers, threats, king safety, space, initiative, and final score.
  • The 3.1 source uses PEXT/PDEP intrinsics for sliding-attack table generation and lookup; the supplied build is a 64-bit Windows PE console executable.
MagicTree 3.0
MagicTree 3.0.zip · 820 KB · Windows x64
Released 24 April 2026

The first official public release of MagicTree: a 64-bit Windows UCI chess engine with a classical handcrafted evaluation. Free binary-only release requiring a BMI2/PEXT-capable CPU. No NNUE, opening book, or tablebase support is included.

Download MagicTree 3.0.zip
MagicTree 3.0 feature summary

Board representation & position handling

  • 64-bit bitboard representation with separate piece bitboards, occupancy bitboards, and a 64-square lookup array.
  • FEN loading and export, plus UCI "position startpos" and "position fen" support with trailing move lists.
  • Zobrist position key and pawn hash key, with position-key history for repetition detection.
  • Fifty-move-rule draw detection and insufficient-material draw handling.

Attack & move generation

  • Precomputed knight, king, and pawn attacks with PEXT/BMI2 rook and bishop sliding-attack tables.
  • Pseudo-legal and legal move generation that is check-aware, pin-aware, and handles double-check, castling legality, and promotions.
  • En-passant generation with legality validation to catch discovered-check cases, plus perft support for move-generator validation.

Search framework

  • Iterative deepening negamax alpha-beta with Principal Variation Search and zero-window re-searches.
  • Aspiration windows after the first completed depth and mate-distance score handling.
  • Search limits by depth, nodes, movetime, clock time, and infinite analysis, with bestmove and PV sanitation before reporting.

Transposition tables, hashing & quiescence

  • Main transposition table with 4-entry buckets storing best move, depth, score, static eval, bound type, and age, plus bound-aware cutoffs and hashfull reporting.
  • Separate pawn hash table for pawn-structure evaluation and king-shelter caching.
  • Quiescence search with stand-pat, capture/promotion search, limited quiet-check search, delta pruning, and SEE-based capture pruning.

Pruning, reductions & extensions

  • Null-move pruning (with non-pawn-material guard and verification at higher depths), reverse futility pruning, razoring, and futility pruning.
  • Late Move Pruning and Late Move Reductions driven by depth, move count, improving status, PV status, and history/continuation statistics.
  • Singular extensions with a double-extension cap and multicut-style handling, plus selective check-evasion extensions.

Move ordering & classical evaluation

  • TT move priority, MVV-LVA capture ordering with capture history, SEE good/bad capture splitting, killer and countermove heuristics, and 1-ply/2-ply continuation history.
  • Handcrafted tapered centipawn evaluation with material, piece-square tables, mobility, bishop pair, and full pawn-structure terms.
  • King safety (shelter, open/semi-open files, pawn storms, king-ring pressure), threat evaluation, space, initiative, endgame scaling, lazy evaluation, and pawn correction history.

Time management & UCI reporting

  • Fixed-depth, fixed-node, fixed-movetime, infinite, and clock-based search with move overhead, minimum thinking time, and a Slow Mover option.
  • Increment-aware allocation with separate soft and hard time budgets and extra time when the best move changes or the root score drops.
  • Reports depth, seldepth, multipv 1, score (including UCI mate format), nodes, time, nps, hashfull, and a single principal variation.