Skip to content

Bobingstern/Tarnished

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

493 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tarnished Logo

Tarnished

Strong UCI Chess Engine written in C++ featuring NNUE evaluation trained from scratch.

Version Release Date CCRL 40/15 CCRL Blitz
1.0 2025-05-10 2432 2485
2.0 2025-05-17 3156 -
2.1 2025-05-24 3375 -
3.0 2025-06-29 3495 3605
4.0 2025-08-22 3571 3663

Building

You can easily build Tarnished with make. NNUE files are stored at tarnished-nets. The Makefile will automatically download the default network for whatever version you are building. Tarnished makes use of incbin to embed the file into the executable itself, removing the need to carry an external network along with it. To build with make you may

  1. Clone the repository.
  2. make
  3. Binary is at tarnished.exe

Features

  • Move Generation
  • NNUE (768x16hm->1536)x2->1x8
    • Trained with bullet
    • Self generated training data
    • (piece, square, color) input features, 16 king buckets, 8 output buckets
    • Horizontal Mirroring
    • 5000/20000 soft nodes for self play
    • 8 random plies for opening
    • ~16b positions
  • Search
    • Principle Variation Search
    • Quiescence Search
    • Iterative Deepening
    • Aspiration Windows
    • Shared Transposition Table
    • Move Ordering
      • Staged Move Picker
      • MVV-LVA
      • TT Move
      • Killer Move Heuristic
      • Butterfly History Heuristic
      • 1 ply Continuation History
      • 2 ply Continuation History
      • Pawn History
      • Capture History
      • SEE Move Ordering
      • Threats Move Ordering
    • Selectivity
      • TT Cutoffs
      • Reverse Futility Pruning
      • Null Move Pruning
      • Improving Heuristic
      • Razoring
      • Late Move Reductions (Factorized formulation)
      • Late Move Pruning
      • SEE Pruning (PVS and QS)
      • Forward Futility Pruning
      • Bad Noisy Futility Pruning
      • Singular Extensions
        • Double Extensions
        • Negative Extensions
        • MultiCut
      • Terminal Conditions (Mate, Stalemate, 3fold...)
      • Internal Iterative Reductions
  • Misc
    • Static Evaluation Correction History (Pawn, Non-Pawn, Major, Minor Hashes, Continuation)
    • TT Static Evaluation
    • TT Clusters
    • TT Aging
    • PVS Fail Firm
    • Soft time management
    • Node time management
    • Complexity time management
    • Lazy SMP
    • SPSA Parameter Tuning
    • Supports FRC (Chess960)

Non-standard UCI Commands

  • print
    • Prints out the board, side to move, castling rights, Zobrist Hash, etc
  • eval
    • Prints the current position's static evaluation for the side to move
  • go softnodes <nodes>
    • Start search with a soft node limit (only checked once per iteration of deepening)
  • wait
    • Ignore all input until search is completed. Useful for scripts
  • bench
    • Runs an OpenBench style benchmark on 50 positions. Alternatively run ./tarnished bench

Credits

  • The name Tarnished is a reference to a certain video game protagonist
  • Thanks to everyone in the Stockfish Discord Server
  • MattBench (Thanks Matt and everyone else for sharing cores, special thanks to Micpilar for helping with datagen)
  • Rensselaer Polytechnic Institute (CCI) (Thanks to my university for letting me use their enourmous computing clusters for data generation and training nets)
  • Swedishchef (Helping out with many engine development related things)
  • Dan (Tossing around ideas and helping out with NNUE and other engine related things)
  • Weiss
  • Stash
  • Sirius (Rand for pointing out many silly mistakes)
  • Stormphrax (Ciekce for helping out with programming details and NNUE things)
  • Prelude
  • Bullet
  • weather-factory Local SPSA tuner for UCI chess engines