Myrddin 0.89 Release

Discussion of chess software programming and technical issues.

Moderator: Ras

JVMerlino
Posts: 1398
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Myrddin 0.89 Release

Post by JVMerlino »

Myrddin v0.89 has been released at the website graciously hosted by Ron Murawski (Horizon):
http://computer-chess.org/doku.php?id=c ... ddin:index

Myrddin's source has been updated at Github:
https://github.com/JVMerlino/Myrddin

Testing shows v0.89 it is about 35 ELO stronger than v0.88 at 1 CPU and a further 100-110 ELO stronger at 4 CPUs. Hopefully CCRL will confirm these numbers. :-)

Notable changes:
– Added Late Move Pruning
– Late Move Reductions are now more aggressive and use a logarithmic formula
– Bad captures are now subject to LMR
– Moved killer moves before equal captures in move ordering
– Moved bad captures after quiet moves in move ordering
– Moves that give check are no longer flagged as such at move generation, but instead during MakeMove()
– Reduced the number of fail high/low results at the root before searching on full-width window
– BitScan now uses an intrinsic function rather than MS Windows' BitScanForward64() - thank you to Pawel Osikowski and Bo Persson for the suggestion!
– Null Move now uses a reduction of 3+(depth/6) instead of just 3
– Myrddin will now move instantly if TBs are available and <= 5 men on board. Previously it would “search” all the way to max depth (128) before moving, causing potential buffer problems with some GUIs at very fast time controls.
– Minor evaluation tuning adjustments, most notably adding code for Bishop Outposts and a significant increase for pawns on the 7th rank
– Increased the aggressiveness of SMP depth adjustment for child processes

Many thanks,
jm
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: Myrddin 0.89 Release

Post by dangi12012 »

Very cool!

I see a possible improvement:

Code: Select all

int BBAlphaBeta(int nDepth, int nAlpha, int nBeta, PV *pvLine, BOOL bNullMove)

Code: Select all

template<int nDepth>
int BBAlphaBeta(int nAlpha, int nBeta, PV *pvLine, BOOL bNullMove)
With this change suddenly all ifs that question the (nDepth) become runtime free!
(nDepth > 5) etc will be a constant like 'true' and big parts of code get removed for every node except the leaf node!
Every node of every position your engine visits asks about the depth many times. So this adds up a lot.

I had implemented this once and it changed my nps from 300M to 850M (not an engine just a comparison of tree walking algos)
But I would like to mention this idea once again.

Also if you put the recursion to the very end (i think this is not possible here with extensions) you can avoid implicit allocation of stack frames. (tail recursion)

(Oh and how to convert a runtime variable like depth (uci option) to a template at runtime is with one preprocessor generated switch from depth 0 to 128) but this is only called once.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
jswaff
Posts: 105
Joined: Mon Jun 09, 2014 12:22 am
Full name: James Swafford

Re: Myrddin 0.89 Release

Post by jswaff »

Dang! :-)

My development version of Prophet finally leaped Myrddin 0.88 just days ago, and here you've gone and moved the goal post.

Seriously though, congrats. Looks like a nice update.

JVMerlino wrote: Fri Jun 03, 2022 6:58 pm Myrddin v0.89 has been released at the website graciously hosted by Ron Murawski (Horizon):
http://computer-chess.org/doku.php?id=c ... ddin:index

Myrddin's source has been updated at Github:
https://github.com/JVMerlino/Myrddin

Testing shows v0.89 it is about 35 ELO stronger than v0.88 at 1 CPU and a further 100-110 ELO stronger at 4 CPUs. Hopefully CCRL will confirm these numbers. :-)

Notable changes:
– Added Late Move Pruning
– Late Move Reductions are now more aggressive and use a logarithmic formula
– Bad captures are now subject to LMR
– Moved killer moves before equal captures in move ordering
– Moved bad captures after quiet moves in move ordering
– Moves that give check are no longer flagged as such at move generation, but instead during MakeMove()
– Reduced the number of fail high/low results at the root before searching on full-width window
– BitScan now uses an intrinsic function rather than MS Windows' BitScanForward64() - thank you to Pawel Osikowski and Bo Persson for the suggestion!
– Null Move now uses a reduction of 3+(depth/6) instead of just 3
– Myrddin will now move instantly if TBs are available and <= 5 men on board. Previously it would “search” all the way to max depth (128) before moving, causing potential buffer problems with some GUIs at very fast time controls.
– Minor evaluation tuning adjustments, most notably adding code for Bishop Outposts and a significant increase for pawns on the 7th rank
– Increased the aggressiveness of SMP depth adjustment for child processes

Many thanks,
jm
JVMerlino
Posts: 1398
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Myrddin 0.89 Release

Post by JVMerlino »

Thanks, James. :) I'm not 100% sure of the elo gain, so if Myrddin is stronger at all, then you probably don't have far to go.