Mayhem NNUE - New NN engine

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

Moderators: hgm, Rebel, chrisw

JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 3.6 without NNUE beating Fruit 2.1 easily :shock: :shock: :shock:
Mayhem's super simple classical evaluation is only mobility + pesto :lol:
My guesstimate w/o NNUE 2500 and w/ NNUE 3100

[pgn][Event "Computer Chess Game"]
[Site "ThinkPad"]
[Date "2021.03.18"]
[Round "-"]
[White "Mayhem 3.6"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "60+1"]
[Annotator "5. +0,49 1... -0,02"]

1. c4 Nf6 {-0,02/12 2,2} 2. d4 e6 {+0,05/12 2,1} 3. Nf3 Nc6 {-0,02/12 2,8}
4. a3 Be7 {-0,01/11 2,0} 5. d5 {+0,49/18 3} Na5 {-0,10/12 2,7} 6. e3
{+0,41/17 3} b5 {+0,00/11 1,8} 7. cxb5 {+0,42/17 2,9} exd5 {-0,03/11 2,7}
8. Nc3 {+0,42/16 2,9} Bb7 {-0,05/12 2,3} 9. Bd3 {+0,38/15 2,8} O-O
{-0,12/12 2,5} 10. O-O {+0,30/15 2,7} Bd6 {-0,04/11 4} 11. b3
{+0,48/15 2,7} Re8 {+0,13/10 2,5} 12. Bb2 {+0,59/15 2,6} Rb8 {+0,07/10 2,3}
13. Ne2 {+0,55/15 2,6} Ne4 {-0,03/10 2,3} 14. Ng3 {+0,78/15 2,5} g6
{-0,21/10 4} 15. Bc2 {+0,97/14 2,5} f6 {-0,24/10 3} 16. Rc1 {+0,76/13 2,4}
Qe7 {-0,09/10 2,1} 17. a4 {+0,77/13 2,4} Qf8 {+0,03/9 1,8} 18. Nd2
{+1,41/15 2,3} Nxg3 {-0,10/10 2,0} 19. hxg3 {+1,44/16 2,3} Bb4 {-0,18/11 3}
20. Nf3 {+1,14/15 2,2} c5 {-0,14/11 1,9} 21. Bd3 {+1,21/15 2,2} Qf7
{+0,00/11 1,5} 22. Bc2 {+0,98/15 2,2} a6 {+0,07/11 1,9} 23. Nh2
{+1,04/15 2,1} Kh8 {+0,16/10 1,3} 24. Ng4 {+1,56/16 2,1} d4 {+0,16/11 1,8}
25. exd4 {+1,08/15 2,1} c4 {-0,56/12 7} 26. d5 {+1,82/15 2,0} c3
{-0,68/10 1,0} 27. Ba1 {+1,78/15 2,0} Rf8 {-0,70/10 1,6} 28. Be4
{+1,82/14 1,9} Rbc8 {-0,50/10 1,7} 29. Qd4 {+2,28/14 1,9} Qe7
{-1,94/11 1,6} 30. Bxc3 {+2,56/15 1,9} Rxc3 {-1,55/11 1,7} 31. Rxc3
{+2,77/16 1,9} Bxc3 {-1,71/11 0,9} 32. Qxc3 {+2,56/17 1,8} axb5
{-1,90/12 2,0} 33. axb5 {+2,74/17 1,8} Nxb3 {-2,00/12 1,1} 34. Re1
{+2,90/17 1,8} h5 {-3,36/13 9} 35. Bxg6 {+3,61/17 1,8} Qg7 {-3,39/12 0,8}
36. Bxh5 {+3,71/17 1,7} Bxd5 {-4,03/12 3} 37. Ne3 {+3,74/16 1,7} Be6
{-3,37/11 1,1} 38. b6 {+3,78/16 1,7} Rb8 {-3,41/11 1,2} 39. Qc7
{+3,95/16 1,7} Qf8 {-3,46/10 0,8} 40. b7 {+3,84/16 1,6} Nc5 {-3,46/12 1,2}
41. Rb1 {+4,27/15 1,6} Na6 {-3,66/11 1,4} 42. Qf4 {+4,61/16 1,6} Nc5
{-3,66/11 1,1} 43. Bf3 {+4,52/16 1,6} Kg7 {-3,68/11 1,1} 44. Rb6
{+4,62/15 1,6} Qd8 {-3,82/9 0,8} 45. Qd6 {+4,73/16 1,5} Qf8 {-4,21/11 0,8}
46. Qc7 {+4,73/17 1,5} Kg8 {-4,35/11 1,2} 47. Rb5 {+5,00/17 1,5} Nxb7
{-5,30/10 1,7} 48. Bxb7 {+5,36/16 1,5} Kg7 {-5,61/11 4} 49. Qf4
{+5,25/15 1,5} Qh8 {-5,93/10 1,9} 50. Ng4 {+5,72/16 1,5} f5 {-5,63/10 1,0}
51. Ne3 {+5,72/14 1,4} Rf8 {-6,78/9 1,0} 52. Nxf5+ {+5,90/15 1,4} Rxf5
{-6,13/10 0,7} 53. Rxf5 {+7,18/17 1,4} Bxf5 {-6,18/10 0,4} 54. Qe5+
{+9,30/18 1,4} Kg8 {-5,73/14 1,0} 55. Bd5+ {+8,23/19 1,4} Be6
{-3,27/11 0,3} 56. Bxe6+ {+7,96/18 1,4} dxe6 {-4,10/14 0,4} 57. Qxe6+
{+8,01/17 1,4} Kf8 {-4,48/17 0,7} 58. Qc8+ {+8,01/16 1,3} Kg7 {-3,59/9 0,4}
59. Qc3+ {+7,99/16 1,3} Kg8 {-3,39/10 1,1} 60. Qxh8+ {+8,13/17 1,3} Kxh8
{-18,37/25 1,3} 61. f4 {+9,20/22 1,3} Kg7 {-11,63/17 1,4} 62. g4
{+9,52/21 1,3} Kf6 {-11,09/15 0,7} 63. g5+ {+11,03/21 1,3} Kf5
{-12,82/18 3} 64. Kf2 {+11,70/21 1,3} Kg6 {-12,82/16 1,1} 65. g4
{+12,15/21 1,3} Kf7 {-8,87/15 1,0} 66. f5 {+12,81/21 1,3} Ke7
{-21,47/19 1,0} 67. g6 {+13,08/20 1,3} Kf6 {-21,59/18 1,0} 68. Ke3
{+16,71/20 1,2} Kg7 {-22,53/19 0,8} 69. Ke4 {+17,96/20 1,2} Kf6
{-1000,13/19 1,2} 70. Kd5 {+24,59/20 1,2} Kg7 {-22,12/14 1,0} 71. Ke6
{+25,56/21 1,2} Kh6 {-1000,10/15 0,7} 72. g5+ {+25,49/18 1,2} Kg7
{-1000,09/28 0,6} 73. Ke7 {+104,85/17 0,2} Kg8 {-1000,08/46 0,6} 74. f6
{+104,85/14 0,1} Kh8 {-15,69/4 0,1} 75. f7 {+104,85/13 0,1} Kg7
{-20,59/4 0,1} 76. f8=Q+ {+104,85/12 0,1} Kxg6 {-1000,05/4 0,1} 77. Qf6+
{+104,85/11 0,2} Kh5 {-1000,05/37 0,8} 78. g6 {+104,85/9 0,1} Kg4
{-1000,04/46 0,8} 79. g7 {+104,85/7 0,1} Kh5 {-1000,03/45 0,8} 80. Qf4
{+104,85/5 0,1} Kg6 {-1000,02/4 0,1} 81. g8=Q+ {+104,85/4 0,1} Kh5
{-1000,01/4 0,1} 82. Qgg5# {+104,85/3 0,1}
{Xboard adjudication: Checkmate} 1-0

[/pgn]

[pgn][Event "Computer Chess Game"]
[Site "ThinkPad"]
[Date "2021.03.17"]
[Round "-"]
[White "Mayhem 3.6"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "60+1"]
[Annotator "4. +0,84 1... -0,18"]

1. e4 Nf6 {-0,18/12 3} 2. e5 Nd5 {-0,24/12 2,6} 3. d4 c5 {-0,18/12 2,7} 4.
c4 {+0,84/16 3} Nb4 {-0,07/12 2,7} 5. dxc5 {+0,84/16 3} e6 {-0,11/11 2,8}
6. a3 {+0,89/17 2,9} N4c6 {-0,59/12 3} 7. Nf3 {+1,10/16 2,8} Qc7
{-0,54/11 1,5} 8. Bf4 {+1,13/16 2,8} Bxc5 {-0,81/11 2,2} 9. Nc3
{+1,15/16 2,7} O-O {-0,85/11 4} 10. b4 {+1,07/15 2,7} Be7 {-0,97/11 1,5}
11. Bg3 {+1,19/14 2,6} h5 {-0,93/11 4} 12. h4 {+1,15/15 2,6} Qd8
{-1,08/11 4} 13. b5 {+1,53/17 2,5} Qa5 {-0,99/12 2,1} 14. Qc2
{+1,61/16 2,5} Bb4 {-1,07/12 2,0} 15. Rc1 {+1,56/17 2,4} Bxa3 {-1,26/13 4}
16. Ng5 {+1,47/16 2,4} g6 {-0,44/12 2,0} 17. bxc6 {+1,26/16 2,3} Bxc1
{-0,60/12 1,9} 18. cxb7 {+1,12/16 2,3} Bxb7 {-0,42/12 1,9} 19. Qxc1
{+0,90/17 2,2} Nc6 {-0,24/12 1,8} 20. f4 {+0,99/15 2,2} Nd4 {-0,18/12 1,8}
21. Bf2 {+1,11/16 2,1} Nf5 {-0,26/12 1,8} 22. c5 {+0,95/15 2,1} Rab8
{+0,01/11 1,8} 23. Rh3 {+1,08/14 2,1} f6 {+0,00/10 1,7} 24. Nf3
{+1,05/15 2,0} Be4 {-0,05/10 3} 25. Nd2 {+1,22/16 2,0} Bc6 {-0,10/11 2,0}
26. exf6 {+1,16/16 2,0} Rxf6 {-0,23/10 1,3} 27. Nc4 {+0,77/14 1,9} Qc7
{-0,33/10 1,0} 28. Rd3 {+1,23/15 1,9} Kh7 {-0,38/10 3} 29. Ne5
{+1,29/15 1,9} Ne7 {-0,63/10 1,6} 30. g3 {+1,80/14 1,8} Rb7 {-0,83/9 2,9}
31. Rd1 {+1,99/14 1,8} Rf8 {-1,12/10 5} 32. Qc2 {+1,95/15 1,8} Nf5
{-0,75/9 1,2} 33. Bc4 {+2,05/14 1,8} Rb4 {-0,92/9 1,3} 34. Qd2
{+2,08/13 1,7} Kh6 {-0,99/9 1,1} 35. Na2 {+2,12/14 1,7} Rxc4 {-1,40/9 0,9}
36. Nxc4 {+2,49/15 1,7} Ba4 {-1,69/10 1,4} 37. Rb1 {+2,93/14 1,7} Qc6
{-2,01/9 0,8} 38. Nc3 {+2,84/15 1,6} Qg2 {-2,04/9 1,8} 39. Ne5
{+2,82/15 1,6} Bc6 {-2,22/9 1,4} 40. Qd3 {+2,97/15 1,6} Rc8 {-2,19/9 1,3}
41. Nxc6 {+3,31/14 1,6} Qh1+ {-2,41/10 1,8} 42. Ke2 {+3,44/16 1,6} Qxc6
{-2,43/11 0,8} 43. Ne4 {+3,26/15 1,5} Re8 {-2,63/10 2,0} 44. Nf6
{+3,32/15 1,5} Rd8 {-2,39/11 1,2} 45. Ra1 {+3,43/13 1,5} Qb7 {-2,15/9 0,8}
46. Qc3 {+3,41/14 1,5} Rc8 {-2,07/9 1,1} 47. Qd2 {+3,27/13 1,5} Rc7
{-2,03/10 1,2} 48. Rd1 {+3,39/14 1,5} Qg2 {-2,52/9 1,3} 49. Ke1
{+3,35/14 1,4} Qh1+ {+0,00/12 1,0} 50. Ke2 {+0,00/21 1,4} Qg2
{+0,00/14 0,5} 51. Qc3 {+3,45/15 1,4} d5 {-3,26/10 1,6} 52. Ng8+
{+3,26/15 1,4} Kh7 {-2,64/4 0,1} 53. Nf6+ {+3,39/16 1,4} Kh6 {-3,30/11 0,7}
54. Rg1 {+3,39/15 1,4} d4 {-3,62/11 0,8} 55. Rxg2 {+3,68/16 1,4} dxc3
{-3,85/13 0,8} 56. Kd3 {+3,65/18 1,4} a5 {-4,05/12 1,3} 57. Kxc3
{+3,67/17 1,3} Rb7 {-4,12/12 1,3} 58. g4 {+3,75/17 1,3} hxg4 {-3,93/12 0,9}
59. Nxg4+ {+3,87/18 1,3} Kh7 {-4,15/13 1,3} 60. Nf6+ {+3,78/16 1,3} Kg7
{-3,86/12 1,2} 61. Ne8+ {+3,70/17 1,3} Kh6 {-3,94/13 1,2} 62. Nd6
{+3,87/17 1,3} Rb8 {-4,40/13 3} 63. Nf7+ {+4,30/18 1,3} Kh7 {-4,33/12 1,0}
64. Ng5+ {+4,34/18 1,3} Kg8 {-4,46/13 1,1} 65. Nxe6 {+4,38/17 1,3} Kf7
{-4,53/12 0,7} 66. Nd4 {+4,32/17 1,2} Ne7 {-4,68/13 1,2} 67. Rg5
{+4,39/18 1,2} a4 {-4,57/13 1,1} 68. c6 {+4,43/17 1,2} a3 {-4,47/11 1,2}
69. Ra5 {+4,52/16 1,2} Rb6 {-4,67/11 1,2} 70. Ra7 {+4,63/16 1,2} a2
{-5,17/12 1,4} 71. Be3 {+4,63/16 1,2} Ke8 {-4,61/11 1,4} 72. Rxa2
{+4,69/16 1,2} Nxc6 {-4,85/12 0,9} 73. Kc4 {+4,73/16 1,2} Ne7
{-4,89/12 1,1} 74. Ra8+ {+5,62/17 1,2} Kf7 {-5,84/13 2,2} 75. Nf3
{+5,96/16 1,2} Rc6+ {-5,72/12 0,7} 76. Bc5 {+5,76/17 1,2} Kf6
{-5,61/13 1,1} 77. Nd4 {+7,81/18 1,2} Rc8 {-5,29/13 1,1} 78. Ra6+
{+7,72/19 1,2} Kg7 {-5,38/13 1,1} 79. Ra7 {+7,68/17 1,2} Kf6 {-5,34/13 1,0}
80. Rxe7 {+8,97/17 1,2} Rxc5+ {-4,99/13 0,2} 81. Kxc5 {+10,97/20 1,2} Kxe7
{-5,12/15 0,4} 82. Kd5 {+10,97/18 1,1} Kf6 {-10,49/18 2,0} 83. Ke4
{+11,09/18 1,1} Ke7 {-6,80/13 0,9} 84. Ke5 {+11,41/18 1,1} Kf7
{-15,24/17 1,1} 85. f5 {+14,56/19 1,1} gxf5 {-13,66/15 0,8} 86. h5
{+14,79/19 1,1} f4 {-13,90/17 1,1} 87. Kxf4 {+14,84/18 1,1} Kg7
{-14,15/17 0,9} 88. Kg5 {+18,84/19 1,1} Kf7 {-14,32/15 0,8} 89. h6
{+19,68/19 1,1} Kg8 {-14,44/14 0,9} 90. Kg6 {+20,74/19 1,1} Kh8
{-1000,09/17 0,9} 91. Nc6 {+20,61/18 1,1} Kg8 {-13,63/4 0,1} 92. Nd8
{+104,85/17 0,5} Kf8 {-1000,07/24 0,7} 93. h7 {+104,85/15 0,1} Ke8
{-1000,06/35 0,7} 94. h8=Q+ {+104,85/13 0,2} Kd7 {-1000,05/47 0,8} 95. Qd4+
{+104,85/11 0,4} Kc8 {-1000,04/47 0,8} 96. Qg7 {+104,85/7 0,1} Kxd8
{-1000,03/46 0,7} 97. Qb7 {+104,85/5 0,1} Ke8 {-1000,02/4 0,1} 98. Qc7
{+104,85/4 0,1} Kf8 {-1000,01/4 0,1} 99. Qf7# {+104,85/3 0,1}
{Xboard adjudication: Checkmate} 1-0

[/pgn]
User avatar
Graham Banks
Posts: 41415
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Mayhem NNUE - New NN engine

Post by Graham Banks »

Once you have enough Mayhem games, will you train a network using those games?
gbanksnz at gmail.com
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Graham Banks wrote: Thu Mar 18, 2021 11:52 pm Once you have enough Mayhem games, will you train a network using those games?
Hello!
Yes! But then I'll close the source code.
Right now it makes sense as the base engine ( only classical ) is ~2500. Definitely not stronger than Fruit 2.1 ( 2710 Elo ).
I'm actually surprised Mayhem search has improved so much. Classical Mayhem is able to outplay Fruit.

Once I generate own net + reading. I will close the source code. As then Mayhem contains no foreign code. I'll give Mayhem binaries to testers. Github is totally useless for me anyway. My pesto/endgame generators are closed already.

I will add all the other tricks I developed ( in Havoc ) once the source is closed. They are easily worth +50 Elo.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 3.6 unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v3.6
non-popcnt binary for Windows

This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo

Nasty nullmove bug fixed + endgame fixes.
JohnW
Posts: 381
Joined: Thu Nov 22, 2012 12:20 am
Location: New Hampshire

Re: Mayhem NNUE - New NN engine

Post by JohnW »

JohnWoe wrote: Sat Mar 20, 2021 5:56 pm Mayhem 3.6 unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v3.6
non-popcnt binary for Windows

This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo

Nasty nullmove bug fixed + endgame fixes.
Please excuse my ignorance, do I need to download an eval file from somewhere?
JohnW
Posts: 381
Joined: Thu Nov 22, 2012 12:20 am
Location: New Hampshire

Re: Mayhem NNUE - New NN engine

Post by JohnW »

JohnW wrote: Sat Mar 20, 2021 8:40 pm
JohnWoe wrote: Sat Mar 20, 2021 5:56 pm Mayhem 3.6 unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v3.6
non-popcnt binary for Windows

This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo

Nasty nullmove bug fixed + endgame fixes.
Please excuse my ignorance, do I need to download an eval file from somewhere?
nevermind I found in the source code zip which I don't normally look at.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

JohnW wrote: Sat Mar 20, 2021 8:40 pm
JohnWoe wrote: Sat Mar 20, 2021 5:56 pm Mayhem 3.6 unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v3.6
non-popcnt binary for Windows

This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo

Nasty nullmove bug fixed + endgame fixes.
Please excuse my ignorance, do I need to download an eval file from somewhere?
My bad.
Seems you found them.
But I uploaded them to the release for other people too.
My opening book and evalfile has been the same for the last 3 months.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Mayhem NNUE - New NN engine

Post by mar »

JohnWoe wrote: Sat Mar 20, 2021 5:56 pm This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo
My estimates (200 games, TC roughly CCRL Blitz):

Classical mode: ~2250 Elo
NNUE mode: ~2950 Elo (pretty close to your estimate, actually!)

A fair match (same book for both engines) between Fruit 2.1 and Mayhem 3.6 Classical:

176-20-4 (WDL), 93% => Fruit completely obliterated Mayhem Classical
Martin Sedlak
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

mar wrote: Sun Mar 21, 2021 7:42 am
JohnWoe wrote: Sat Mar 20, 2021 5:56 pm This is actually incredible strong version.

My guesstimates.
Classical mode: ~2500 Elo
NNUE mode: ~3000 Elo
My estimates (200 games, TC roughly CCRL Blitz):

Classical mode: ~2250 Elo
NNUE mode: ~2950 Elo (pretty close to your estimate, actually!)

A fair match (same book for both engines) between Fruit 2.1 and Mayhem 3.6 Classical:

176-20-4 (WDL), 93% => Fruit completely obliterated Mayhem Classical
Hello!
Wow, a bad beating for Classical Mayhem 3.6! Thanks for clarification anyway. I need to update README with more accurate estimates then. Also document the codebase as well...

This ~2250 Elo Classical sounds correct.
Classical Mayhem 3.6 and Fruit both used 256 MB hash tho. Mayhem used a book. Classical Mayhem 3.6 was weaker but not that much so I claimed 2500 Elo.

However I tested against some weak CCRL ~2000 Elo engines in Blitz TC. And Classical Mayhem 3.6 ( no book + no NNUE ) crushed them 100% of the time.

I stopped testing against Fruit 2.1 because NNUE mode Mayhem 3.6 became too strong. Mayhem 3.6 crushed the poor Fruit 10-0 every time.

The whole point of classical strength improvement is that now I can drop into classical w/ good faith. To finish the game mainly. Whether I generate own NNUE or not. I'll still have classical mode.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 3.7 unleashed !

https://github.com/SamuraiDangyo/mayhem ... s/tag/v3.7

Faster and slightly better than v3.6

slow binaries are pretty slow, but works well. I'm getting (slow) 4.6 MNPS vs (fast build) 7 MNPS.
Ryzen builds are super fast tho.

Thanks to mar for measuring classical. ~2300 Elo is more truthful.