New engine: Stash

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

MOBMAT wrote: Tue Jul 14, 2020 11:47 pm
mhouppin wrote: Tue Jul 14, 2020 11:24 pm Hi there, version 19 is out ! New things in this release (compared to version 18):

- Added Delta Pruning to Quiescence Search;
- Added small material specifications to evaluation (Bishop Pair, Rook Pair...);
- Removed PV computations on non-PV nodes;
- Re-indexed search stack so that Killer Moves don't get erased when doing IID search or Null Move Search;
- Added Rook on open/semi-open files, and Rook x-raying Queen to evaluation;
- Changed phase calculation (from piece count to material count).

The new version got a +80 Elo in self-tests, but the gain against other engines should be around 40-50 Elo.

Good evening to everyone !
Previously you had a bmi2 version. is that the same as "modern" now?
I did the builds on my laptop which doesn't support BMI2 instruction set, so I couldn't generate these ones. I'll update the binaries tomorrow once I have access to my tower.
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Release updated with the BMI2 builds for Haswell processors: https://gitlab.com/mhouppin/stash-bot/-/releases/v19.0
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Hi there, version 20 is out ! Some improvements on the evaluation have been made:

- Doubled King Safety bonus for endgame;
- Retired unsafe squares (squares controlled by enemy pawns) from Mobility;
- Changed phase estimation by delaying endgame.

The self-tests show a gain of 70-80 Elo, but as usual, this value should be smaller against other engines (around 40-50 Elo is expected).
Good afternoon to everyone !
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: New engine: Stash

Post by Jamal Bubker »

Merci Morgan pour la sortie de cette nouvelle mouture !
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Hi there, Stash 22 is out ! Here is what's new in this version:

- Changed the LMR formula to a linear version (slightly less aggressive than the sqrt()'s one);
- Full tune of the evaluation function (this was done for the version 21, twice with Texel's Tuning and once with Gradient Descent based on Andrew Grant's paper);
- Removed PST bonus from quiet moves' ordering;
- Scaled cp score reporting to match the piece values more correctly;
- Added the first time management code (Stash uses from 83% to 120% of its initial time guess, can be adjusted via options TimeburnRatio and TimesaveRatio);
- Removed the Negascout search framework (Stash is now PVS only);
- Added LMR for root nodes;
- Added an aspiration window to the search;
- Last but not least, added Lazy SMP handling to the code !

As usual, the release binaries for version 21 and 22 are available on GitLab: https://gitlab.com/mhouppin/stash-bot/-/releases

I expect version 22 to play slightly under 2800 Elo at CCRL Blitz. Version 23 is already well advanced, and should be out very soon... ^^

Good morning to everyone !
Frank Quisinsky
Posts: 6808
Joined: Wed Nov 18, 2009 7:16 pm
Location: Gutweiler, Germany
Full name: Frank Quisinsky

Re: New engine: Stash

Post by Frank Quisinsky »

Hi Morgan,

thanks for your Stash and now the available version 23.
I will try it out in my next tournament.

Best
Frank
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Hi there, as Frank mentioned it, version 23 is out ! Stash got added to OpenBench less than 2 weeks ago, so I would like to thank Andrew Grant, Noobpwnftw, and all OB users. Here's the list of improvements:

- added Late Move Pruning;
- fixed repetition counter when doing the verification search for Null Move Pruning;
- removed the NonPawnBonus eval term by applying it directly to piece values;
- added history decaying (so that old bonuses have less and less impact with time);
- scaled history bonuses with depth.

The overall rating gain should be around +70 Elo to version 22. The release binaries are available here: https://gitlab.com/mhouppin/stash-bot/-/releases/v23.0

Good evening to everyone ! ^^
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Hi there, version 24 is out ! I again focused on search for this update, here are the improvements made:

- Changed IID by reducing depth when a TT entry cannot be found (Thanks to Rebel for this idea);
- Changed Futility Pruning to check for an advantage while having the move (eval > beta + some_margin instead of eval < alpha - some_margin);
- Reordered evaluation terms to increase overall running speed;
- Changed underpromotion ordering by placing them at the end of the move list;
- Added check extensions;
- Merged PV search and non-PV search into the same function (root nodes are still handled separately);
- Some other small optimizations in the code.

This version scored +59 Elo against version 23 at LTC, and I would expect the gains to hold against other engines.
As usual, the release binaries are available here: https://gitlab.com/mhouppin/stash-bot/-/releases/v24.0
Good morning to everyone !
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: New engine: Stash

Post by Jamal Bubker »

Merci Morgan 8-)
mhouppin
Posts: 115
Joined: Wed Feb 12, 2020 5:00 pm
Full name: Morgan Houppin

Re: New engine: Stash

Post by mhouppin »

Hi there, version 25 is out ! Here are the improvements made:

- Fully retuned eval after lowering the piece values in endgames for a more consistent scoring;
- Scaled search constants to adapt to the new eval;
- Changed the aspiration window to a fixed delta of 15;
- Removed piece tables in board representation, now relying only on bitboards;
- Caching eval in transposition table if no entry exists for the current position;
- Changed LMR affine formula to a logarithmic one;
- Disabled Late Move Pruning when the search suggest we're getting mated (it does fix mate scores at low depths);
- Using the previous score instead of the aspiration window bound to increase its size (Stash should have less fail-highs when searching for mates);
- Tweaked time management to allow Stash to finish its iteration more often instead of aborting the search;
- Increased Futility Pruning max depth and lowered eval threshold for activation.

To ease output reading for the few CLI users (including me), I moved the score reporting to the beginning of the info string. Now the output looks like this:

Code: Select all

[...]
info depth 20 seldepth 22 multipv 1 score cp 24 nodes 9194891 nps 2718773 hashfull 1000 time 3382 pv e2e4 e7e5 g1f3 b8c6 b1c3 g8f6 d2d4 e5d4 f3d4 f8b4 d4c6 b7c6 e4e5 d8e7 d1d4 e8g8 c1g5 b4c3 d4c3 f8e8 g5f6
info depth 21 currmove e2e4 currmovenumber 1
[...]
Stash scored +60 Elo against version 24, but the gains seem to be a little lower against other opponents (about 35-40 Elo).
Here's the link for binaries: https://gitlab.com/mhouppin/stash-bot/-/releases/v25.0

I already made some good progress after this release, so version 26 should come very soon and finally break the 3000 Elo milestone...
Good morning to everyone ! ^^