Latest Release · MagicTree 3.2 · 24 June 2026

Download MagicTree

A 64-bit Windows UCI chess engine written in C++ by Vikrant Malvankar. Requires a BMI2/PEXT-capable CPU.

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

Free binary-only release. Load into any UCI GUI such as Arena, Cute Chess, BanksiaGUI, Shredder, or Fritz/ChessBase.

What's New in 3.2

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

Identity & UCI layer

  • New UCI-settable SEE pruning parameters: SeeCaptureMargin, SeeCaptureDepth, SeeQuietMargin, SeeQuietDepth, SeeEndgameGuard, SeeCaptHistDiv, and SeeQuietHistDiv.
  • New UCI-settable correction-history blend weights: CorrPawnWeight, CorrNonPawnWeight, CorrContWeight, and CorrWeightScale.

Search

  • Late Move Pruning maximum depth increased from 5 to 8.
  • Null-move pruning depth divisor changed from 6 to 5, making the reduction more aggressive where applicable.
  • Internal Iterative Reduction replaces the older internal iterative deepening block — depth is reduced by one when there is no TT move at sufficient depth.
  • Reverse futility pruning margin now scales with the "improving" signal.
  • SEE pruning reworked: linear depth-scaled capture margins reusing the MovePicker’s cached SEE, LMR-reduced quiet margins, optional history-aware thresholds, and an optional low-material endgame guard.
  • Child transposition-table buckets are prefetched after each move to hide memory latency.
  • Static-evaluation correction history extended from pawn-only to a blend of pawn, non-pawn, and previous-move continuation histories.

Move ordering

  • Capture history now uses granular attacker / to-square / victim-piece-type indexing.
  • Added 4-ply continuation history alongside the existing continuation-history tables, now folded into quiet move ordering.
  • Improved checking-move ordering by combining direct-check detection with a fuller move-gives-check test; captures and promotions use the same enhanced path.
  • Killer, counter-move, and quiet-check ordering bonuses retuned downward so heuristics no longer overwhelm other signals.

Position, hashing & correctness

  • Added a maintained non-pawn Zobrist key (with full recomputation support) feeding non-pawn correction history; incremental make/unmake keeps it in sync.
  • Fixed opposite/same-coloured bishop draw detection — square colour is now computed from file + rank rather than square-number parity.
  • Added TT::prefetch(key) and Zobrist::compute_non_pawn_key(position); removed a redundant 64-entry pinRay clear for a node-speed gain with no behavioural change.

Historical Releases

Download links and release notes for previous MagicTree releases.

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.