Please sign in to access this page

PZChessBot

PZChessBot

25 devlogs
62h 27m
•  Ship certified
Created by Kevin

World top 100 chess engine, shooting for higher!

Approximate CCRL rating: 3400

This is a project I started a long time ago, but only recently picked back up. Starting from scratch, it quickly reached 2000 Elo in under a month. Then, I trained a neural network to do the positional evaluations to raise it to 3000 Elo. From then on, small tweaks and re-trains of the neural network have gradually piled up, placing it at a current rating of approximately 3400 Elo.

Timeline

  • Add bishop pair bonus (+9 Elo)
  • Taper the PSQTs for endgames for pawns and kings (+79 Elo)
  • Test adding mobility bonus but my code is too slow for it to gain Elo... maybe in the future
Update attachment
  • Begin working on the hand-crafted evaluation part of the engine
  • Restarting from scratch (with just material counting), added PSQT (+270 Elo)
Update attachment
nosrep nosrep about 1 hour ago
which psts are you using? or did you make them from scratch (handwritten (??)/texel)
Kevin
Kevin
1h 6m 1 day ago
  • Touch up the data generation script to skip heavily biased starting positions
  • Generate another 500M chess positions for training the network!
  • Also did a small change where instead of only deepening the search for the hash move, singular extensions actually raised the depth of the entire node (+3 Elo)
Update attachment

Ship 2

0 payouts of shell 0 shells

Kevin

3 days ago

Kevin Covers 7 devlogs and 27h 54m
Kevin
Kevin
3h 52m 4 days ago

Added pretty console output! It looks really great IMO

Kevin
Kevin
7h 39m 7 days ago
  • Add QSearch Futility Pruning (+7 Elo)
  • Reduce less on PV nodes (+5 Elo)
  • Reduce more when the TT Move is a capture (+6 Elo)
  • Fix killer move logic (+18 Elo)
  • Train a new horizontally mirrored network (+28 Elo)
  • Add PVS SEE pruning (+24 Elo)
Update attachment
  • Rewrite move ordering scheme (+5 Elo)
  • Implement LMP (+8 Elo)
  • Implement singular extensions (+5 Elo)
  • Implement negative extensions (+13 Elo)
  • Implement history pruning (+21 Elo)
  • Do more RFP when improving (+18 Elo)
Update attachment
Kevin
Kevin
3h 34m 15 days ago
  • Run an SPSA (+5 Elo)
  • Do not reset Transposition Table on position command (+65 Elo!!!!!)
Update attachment
Kevin
Kevin
2h 31m 19 days ago
  • Only do NMP when eval is above beta (+12 Elo)
  • Only call TT once per node (+12 Elo)
  • Add razoring (+31 Elo)
Update attachment
Kevin
Kevin
3h 18m 24 days ago
  • Used TT eval instead of static eval when available (+10 ELO)
  • Use lazy sorting (+2 ELO)
Update attachment
Kevin
Kevin
2h 55m 28 days ago
  • Test various tweaks, including:
  • always replace scheme for TTable
  • lazy sorting in main
  • doing NWS first in PVS, even after score > alpha condition is met
  • disallowing RFP in mating positions (for more accurate mating scores)

none of these passed :(

Update attachment

Ship 1

1 payout of shell 585.0 shells

Kevin

about 1 month ago

Kevin Covers 15 devlogs and 32h 13m

Continuing rewrite:
- Implemented check extensions (50 ELO)
- Implemented proper time management (30 ELO)

Testing:
- Futility Pruning
- QSearch Futility Pruning
- Capture History Heuristic

Update attachment
  • Continuing rewrite
  • Implemented quiescence, transposition tables, aspiration windows, PVSearch, RFP, NMP, SEE, and FP
  • We're already back to 3200 ELO!

To answer @nosrep, I'm rewriting the search because I wrote the bulk of the foundation for the search back when I didn't really know much about chess engines. As a result, my search code is, honestly, extremely messy and difficult to deal with. So, I'm trying to clean it up (along with fixing a few bugs and adding some small microoptimizations)! Also, when I wrote the base search, I didn't know how to properly test code either, so I just made changes and hoped they made the engine stronger. Now, by testing all my changes, I can be sure that my engine is actually stronger, and also I can document my progress and write blog posts on it!

Update attachment
nosrep nosrep about 1 month ago
preach
  • Begin working on rewrite of search
  • Implemented a/b pruning, basic move ordering (MVV-LVA, Killer Moves, HH)
  • Also documenting progress on int0x80.ca (other project)
Update attachment
nosrep nosrep about 1 month ago
why rewrite?
  • Add static exchange evaluation in quiescence search (~20 ELO) ~3300 ELO now
Update attachment
  • Messed around with trying to add Horizontal Mirroring to optimize my NNUE inference but didn't work (will be revisited soon)
  • Flesh out data generation workload, tool is fully working now (~3.5kpos/s)
  • Test adding Capture History to QSearch
  • Test using a model trained on 0.05WDL instead of 0.15WDL
Update attachment

Start working on self-gen data for self-training network
Tried a variety of small improvements that didn't work :(

Update attachment
  • Finally got CorrHist working (+7 ELO)
  • Still waiting on other tests that will take eons
Update attachment
  • Figured out why my pawn corrhist wasn't working
  • Waiting on SPRT results (again)
  • Broke the bank to rent a 48CPU Google server to speed up tests
  • Please help my sanity
Update attachment
  • Various small speed optimizations (~4 ELO)
  • Try adding Pawn CorrHist (but it's failing miserably) We're like 3250 ELO right now!
Update attachment
  • Completely overhaul the NNUE evaluation system
  • Change network to use king input buckets (~54 ELO) Insane change for an insane amount of ELO
Update attachment
  • Add extended futility pruning along with another SPSA tune (~11 ELO)
  • Testing adding internal iterative deepening, seems to not be doing too well (-0.95 +/- 4.3 ELO)
  • Testing increasing the NMP R-value from 4 to 5, awaiting results right now
Update attachment
  • Change history heuristic to use history gravity formula (~16 ELO)
  • Add capture history heuristic to make MVV-LVA -> MVV+CaptHist (~14 ELO)
  • Allow RFP to be performed at all depths (~5 ELO) Engine is now around 3160 ELO, putting it around 140th in global standings
Update attachment
  • Added futility pruning (~20 ELO)
  • Vectorize nnue_eval() (~7 ELO)
  • Run a full SPSA tune of values and use the tuned values (~20 ELO) Didn't have time to run a progtest but it's looking good!
Update attachment
  • Improved aspiration window logic to gradually widen instead of defaulting to a full-window search (~20 ELO)
  • Improved time management to include a soft bound (~20 ELO) Engine should be around 3120-ish ELO now, putting it around 160th in global rankings (further testing needed)
Update attachment

Finalized some stuff for the v2.0 release! Not too sure if I will continue work (since most of it will be with NNUE stuff and that's really :( and also because engine dev is getting really dry)

Update attachment