Editorial for Weakfish


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: kevlu8

The engine running on the judge is a modified version of PZChessBot at depth 7, using only HCE for evaluation. The judge takes a negligible amount of time per move.

Implementing move searching is not hard, but searching moves and evaluating positions quickly is.

Speed optimizations, most-to-least useful, with approximate difficulty to implement

  • Alpha/beta pruning (very easy)
  • Late move reductions (very easy)
  • Zobrist hashing and transposition tables for cutoffs (normal)
  • Move ordering using transposition tables or MVV-LVA (easy)
  • Null-move pruning (easy)
  • Bitboard or hybrid as opposed to mailbox-only (hard)
  • Principal-Variation Search (very easy)

Strength optimizations, most-to-least useful, with approximate difficulty to implement

  • NNUE (insane, the hardest part is fitting the model into the submission size limit)
  • Quiescence search (normal)
  • Fine-tuned evaluation function (normal)
  • Tactical motif detection (hard)

Note that optimizing speed has the effect of also optimizing strength, since you can search at higher depths!!

You may also find the Chessprogramming Wiki helpful.


Comments

There are no comments at the moment.