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 1.5 is unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v1.5
Source code: https://github.com/SamuraiDangyo/mayhem

Added Polyglot book support. I pulled that book code out from Stockfish. Didn't want to waste my time implementing that from scratch. I did a lot of bug fixes on them tho.
Mayhem has a special way to handle positions. But it was painless integration.

With these books I don't need stupid openings in cutechess anymore. Mayhem uses its own book.

!!! Don't test Mayhem without its own book !!!

A few quick tests. Score against Fruit is ~80%. Which it should be. My tests against Hakkapeliitta 3.0 Mayhem 1.5 scored a victory! So I think Mayhem 1.5 is pretty close to Hakkapeliitta 3.0 with its own book! If not ahead already!
I think I finally claimed the #1 Finnish spot on 1 core.

Code: Select all

Score of Mayhem 1.5 vs Fruit 2.1: 27 - 8 - 3  [0.750] 38
Elo difference: 190.85 +/- 130.59
Finished match
Sample game:
[pgn][Event "?"]
[Site "?"]
[Date "2020.11.27"]
[Round "1"]
[White "Mayhem 1.5"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "30+0.1"]
[ECO "A46"]
[Opening "Queen's pawn game"]
[PlyCount "84"]
[Termination "adjudication"]
[Annotator "3. +0,74 1... -0,21"]

1. d4 {+0,00/1}
{s}
1... Nf6 {-0,21/10 6}
{s}
2. Nf3 {+0,00/1}
{s}
2... Nc6 {-0,26/10 1,4}
{s}
3. d5 {+0,74/11 1,1}
{s}
3... Nb4 {-0,37/11 10}
{s}
4. e4 {+1,13/11 1,1}
{s}
4... Nxe4 {-0,04/10 7}
{s}
5. c3 {+0,73/10 1,0}
{s}
5... Na6 {+0,02/9 9}
{s}
6. Bxa6 {+0,78/10 10}
{s}
6... bxa6 {+0,00/8 1,9}
{s}
7. O-O {+0,97/10 10}
{s}
7... e6 {+0,04/10 9}
{s}
8. Re1 {+0,91/9 9}
{s}
8... Nf6 {+0,01/10 9}
{s}
9. c4 {+0,48/9 9}
{s}
9... Be7 {+0,09/9 8}
{s}
10. Nc3 {+0,57/9 9}
{s}
10... O-O {+0,07/9 5}
{s}
11. Be3 {+0,14/9 8}
{s}
11... d6 {+0,15/9 1,4}
{s}
12. Nd4 {+0,08/9 8}
{s}
12... Bd7 {+0,16/10 8}
{s}
13. Rc1 {+0,06/9 8}
{s}
13... Qb8 {+0,40/9 7}
{s}
14. b3 {-0,08/8 8}
{s}
14... e5 {+0,27/10 8}
{s}
15. Nc6 {+0,29/10 8}
{s}
15... Bxc6 {+0,28/10 9}
{s}
16. dxc6 {+0,65/9 7}
{s}
16... Qb4 {+0,26/10 8}
{s}
17. Qd3 {+0,71/9 7}
{s}
17... Rfb8 {+0,26/10 6}
{s}
18. Re2 {+0,84/8 7}
{s}
18... h6 {+0,24/9 6}
{s}
19. g3 {+0,74/8 7}
{s}
19... Qa5 {+0,25/9 9}
{s}
20. Rd1 {+1,02/8 7}
{s}
20... h5 {+0,24/9 6}
{s}
21. Bg5 {+1,96/9 6}
{s}
21... Re8 {-0,07/9 7}
{s}
22. Bxf6 {+2,18/9 6}
{s}
22... Bxf6 {-0,07/9 4}
{s}
23. Kg2 {+1,50/9 6}
{s}
23... Bd8 {+0,10/9 5}
{s}
24. f4 {+1,48/8 6}
{s}
24... Bf6 {+0,23/8 6}
{s}
25. Rde1 {+1,29/8 6}
{s}
25... h4 {-0,09/8 6}
{s}
26. Nd5 {+2,24/8 5}
{s}
26... Rab8 {-0,15/8 5}
{s}
27. Qf3 {+2,62/7 5}
{s}
27... hxg3 {-0,35/8 6}
{s}
28. hxg3 {+3,44/9 5}
{s}
28... Re6 {-0,80/9 8}
{s}
29. f5 {+4,22/9 5}
{s}
29... Ree8 {-3,46/9 7}
{s}
30. Rh1 {+4,22/7 5}
{s}
30... Bg5 {-1,60/8 4}
{s}
31. Qh5 {+5,98/8 5}
{s}
31... Bh6 {-1,11/8 4}
{s}
32. f6 {+5,55/8 5}
{s}
32... Re6 {-5,37/10 6}
{s}
33. Rf2 {+6,35/8 5}
{s}
33... Rbe8 {-5,99/8 2,6}
{s}
34. Rhf1 {+5,69/7 4}
{s}
34... Qc5 {-2,76/7 2,1}
{s}
35. fxg7 {+6,72/8 4}
{s}
35... f5 {-17,42/9 3}
{s}
36. Rxf5 {+11,04/9 4}
{s}
36... Kxg7 {-18,26/9 4}
{s}
37. Rf7+ {+10,06/8 4}
{s}
37... Kg8 {-18,26/8 1,1}
{s}
38. Rxc7 {+12,22/8 4}
{s}
38... Qxd5+ {-21,72/7 1,0}
{s}
39. cxd5 {+14,94/9 4}
{s}
39... R8e7 {-25,77/7 10}
{s}
40. Rc8+ {+15,08/7 4}
{s}
40... Kg7
{-M8/11 0.067s}
41. c7 {+16,07/8 4}
{s}
41... Rf6
{-M10/5 0.078s}
42. Qg4+ {+104,85/8 2,5}
{s}
42... Rg6
{-M8/17 0.062s, White wins by adjudication} 1-0

[/pgn]
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Mayhem NNUE - New NN engine

Post by Guenther »

JohnWoe wrote: Fri Nov 27, 2020 2:16 am Mayhem 1.5 is unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v1.5
Source code: https://github.com/SamuraiDangyo/mayhem

Added Polyglot book support. I pulled that book code out from Stockfish. Didn't want to waste my time implementing that from scratch. I did a lot of bug fixes on them tho.
Mayhem has a special way to handle positions. But it was painless integration.

With these books I don't need stupid openings in cutechess anymore. Mayhem uses its own book.

!!! Don't test Mayhem without its own book !!!

A few quick tests. Score against Fruit is ~80%. Which it should be. My tests against Hakkapeliitta 3.0 Mayhem 1.5 scored a victory! So I think Mayhem 1.5 is pretty close to Hakkapeliitta 3.0 with its own book! If not ahead already!
I think I finally claimed the #1 Finnish spot on 1 core.

Code: Select all

Score of Mayhem 1.5 vs Fruit 2.1: 27 - 8 - 3  [0.750] 38
Elo difference: 190.85 +/- 130.59
Finished match
Sample game:

Code: Select all

...
[White "Mayhem 1.5"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "30+0.1"]
...
[Annotator "3. +0,74   1... -0,21"]

1. d4 {+0,00/1}
{s}
1... Nf6 {-0,21/10 6}
{s}
2. Nf3 {+0,00/1}
{s}
2... Nc6 {-0,26/10 1,4}
...
{-M8/17 0.062s, White wins by adjudication} 1-0
It seems you have an aversion against fair testing or against testing at all? ;-)
Now you have added plain SF-NNUE with their NNUE file and a Polyglot book vs. poor bookless Fruit.

A good idea would be now to make Mayhem multi-threaded and then let it crush Fruit again and much heavier with 32 vs. 1 core :)
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Guenther wrote: Fri Nov 27, 2020 9:37 am
JohnWoe wrote: Fri Nov 27, 2020 2:16 am Mayhem 1.5 is unleashed !

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v1.5
Source code: https://github.com/SamuraiDangyo/mayhem

Added Polyglot book support. I pulled that book code out from Stockfish. Didn't want to waste my time implementing that from scratch. I did a lot of bug fixes on them tho.
Mayhem has a special way to handle positions. But it was painless integration.

With these books I don't need stupid openings in cutechess anymore. Mayhem uses its own book.

!!! Don't test Mayhem without its own book !!!

A few quick tests. Score against Fruit is ~80%. Which it should be. My tests against Hakkapeliitta 3.0 Mayhem 1.5 scored a victory! So I think Mayhem 1.5 is pretty close to Hakkapeliitta 3.0 with its own book! If not ahead already!
I think I finally claimed the #1 Finnish spot on 1 core.

Code: Select all

Score of Mayhem 1.5 vs Fruit 2.1: 27 - 8 - 3  [0.750] 38
Elo difference: 190.85 +/- 130.59
Finished match
Sample game:

Code: Select all

...
[White "Mayhem 1.5"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "30+0.1"]
...
[Annotator "3. +0,74   1... -0,21"]

1. d4 {+0,00/1}
{s}
1... Nf6 {-0,21/10 6}
{s}
2. Nf3 {+0,00/1}
{s}
2... Nc6 {-0,26/10 1,4}
...
{-M8/17 0.062s, White wins by adjudication} 1-0
It seems you have an aversion against fair testing or against testing at all? ;-)
Now you have added plain SF-NNUE with their NNUE file and a Polyglot book vs. poor bookless Fruit.

A good idea would be now to make Mayhem multi-threaded and then let it crush Fruit again and much heavier with 32 vs. 1 core :)
Alas there was a small bug in my polyglot code. Mayhem couldn't. use its full book. Now it works perfectly.

I've never liked testing with long book lines.
Actually I think testing is now more fair. Mayhem doesn't always pick up the best move. It just adds variety.

Without book Mayhem played the same game basically all the time against Fruit. That was unfair.

Disabling book all you need to do is to remove book. I didn't add OwnBook option for this reason.

I think adding a tiny classical evaluation for testers would be good. But then the strength will be 1700 Elo.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 2.0!
Tons of speedups.
Mayhem now works w/o EvalFiles or BookFiles. Only +1000 Elo weaker tho.

Release: https://github.com/SamuraiDangyo/mayhem ... s/tag/v2.0
Source code: https://github.com/SamuraiDangyo/mayhem/

Just for fun 1 Blitz game vs SF12. Draw! :lol:

[pgn][Event "Computer Chess Game"]
[Site "pc"]
[Date "2020.11.28"]
[Round "-"]
[White "Mayhem 1.6"]
[Black "Stockfish 12"]
[Result "1/2-1/2"]
[TimeControl "40/60"]

1. c4 Nf6
{-0,16/20 3}
2. d4 e6
{-0,28/17 0,9}
3. Nc3 Bb4
{-0,09/16 0,6}
4. Nf3 c5
{-0,13/16 0,5}
5. g3 Nc6
{-0,26/18 3}
6. Bg2 Ne4
{-0,24/16 0,5}
7. Bd2 Bxc3
{-0,19/16 0,6}
8. bxc3 Nxd2
{-0,21/16 0,6}
9. Qxd2
{+0,36/10 2,0}
9... d6
{-0,43/21 6}
10. O-O
{+0,40/9 1,9}
10... O-O
{-0,10/15 1,0}
11. Qe3
{+0,44/9 1,8}
11... Qe7
{+0,04/16 0,5}
12. Rfd1
{+0,32/9 1,8}
12... Bd7
{+0,00/18 1,2}
13. dxc5
{+0,26/9 1,8}
13... dxc5
{+0,70/18 0,7}
14. Ne5
{+0,38/9 1,8}
14... Nxe5
{+0,79/20 0,7}
15. Qxe5
{+0,11/11 1,8}
15... Ba4
{+0,54/19 1,3}
16. Qd6
{-0,34/10 1,8}
16... Rfe8
{+0,59/20 0,8}
17. Qxe7
{-0,11/11 1,8}
17... Rxe7
{+0,66/20 0,8}
18. Rd6
{-0,11/9 1,8}
18... Rc8
{+0,52/23 1,0}
19. f4
{-0,41/10 1,8}
19... b6
{+0,60/22 1,2}
20. e4
{-0,40/10 1,8}
20... Ree8
{+0,36/21 1,4}
21. Kf2
{-0,68/12 1,8}
21... Red8
{+0,42/18 1,2}
22. Rxd8+
{-0,45/12 1,8}
22... Rxd8
{+0,23/20 1,6}
23. Ke3
{-0,45/11 1,8}
23... Rd1
{+0,26/24 4}
24. Rxd1
{-0,08/13 1,8}
24... Bxd1
{+0,25/20 0,5}
25. Kd2
{-0,14/13 1,8}
25... Ba4
{+0,44/22 1,5}
26. e5
{-0,17/13 1,8}
26... f6
{+0,42/24 0,5}
27. exf6
{-0,15/13 1,8}
27... gxf6
{+0,33/26 6}
28. Be4
{-0,07/12 1,8}
28... f5
{+0,40/26 1,0}
29. Bc2
{-0,15/12 1,8}
29... Bc6
{+0,40/25 0,8}
30. Ke3
{-0,13/12 1,8}
30... Kg7
{+0,40/27 0,7}
31. Bd1
{-0,18/11 1,8}
31... Bg2
{+0,39/26 0,8}
32. Be2
{-0,16/13 1,8}
32... Be4
{+0,39/32 2,1}
33. a3
{-0,11/12 1,8}
33... Bg2
{+0,39/27 0,8}
34. Kf2
{-0,13/13 1,8}
34... Be4
{+0,38/30 0,9}
35. Ke3
{+0,00/16 1,8}
35... Bc2
{+0,38/31 0,9}
36. Kd2
{-0,17/13 1,8}
36... Bb3
{+0,37/34 2,1}
37. Kd3
{-0,26/13 1,8}
37... Kf7
{+0,38/29 1,0}
38. Ke3
{-0,26/13 1,8}
38... Ke7
{+0,37/32 1,2}
39. Kf3
{-0,20/13 1,8}
39... Kf7
{+0,37/33 1,7}
40. Ke3
{+0,00/16 1,8}
40... Ba4
{+0,38/33 1,7}
41. Bh5+
{-0,21/12 2,0}
41... Kf6
{+0,37/33 1,3}
42. Bf3
{-0,25/14 1,9}
42... Bd7
{+0,37/34 0,9}
43. Be2
{-0,15/13 1,9}
43... Bc8
{+0,37/36 0,9}
44. Bf3
{-0,23/14 1,8}
44... Ba6
{+0,37/37 1,2}
45. Be2
{-0,20/15 1,7}
45... Bb7
{+0,37/35 1,1}
46. Bf1
{-0,22/14 1,7}
46... Bc6
{+0,37/35 1,2}
47. Bd3
{-0,23/13 1,6}
47... Bd7
{+0,37/36 1,2}
48. Be2
{+0,00/16 1,6}
48... Bc6
{+0,37/35 1,1}
49. Bd3
{+0,00/18 1,5}
49... Kg6
{+0,37/35 2,0}
50. Bf1
{-0,14/12 1,5}
50... Bb7
{+0,37/34 0,8}
51. Bd3
{-0,09/13 1,4}
51... Kf6
{+0,37/34 1,4}
52. Bf1
{+0,00/17 1,4}
52... Be4
{+0,37/33 1,1}
53. Be2
{-0,19/13 1,4}
53... Bb1
{+0,37/34 1,3}
54. Bh5
{-0,17/13 1,4}
54... Ba2
{+0,37/36 1,3}
55. Be2
{-0,26/14 1,4}
55... Bb3
{+0,37/37 1,2}
56. Kd3
{-0,23/15 1,4}
56... Ba4
{+0,37/38 2,0}
57. Ke3
{-0,25/15 1,4}
57... Ke7
{+0,37/34 1,2}
58. Bf3
{-0,14/13 1,4}
58... Bc2
{+0,37/34 1,2}
59. Be2
{-0,16/13 1,4}
59... Kf7
{+0,37/35 2,0}
60. Kd2
{-0,14/12 1,4}
60... Ba4
{+0,37/36 1,4}
61. Ke3
{-0,14/13 1,4}
61... Kf6
{+0,36/34 1,6}
62. Bf3
{+0,00/17 1,4}
62... Kg7
{+0,36/36 1,6}
63. Be2
{-0,09/13 1,4}
63... Bc2
{+0,36/35 1,3}
64. Kd2
{+0,00/17 1,4}
64... Bb3
{+0,36/39 1,9}
65. Kd3
{+0,00/16 1,4}
65... Kf6
{+0,35/37 3}
66. Ke3
{-0,23/15 1,4}
66... Bc2
{+0,18/36 10}
67. Kd2
{-0,20/15 1,4}
67... Ba4
{+0,18/31 0,9}
68. Ke3
{+0,00/18 1,4}
68... Bd7
{+0,18/34 0,8}
69. Bf3
{-0,23/13 1,4}
69... Be8
{+0,17/33 1,8}
70. Bb7
{-0,20/13 1,4}
70... Ke7
{+0,16/30 1,3}
71. Ba6
{-0,14/14 1,4}
71... Bc6
{+0,37/28 0,9}
72. Bb5
{-0,23/14 1,4}
72... Bg2
{+0,13/30 2,0}
73. Ba6
{-0,17/13 1,4}
73... Kf7
{+0,13/27 0,8}
74. Kf2
{-0,15/13 1,4}
74... Bh1
{+0,13/32 0,9}
75. Bb5
{-0,14/14 1,4}
75... Kf6
{+0,13/35 0,9}
76. Ke3
{-0,17/13 1,4}
76... Bb7
{+0,13/33 1,2}
77. Bd7
{-0,21/13 1,4}
77... Ba6
{+0,12/27 0,9}
78. Kd3
{-0,26/14 1,4}
78... e5
{+0,42/22 1,1}
79. Bb5
{-0,33/14 1,4}
79... Bc8
{+0,59/24 2,2}
80. Ke3
{-0,33/14 1,4}
80... e4
{+0,32/23 0,4}
81. Bc6
{-0,27/15 2,0}
81... Be6
{+0,37/23 1,0}
82. Bb5
{-0,33/15 1,9}
82... Bf7
{+0,23/32 1,9}
83. Ke2
{-0,27/15 1,9}
83... Bh5+
{+0,23/33 1,3}
84. Kf2
{-0,24/14 1,8}
84... Bf7
{+0,19/30 1,2}
85. Ke2
{+0,00/17 1,7}
85... Ke7
{+0,19/33 1,3}
86. Kf1
{-0,29/14 1,7}
86... Kd6
{+0,19/32 1,4}
87. Ke2
{-0,31/14 1,6}
87... Be6
{+0,19/36 1,3}
88. Kf2
{-0,28/14 1,6}
88... Bd7
{+0,19/30 1,4}
89. Ba6
{-0,26/14 1,5}
89... Ke7
{+0,19/32 1,3}
90. Bb7
{-0,28/14 1,5}
90... Kf6
{+0,19/30 1,5}
91. Ba6
{-0,26/14 1,4}
91... Kg6
{+0,19/34 2,3}
92. Bb5
{-0,29/14 1,4}
92... Be6
{+0,18/33 1,6}
93. Kg2
{-0,28/14 1,4}
93... Bf7
{+0,15/33 3}
94. Kf2
{-0,24/14 1,4}
94... h6
{+0,16/29 0,9}
95. Ke3
{-0,23/14 1,4}
95... Kf6
{+0,15/34 1,5}
96. Kf2
{-0,25/15 1,4}
96... Bh5
{+0,14/32 1,3}
97. Bc6
{-0,21/14 1,4}
97... Bf7
{+0,14/32 1,5}
98. Bb5
{+0,00/17 1,4}
98... Bh5
{+0,13/35 4}
99. Bc6
{+0,00/16 1,4}
99... Bg4
{+0,13/32 0,9}
100. Bb5
{-0,19/15 1,4}
100... Ke7
{+0,13/35 1,2}
101. Ba4
{-0,22/14 1,4}
101... Ke6
{+0,13/35 1,5}
102. Ke3
{-0,18/14 1,4}
102... Ke7
{+0,12/37 1,3}
103. Kf2
{+0,00/17 1,4}
103... Kf7
{+0,12/37 1,9}
104. Bb5
{-0,18/14 1,4}
104... Kf6
{+0,12/37 1,3}
105. Ke3
{-0,18/15 1,4}
105... Ke7
{+0,12/36 1,6}
106. Ba4
{-0,21/15 1,4}
106... Kd8
{+0,12/32 1,3}
107. Bb5
{-0,18/15 1,4}
107... Ke7
{+0,12/39 1,6}
108. Ba4
{+0,00/18 1,4}
108... Kf7
{+0,12/35 2,9}
109. Bb5
{-0,17/14 1,4}
109... Bh3
{+0,12/36 1,3}
110. Kf2
{-0,13/14 1,4}
110... Bg4
{+0,12/37 3}
111. Ke3
{+0,00/17 1,4}
111... Kg7
{+0,11/35 1,1}
112. Bc6
{-0,13/14 1,4}
112... Kf8
{+0,11/38 1,5}
113. Bb5
{-0,13/15 1,4}
113... Kf7
{+0,11/39 1,9}
114. Kf2
{+0,00/17 1,4}
114... Ke6
{+0,10/34 0,8}
115. Ke3
{-0,16/15 1,4}
115... Bh3
{+0,10/37 0,9}
116. Bc6
{-0,17/15 1,4}
116... Bf1
{+0,10/35 0,8}
117. Bd5+
{-0,15/15 1,4}
117... Ke7
{+0,10/28 1,1}
118. Bg8
{-0,19/14 1,4}
118... Bg2
{+0,12/28 0,7}
119. Bd5
{-0,16/15 1,4}
119... Kd7
{+0,12/31 1,0}
120. Bf7
{-0,16/14 1,4}
120... Bf3
{+0,12/28 0,1}
121. Bg8
{-0,17/15 2,0}
121... Bh5
{+0,11/36 2,8}
122. Bd5
{-0,22/15 1,9}
122... Ke7
{+0,10/32 2,5}
123. Bc6
{-0,18/15 1,9}
123... Bf7
{+0,10/33 1,7}
124. Bb5
{-0,21/15 1,8}
124... Be6
{+0,10/34 2,5}
125. Ke2
{-0,25/15 1,7}
125... Bc8
{+0,15/28 1,5}
126. Bc6
{-0,24/14 1,7}
126... Be6
{+0,10/30 3}
127. Bb5
{+0,00/16 1,6}
127... Bc8
{+0,10/28 1,2}
128. Bc6
{+0,00/17 1,6}
128... Kd6
{+0,10/31 1,6}
129. Bd5
{-0,32/14 1,5}
129... Bd7
{+0,09/30 2,5}
130. Kf2
{-0,24/13 1,5}
130... Ke7
{+0,09/29 1,5}
131. Bb7
{-0,24/14 1,4}
131... Ke6
{+0,07/31 2,0}
132. Ba8
{-0,21/13 1,4}
132... Bc8
{+0,07/34 5}
133. Bc6
{-0,20/14 1,4}
133... Ba6
{+0,07/33 1,1}
134. Bd5+
{-0,15/13 1,4}
134... Kf6
{+0,07/36 1,7}
135. Kg2
{-0,18/13 1,4}
135... Bc8
{+0,07/31 2,5}
136. Bc6
{-0,21/14 1,4}
136... Ke7
{+0,07/28 1,3}
137. Kf2
{-0,24/14 1,4}
137... a6
{+0,07/28 1,5}
138. Bd5
{-0,17/14 1,4}
138... Be6
{+0,17/30 1,9}
139. Bxe6
{-0,17/16 1,4}
139... Kxe6
{+0,07/31 1,6}
140. a4
{-0,22/17 1,4}
140... Kf6
{+0,06/34 2,3}
141. Kf1
{-0,16/16 1,4}
141... Kg6
{+0,06/34 0,8}
142. h3
{-0,16/16 1,4}
142... h5
{+0,05/35 1,7}
143. h4
{-0,15/17 1,4}
143... Kh6
{+0,05/37 1,0}
144. Kg1
{-0,15/17 1,4}
144... Kh7
{+0,05/41 1,2}
145. Kh2
{-0,15/17 1,4}
145... Kg7
{+0,05/40 1,1}
146. Kh1
{-0,15/16 1,4}
146... Kf7
{+0,05/39 1,0}
147. Kg2
{-0,68/17 1,4}
147... Kg6
{+0,05/41 1,2}
148. Kf1
{+0,00/20 1,4}
148... Kh6
{+0,05/46 1,1}
149. Kg1
{+0,00/20 1,4}
149... Kh7
{+0,05/44 1,0}
150. Kh2
{+0,00/21 1,4}
150... Kh8
{+0,05/45 2,1}
151. Kg1
{-0,12/16 1,4}
151... Kg8
{+0,05/44 0,8}
152. Kf1
{-0,15/16 1,4}
152... Kf8
{+0,05/42 1,8}
153. Ke1
{-0,68/17 1,4}
153... Kg8
{+0,05/41 0,7}
154. Kf1
{+0,00/20 1,4}
154... Kf8
{+0,05/42 0,5}
155. Ke1
{+0,00/20 1,4}
155... Ke7
{+0,04/37 0,8}
156. Ke2
{-0,64/18 1,4}
156... Kf7
{+0,04/39 0,5}
157. Kf2
{-0,75/16 1,4}
157... Kg7
{+0,04/43 0,5}
158. Ke2
{-0,40/15 1,4}
158... Kf7
{+0,03/38 0,5}
159. Kf2
{+0,00/20 1,4}
159... Ke7
{+0,03/33 0,1}
160. Ke2
{+0,00/20 1,4}
160... Kd8
{+0,03/29 0,1}
161. Kf2
{-0,35/18 2,0}
161... Ke8
{+0,03/41 4}
162. Kf1
{-0,69/17 1,9}
162... Kd7
{+0,03/41 1,8}
163. Kf2
{-0,35/18 1,9}
163... Kc6
{+0,03/41 2,5}
164. Ke2
{-0,69/18 1,8}
164... Kb7
{+0,02/39 2,0}
165. Kf1
{-0,06/18 1,7}
165... Kc7
{+0,02/41 2,6}
166. Kf2
{-0,07/18 1,7}
166... Kb8
{+0,02/42 2,2}
167. Ke2
{-0,06/18 1,6}
167... Kc7
{+0,00/42 1,8}
168. Kf2
{+0,00/21 1,6}
168... Kd7
{+0,00/40 1,7}
169. Ke3
{-0,08/18 1,5}
169... Ke8
{+0,00/42 1,9}
170. Kf2
{-0,06/18 1,5}
170... Kf7
{+0,00/47 1,8}
171. Kg2
{+0,00/21 1,4}
171... Kg7
{+0,00/48 1,7}
172. Kh1
{+0,00/21 1,4}
172... Kf8
{+0,00/47 2,2}
173. Kg1
{-0,05/19 1,4}
173... Ke8
{+0,00/48 1,6}
174. Kf1
{+0,00/21 1,4}
174... a5
{+0,00/44 2,0}
175. Kg2
{-0,02/18 1,4}
175... Ke7
{+0,00/47 2,3}
176. Kf1
{-0,02/18 1,4}
176... Kd6
{+0,00/47 2,4}
177. Ke1
{-0,02/18 1,4}
177... Ke6
{+0,00/40 1,7}
178. Kf2
{-0,03/19 1,4}
178... Kf6
{+0,00/48 1,6}
179. Ke2
{-0,02/18 1,4}
179... Kg7
{+0,00/48 2,5}
180. Ke1
{-0,02/18 1,4}
180... Kh7
{+0,00/48 2,9}
181. Kd2
{-0,01/18 1,4}
181... Kg6
{+0,00/49 2,1}
182. Ke1
{-0,03/19 1,4}
182... Kf7
{+0,00/50 2,2}
183. Kd2
{-0,01/18 1,4}
183... Ke7
{+0,00/50 2,0}
184. Ke2
{-0,02/19 1,4}
184... Ke6
{+0,00/46 2,2}
185. Kf2
{+0,00/21 1,4}
185... Kf6
{+0,00/51 1,0}
186. Ke2
{+0,00/21 1,4}
186... Kg7
{+0,00/51 1,6}
187. Ke1
{+0,00/21 1,4}
187... Kg6
{+0,00/52 1,1}
188. Kd1
{-0,02/19 1,4}
188... Kf7
{+0,00/51 1,2}
189. Kd2
{+0,00/21 1,4}
189... Kf8
{+0,00/51 0,6}
190. Kd1
{-0,02/19 1,4}
190... Kg8
{+0,00/47 0,4}
191. Ke2
{-0,02/19 1,4}
191... Kh8
{+0,00/47 0,7}
192. Kd1
{-0,02/19 1,4}
192... Kg8
{+0,00/53 0,4}
193. Ke2
{+0,00/21 1,4}
193... Kh7
{+0,00/52 0,5}
194. Kd2
{+0,00/21 1,4}
194... Kh6
{+0,00/51 0,7}
195. Ke2
{-0,02/19 1,4}
195... Kg6
{+0,00/47 0,1}
196. Ke1
{+0,00/21 1,4}
196... Kf6
{+0,00/12 0,1}
197. Ke2
{+0,00/21 1,4}

{Draw by repetition} 1/2-1/2

[/pgn]
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Mayhem NNUE - New NN engine

Post by Madeleine Birchfield »

JohnWoe wrote: Fri Nov 27, 2020 1:48 pm Alas there was a small bug in my polyglot code. Mayhem couldn't. use its full book. Now it works perfectly.

I've never liked testing with long book lines.
Actually I think testing is now more fair. Mayhem doesn't always pick up the best move. It just adds variety.

Without book Mayhem played the same game basically all the time against Fruit. That was unfair.

Disabling book all you need to do is to remove book. I didn't add OwnBook option for this reason.
It doesn't make it more fair. You use books for the explicit purpose of testing by putting the book into a testing program or a UCI that allows for testing or tournaments, not by packing the book into the engine and having the book enabled by default.
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Mayhem NNUE - New NN engine

Post by Madeleine Birchfield »

JohnWoe wrote: Fri Nov 27, 2020 1:48 pm I think adding a tiny classical evaluation for testers would be good. But then the strength will be 1700 Elo.
What would be even better would be you training your own NNUE net for the testers. It would most likely be better than any tiny handcrafted evaluation you put in Mayhem for testers.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Madeleine Birchfield wrote: Tue Dec 01, 2020 9:27 pm
JohnWoe wrote: Fri Nov 27, 2020 1:48 pm I think adding a tiny classical evaluation for testers would be good. But then the strength will be 1700 Elo.
What would be even better would be you training your own NNUE net for the testers. It would most likely be better than any tiny handcrafted evaluation you put in Mayhem for testers.
That's true. It would be better. Alas I lack motivation.
ROI wise it sucks too. You put the Herculean effort in and end up with similar but much worse...
With my Rust Ataxx engine I will explore NN. My plan is to be competitive. Tho I can't publish source code for that reason.

I added a little bit of HCE because:
1. Mayhem is now totally independent from any external files. W/o NNUE/PolyGlot.
2. I test search w/o NNUE. So evaluation doesn't matter.

These 2 main components are from Stockfish:
1. PolyGlot code: Extremely important. Heavily modified to modern C++.
2. NNUE file. You can however choose any file you want.
User avatar
mclane
Posts: 18748
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: Mayhem NNUE - New NN engine

Post by mclane »

Any idea about the ELO ?
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

mclane wrote: Tue Dec 01, 2020 10:00 pm Any idea about the ELO ?
Mr. Sylwy tested v0.50 and got around 2790 Elo : http://talkchess.com/forum3/viewtopic.php?f=6&t=75796

I have added opening books and lots improvements. So my estimate is somewhere in 2800 - 3000 Elo.
I have been trying to close the gap against Hakkapeliitta 3.0. I think I'm close but not quite there yet.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

I uploaded Mayhem 2.6 to github: https://github.com/SamuraiDangyo/mayhem ... s/tag/v2.6

Speedups / bugfixes etc.
On 1 core Mayhem is total monster now. :lol:

[pgn][Event "?"]
[Site "?"]
[Date "2020.12.31"]
[Round "1"]
[White "Mayhem 2.6"]
[Black "Fruit 2.1"]
[Result "1-0"]
[TimeControl "60+0.1"]
[ECO "A15"]
[Opening "English, 1...Nf6 (Anglo-Indian defense)"]
[PlyCount "81"]
[Annotator "6. +0,18 1... +0,13"]

1. c4 {+0,00/1}
{s}
1... Nf6 {+0,13/11 1,6}
{s}
2. d4 {+0,00/1}
{s}
2... e6 {+0,07/11 1,9}
{s}
3. g3 {+0,00/1}
{s}
3... Bb4+ {+0,36/11 1,9}
{s}
4. Bd2 {+0,00/1}
{s}
4... Be7 {+0,21/11 4}
{s}
5. Bg2 {+0,00/1}
{s}
5... O-O {+0,21/11 1,7}
{s}
6. e4 {+0,18/11 2,1}
{s}
6... d5 {+0,39/11 2,4}
{s}
7. e5 {+0,00/11 2,0}
{s}
7... Ne4 {+0,38/11 1,2}
{s}
8. cxd5 {+0,00/10 2,0}
{s}
8... exd5 {+0,50/9 10}
{s}
9. Nc3 {+0,00/11 1,9}
{s}
9... Nc6 {+0,33/10 1,3}
{s}
10. Nge2 {+0,18/10 1,8}
{s}
10... Bg4 {+0,28/10 1,5}
{s}
11. f3 {+0,40/10 1,8}
{s}
11... Nxc3 {+0,07/10 1,7}
{s}
12. Bxc3 {+0,33/10 1,7}
{s}
12... Bf5 {+0,02/11 1,4}
{s}
13. O-O {+0,38/9 1,7}
{s}
13... a5 {+0,07/10 1,4}
{s}
14. h3 {+0,55/9 1,6}
{s}
14... a4 {+0,30/10 2,2}
{s}
15. g4 {+0,50/10 1,6}
{s}
15... Be6 {+0,24/10 1,4}
{s}
16. f4 {+0,88/11 1,5}
{s}
16... f5 {+0,24/11 1,2}
{s}
17. gxf5 {+0,74/10 1,5}
{s}
17... Bxf5 {+0,17/10 9}
{s}
18. Ng3 {+0,77/10 1,4}
{s}
18... Bc8 {+0,16/10 9}
{s}
19. Qf3 {+0,94/10 1,4}
{s}
19... Be6 {+0,13/10 8}
{s}
20. f5 {+1,34/9 1,3}
{s}
20... Kh8 {+0,15/9 1,5}
{s}
21. Qg4 {+1,51/9 1,3}
{s}
21... Bf7 {+0,03/9 1,1}
{s}
22. a3 {+1,74/9 1,3}
{s}
22... Rg8 {+0,14/9 2,3}
{s}
23. Kh1 {+1,90/10 1,2}
{s}
23... Na5 {+0,01/9 7}
{s}
24. Rf3 {+1,79/9 1,2}
{s}
24... Nc4 {+0,00/9 1,1}
{s}
25. Rg1 {+1,85/9 1,1}
{s}
25... Bg5 {+0,20/9 1,1}
{s}
26. e6 {+1,65/9 1,1}
{s}
26... Be8 {+0,30/10 8}
{s}
27. Bb4 {+1,53/9 1,1}
{s}
27... Nxb2 {+0,45/9 7}
{s}
28. Nh5 {+2,24/9 1,1}
{s}
28... Bxh5 {+0,48/10 9}
{s}
29. Qxh5 {+1,95/10 1,0}
{s}
29... Bf6 {+0,39/10 1,1}
{s}
30. Bf1 {+2,06/9 10}
{s}
30... Bxd4 {+0,90/9 7}
{s}
31. Rg6 {+1,84/8 10}
{s}
31... Nc4 {+1,17/8 5}
{s}
32. e7 {+1,71/8 9}
{s}
32... Qd7 {+0,87/9 7}
{s}
33. f6 {+1,25/7 9}
{s}
33... Bxf6 {+2,11/8 6}
{s}
34. Rgxf6 {+0,89/8 9}
{s}
34... Rae8 {-2,84/7 1,1}
{s}
35. Bd3 {+4,91/9 8}
{s}
35... g6
{-M16/7 0.53s}
36. Rxg6 {+6,61/9 8}
{s}
36... Qxe7
{-M10/9 0.39s}
37. Rxg8+ {+104,85/8 2,8}
{s}
37... Rxg8
{-M8/38 0.45s}
38. Bc3+ {+104,85/6 1,2}
{s}
38... d4
{-M6/40 0.48s}
39. Bxd4+ {+104,85/5 0,7}
{s}
39... Ne5
{-M4/39 0.48s}
40. Bxe5+ {+104,85/4 0,2}
{s}
40... Rg7
{-M2/38 0.48s}
41. Qxh7#
{+104.85/3 0.001s, White mates} 1-0

[/pgn]