Mayhem NNUE - New NN engine

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

Moderator: Ras

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

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 6.3: https://github.com/SamuraiDangyo/mayhem ... s/tag/v6.3

Finally 100-0 vs Fruit 2.1 :lol:

Code: Select all

Score of Mayhem 6.3 vs Fruit 2.1: 100 - 0 - 0  [1.000] 100
...      Mayhem 6.3 playing White: 50 - 0 - 0  [1.000] 50
...      Mayhem 6.3 playing Black: 50 - 0 - 0  [1.000] 50
...      White vs Black: 50 - 50 - 0  [0.500] 100
Elo difference: inf +/- nan, LOS: 100.0 %, DrawRatio: 0.0 %
Finished match
purechess
Posts: 83
Joined: Wed Nov 28, 2018 1:28 pm
Full name: Heinrich Pulliter

Re: Mayhem NNUE - New NN engine

Post by purechess »

When "go infinite" is called it only shows 1 move and not a longer line of moves ?!
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

purechess wrote: ↑Sun Nov 28, 2021 1:25 pm When "go infinite" is called it only shows 1 move and not a longer line of moves ?!
If calling from console. Mayhem assumes it has no time and just returns the first book / generated move.

Code: Select all

go infinite
info depth 1 nodes 0 time 0 nps 0 score cp 0 pv c2c4
bestmove c2c4
If you mean why the primary variation is only 1 move. Yes that's by design. Of course I store moves in hashtable. 3 per line actually. So Mayhem remembers the best lines. But not always, like with full pv. I just don't do this copy-pv-line thing like in other engines. Because it was much slower than what I have. Not that great for analysing.
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 6.4: https://github.com/SamuraiDangyo/mayhem ... s/tag/v6.4
Some improvements but not much.

myid: 15313000
perft: 625989260

This was a draw? But Crafty was greedy :shock:
[pgn][Event "Computer Chess Game"]
[Site "pc"]
[Date "2021.12.11"]
[Round "3"]
[White "Mayhem 6.4"]
[Black "Crafty-23.4"]
[Result "1-0"]
[TimeControl "60+1"]

1. c4 e6
{-0,23/16 2,8}
2. d4 Nf6
{-0,15/15 2,8}
3. Nf3 d5
{+0,03/15 5}
4. e3
{+0,10/11 3}
4... Nc6
{+0,11/15 5}
5. a3
{+0,28/12 3}
5... dxc4
{+0,13/14 2,7}
6. Bxc4
{+0,27/13 3}
6... Bd6
{+0,28/16 4}
7. O-O
{+0,27/12 3}
7... O-O
{+0,26/16 2,2}
8. Bb5
{+0,24/12 3}
8... Ne7
{+0,13/15 2,8}
9. Bd3
{+0,24/12 3}
9... c5
{+0,31/14 2,2}
10. dxc5
{+0,22/14 2,9}
10... Bxc5
{+0,46/16 2,1}
11. Qe2
{+0,25/13 2,8}
11... Bd7
{+0,24/14 2,1}
12. b4
{+0,31/12 2,8}
12... Bb6
{+0,55/14 2,1}
13. Nbd2
{+0,37/12 2,7}
13... a5
{+0,66/15 3}
14. b5
{+0,63/13 2,6}
14... Ned5
{+0,64/14 2,6}
15. Bb2
{+0,62/12 2,6}
15... Ng4
{+0,73/13 1,9}
16. Kh1
{+0,68/10 2,5}
16... Rc8
{+0,63/14 2,7}
17. h3
{+0,61/11 2,5}
17... Ngf6
{+0,56/15 1,8}
18. Rac1
{+0,78/12 2,4}
18... Qe7
{+0,57/15 1,8}
19. Nc4
{+0,76/11 2,3}
19... Bc7
{+0,82/14 1,8}
20. a4
{+0,76/11 2,3}
20... Rfd8
{+0,49/14 1,8}
21. Bb1
{+0,90/11 2,2}
21... Be8
{+0,45/13 1,7}
22. e4
{+1,03/10 2,2}
22... Nb4
{+0,72/15 2,5}
23. Qe3
{+1,05/11 2,1}
23... Nh5
{+1,15/15 4}
24. e5
{+1,10/11 2,1}
24... Nd5
{+1,09/14 1,6}
25. Qd3
{+1,39/12 2,1}
25... f5
{+0,96/15 1,6}
26. Ba3
{+1,35/11 2,0}
26... Qf7
{+0,72/14 1,6}
27. Nd6
{+1,42/11 2,0}
27... Bxd6
{+0,65/16 1,5}
28. exd6
{+1,06/12 1,9}
28... Nhf4
{+0,62/16 1,6}
29. Rxc8
{+1,09/12 1,9}
29... Rxc8
{+0,24/16 1,6}
30. Qd1
{+0,85/11 1,9}
30... Qf6
{+0,29/15 1,6}
31. Ba2
{+1,03/11 1,8}
31... Bd7
{+0,19/15 1,6}
32. Kh2
{+1,25/11 1,8}
32... Qc3
{-0,16/14 1,8}
33. Bc1
{+0,51/11 1,8}
33... Nd3
{+0,09/15 1,9}
34. Bxd5
{+0,86/11 1,7}
34... exd5
{+0,39/15 0,5}
35. Be3
{+0,71/11 1,7}
35... Rc4
{+0,26/14 3}
36. Bb6
{+0,60/11 1,7}
36... Qa3
{-0,07/14 1,9}
37. Bc7
{+1,12/12 1,7}
37... Rxa4
{-0,09/15 2,2}
38. Qd2
{+1,45/11 1,6}
38... Re4
{+0,31/14 2,0}
39. Rd1
{+1,49/12 1,6}
39... Nf4
{+0,24/15 1,7}
40. Ng5
{+1,22/11 1,6}
40... Ra4
{-0,01/15 1,3}
41. Re1
{+2,00/10 1,6}
41... Qc5
{-0,22/15 1,3}
42. b6
{+2,30/10 1,5}
42... h6
{-0,28/16 2,4}
43. Re7
{+1,87/11 1,5}
43... Qb5
{+0,01/16 1,2}
44. Nf3
{+1,59/12 1,5}
44... Re4
{-0,01/15 1,2}
45. Nd4
{+1,25/11 1,5}
45... Qf1
{-2,90/16 1,2}
46. f3
{+1,17/11 1,5}
46... Rxd4
{-2,56/17 1,0}
47. Rxg7+
{+0,18/13 1,4}
47... Kh8
{-2,79/17 1,0}
48. Qxd4
{+0,00/14 1,4}
48... Ne2
{-3,09/18 1,0}
49. Rxd7+
{-0,13/13 1,4}
49... Nxd4
{-2,34/17 1,1}
50. Re7
{-0,03/13 1,4}
50... Qf2
{-2,34/15 1,1}
51. Kh1
{-0,03/15 1,4}
51... Nxf3
{-1,80/15 1,0}
52. gxf3
{+0,00/15 1,4}
52... Qxf3+
{-0,87/15 1,7}
53. Kh2
{+0,00/14 1,4}
53... Qf2+
{-0,87/15 1,0}
54. Kh1 Qf1+
{-0,05/15 1,0}
55. Kh2 Qf4+
{-0,01/16 1,0}
56. Kg2
{+0,44/14 1,4}
56... Qg5+
{-0,01/16 1,2}
57. Kf3
{+0,39/15 1,4}
57... Qh5+
{-0,01/16 1,1}
58. Ke3
{+0,21/14 1,4}
58... Qxh3+
{-0,01/14 1,4}
59. Kd4
{+0,23/13 1,4}
59... Qb3
{-0,01/16 1,1}
60. Ke5
{+1,65/14 1,4}
60... Qb4
{-0,01/16 1,0}
61. Ke6
{+3,16/15 1,3}
61... Qg4
{-0,01/16 1,0}
62. d7
{+2,56/15 1,3}
62... Qg6+
{-0,01/16 1,0}
63. Ke5
{+3,33/16 1,3}
63... Qg3+ 64. Kxd5
{+2,35/15 1,3}
64... Qb3+
{-0,01/16 1,0}
65. Kd6
{+2,78/15 1,3}
65... Qd3+
{-0,01/16 1,0}
66. Ke6
{+2,22/16 1,3}
66... Qc4+
{-0,01/17 1,2}
67. Kf6
{+2,07/16 1,3}
67... Qc6+ 68. Kf7
{+2,84/15 1,3}
68... Qd5+
{+0,45/17 1,3}
69. Kg6
{+1,86/17 1,2}
69... Qc6+
{+0,44/17 1,0}
70. Kh5
{+2,79/15 1,2}
70... Qh1+
{-0,01/17 1,0}
71. Kg6
{+0,00/19 1,2}
71... Qc6+
{-0,01/19 1,0}
72. Kxf5
{+2,62/15 1,2}
72... Qf3+
{+0,29/17 1,1}
73. Bf4
{+2,74/14 1,2}
73... Qh3+
{+0,45/17 1,2}
74. Ke4
{+3,32/15 1,2}
74... Qh1+
{+0,45/16 1,0}
75. Ke5
{+2,84/15 1,2}
75... Qe1+
{+0,45/17 1,0}
76. Kf6
{+1,96/17 1,2}
76... Qh4+
{+0,55/17 1,0}
77. Ke6
{+2,27/16 1,2}
77... Qh3+
{+0,61/17 1,0}
78. Kf7
{+2,06/15 1,2}
78... Qf5+ 79. Ke8
{+2,06/1 0,1}
79... Qg6+
{+5,80/15 1,0}
80. Kd8
{+2,16/15 1,2}
80... Qc6
{+7,11/16 1,0}
81. Bc7
{+4,45/15 1,2}
81... Qc5
{+11,46/16 1,0}
82. Re5
{+4,89/13 1,2}
82... Qc3
{+10,99/16 1,0}
83. Kc8
{+8,71/15 1,2}
83... Qh3
{+11,46/16 1,0}
84. Re7
{+9,68/17 1,2}
84... a4
{+327,49/16 1,0}
85. Kxb7
{+10,44/16 1,2}
85... Qd3
{+327,51/14 1,0}
86. Kc8
{+17,03/15 1,2}
86... Qf5
{+327,53/12 1,0}
87. b7
{+104,85/14 0,4}
87... Kg8
{+327,55/11 1,0}
88. b8=Q
{+104,85/11 0,2}
88... Qf7 89. d8=Q+
{+104,85/9 0,2}
89... Kg7 90. Qb1
{+104,85/7 0,2}
90... h5
{+327,61/7 1,0}
91. Be5+
{+104,85/4 0,1}
91... Kh6
{+30,80/2 0,1}
92. Qd2+
{+104,85/3 0,1}
92... Qf4
{+327,65/2 0,1}
93. Qxf4#
{+104,85/2 0,1}

{Xboard adjudication: Checkmate} 1-0
[/pgn]
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 6.5: https://github.com/SamuraiDangyo/mayhem ... s/tag/v6.5

Lots of improvements. perft added... print board added ...

Bench: 15775473
Perft: 124132537
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 6.6: https://github.com/SamuraiDangyo/mayhem ... s/tag/v6.6
Some improvements/bug fixes. Everything is header now.

bench -> 15794542
perft -> 119060324

Code: Select all

perft
1. a2a3 -> 4463267 (1610 ms)
2. a2a4 -> 5363555 (1865 ms)
3. b2b3 -> 5310358 (1845 ms)
4. b2b4 -> 5293555 (1839 ms)
5. c2c3 -> 5417640 (1907 ms)
6. c2c4 -> 5866666 (2076 ms)
7. d2d3 -> 8073082 (2992 ms)
8. d2d4 -> 8879566 (3370 ms)
9. e2e3 -> 9726018 (3670 ms)
10. e2e4 -> 9771632 (3702 ms)
11. f2f3 -> 4404141 (1588 ms)
12. f2f4 -> 4890429 (1762 ms)
13. g2g3 -> 5346260 (1898 ms)
14. g2g4 -> 5239875 (1874 ms)
15. h2h3 -> 4463070 (1613 ms)
16. h2h4 -> 5385554 (1930 ms)
17. b1a3 -> 4856835 (1725 ms)
18. b1c3 -> 5708064 (2030 ms)
19. g1f3 -> 5723523 (2026 ms)
20. g1h3 -> 4877234 (1713 ms)

===========================

Nodes:    119060324
Time(ms): 43035
NPS:      2766592
[pgn][Event "Computer Chess Game"]
[Site "pc"]
[Date "2022.01.29"]
[Round "-"]
[White "Mayhem 6.6"]
[Black "Crafty-23.4"]
[Result "1-0"]
[TimeControl "60+1"]

1. d4 e6
{+0,10/15 2,8}
2. c4 Nf6
{+0,00/15 4}
3. Nf3 c5
{+0,02/15 3}
4. d5 exd5
{+0,00/14 2,5}
5. cxd5 d6
{+0,36/14 3}
6. Nc3 Be7
{+0,33/16 3}
7. e4
{+0,56/13 3}
7... O-O
{+0,35/15 2,4}
8. h3
{+0,65/13 3}
8... Qa5
{+0,11/16 3}
9. Bd2
{+0,74/12 3}
9... Qb6
{+0,35/14 2,5}
10. Bd3
{+0,79/12 3}
10... Na6
{+0,36/16 8}
11. O-O
{+0,90/11 3}
11... Nd7
{+0,65/15 8}
12. Re1
{+0,92/11 3}
12... f6
{+0,49/16 2,8}
13. Nh4
{+0,97/11 3}
13... Ne5
{+0,24/15 1,8}
14. Bf1
{+1,14/11 2,9}
14... c4
{+0,53/14 1,8}
15. b3
{+0,91/12 2,8}
15... cxb3
{+0,42/15 1,7}
16. Na4
{+1,02/11 2,8}
16... Qd4
{+0,18/15 1,7}
17. axb3
{+1,12/11 2,7}
17... Bd7
{+0,36/15 1,9}
18. Nf5
{+1,15/10 2,6}
18... Bxf5
{+0,72/16 1,7}
19. exf5
{+0,98/11 2,6}
19... Nc7
{+0,89/17 5}
20. Nc3
{+1,29/11 2,5}
20... Na6
{+1,31/14 1,6}
21. b4
{+1,75/10 2,5}
21... Rfe8
{+1,43/14 2,0}
22. Re4
{+1,68/10 2,4}
22... Qb6
{+1,58/14 1,5}
23. Qh5
{+2,16/11 2,3}
23... g6
{+1,31/15 1,5}
24. fxg6
{+2,84/12 2,3}
24... hxg6
{+1,13/16 1,5}
25. Rg4
{+2,94/12 2,2}
25... g5
{+1,19/14 1,5}
26. Rg3
{+2,85/9 2,2}
26... Kg7
{+2,03/14 2,1}
27. Qe2
{+2,65/9 2,2}
27... Qxb4
{+0,60/14 2,5}
28. Nb5
{+2,31/10 2,1}
28... Qh4
{+0,57/15 1,7}
29. Bc3
{+2,30/9 2,1}
29... Rac8
{+0,33/12 1,7}
30. Nd4
{+2,30/10 2,0}
30... Kg8
{+0,49/13 1,5}
31. Qd1
{+2,50/9 2,0}
31... Nc5
{+0,02/14 1,3}
32. Be1
{+1,68/9 2,0}
32... a6
{-0,84/13 1,3}
33. Be2
{+1,35/9 1,9}
33... Rc7
{-0,42/13 1,4}
34. Ba5
{+1,76/10 1,9}
34... Rd7
{-0,21/15 1,3}
35. Bh5
{+1,41/10 1,8}
35... Rb8
{+0,27/15 1,4}
36. Be1
{+1,39/9 1,8}
36... Ncd3
{-0,52/12 1,3}
37. Rxd3
{+1,54/10 1,8}
37... Nxd3
{-0,01/16 1,5}
38. Bg4
{+1,51/11 1,7}
38... Nc5
{+0,20/16 1,2}
39. Bf5
{+1,57/10 1,7}
39... Rc7
{-1,09/14 1,2}
40. Ba5
{+1,67/11 1,7}
40... b6
{-0,85/16 1,2}
41. g3
{+1,88/12 1,7}
41... Qh6
{-0,85/16 1,4}
42. Nc6
{+1,70/11 1,6}
42... Rbb7
{-1,56/16 1,2}
43. Bc3
{+1,64/11 1,6}
43... a5
{-1,38/14 1,2}
44. Qg4
{+1,98/10 1,6}
44... Bf8
{-1,20/13 1,2}
45. Re1
{+2,02/9 1,6}
45... a4
{-0,93/14 1,2}
46. Re8
{+2,15/9 1,6}
46... b5
{-1,00/13 1,0}
47. Bb4
{+2,58/9 1,5}
47... Qh8
{-0,75/12 1,0}
48. Ra8
{+2,73/8 1,5}
48... Qg7
{+0,29/15 2,4}
49. Rd8
{+2,54/8 1,5}
49... Rd7
{+0,54/14 1,3}
50. Ra8
{+2,47/9 1,5}
50... Rf7
{-0,01/14 1,0}
51. Kh2
{+2,56/8 1,4}
51... Rbc7
{-0,01/15 1,0}
52. Qe2
{+2,42/9 1,4}
52... Rfe7
{+0,78/14 1,0}
53. Qxb5
{+2,35/10 1,4}
53... Ra7
{+0,98/15 1,0}
54. Nxa7
{+2,46/10 1,4}
54... Rxa7
{+1,69/16 1,0}
55. Rc8
{+2,59/10 1,4}
55... Rc7
{+1,74/16 1,0}
56. Re8
{+2,03/11 1,4}
56... Rb7
{+1,74/16 1,0}
57. Qc4
{+2,43/11 1,4}
57... Re7
{+1,81/16 1,0}
58. Rd8
{+2,78/11 1,3}
58... Rc7
{+1,89/16 1,0}
59. Bxc5
{+2,64/10 1,3}
59... Qe7
{+2,17/16 1,0}
60. Ra8
{+2,53/10 1,3}
60... a3
{+2,06/14 1,0}
61. Qa6
{+2,75/10 1,3}
61... Rxc5
{+2,20/15 1,0}
62. Be6+
{+2,75/12 1,3}
62... Kg7
{+2,55/15 1,0}
63. Qxa3
{+2,86/12 1,3}
63... Kh6
{+2,65/17 1,0}
64. Qf3
{+2,71/11 1,3}
64... Bg7
{+6,91/16 1,0}
65. Qf5
{+2,54/10 1,3}
65... Rc4
{+7,42/18 1,0}
66. Kg2
{+2,82/11 1,3}
66... Rb4
{+6,28/16 1,0}
67. Rc8
{+3,03/10 1,2}
67... Ra4
{+7,51/17 1,0}
68. Rg8
{+3,14/10 1,2}
68... Ra2
{+7,98/15 1,0}
69. h4
{+3,39/10 1,2}
69... Qa7
{+8,59/17 1,0}
70. h5
{+5,89/12 1,2}
70... Rxf2+
{+10,20/22 1,0}
71. Qxf2
{+5,91/13 1,2}
71... Qxf2+
{+10,21/22 1,4}
72. Kxf2
{+6,29/14 1,2}
72... Kh7
{+10,22/21 1,0}
73. Rd8
{+7,79/18 1,2}
73... g4
{+11,21/19 1,0}
74. Bxg4
{+8,59/18 1,2}
74... Bh6
{+11,21/18 1,0}
75. Rxd6
{+9,26/17 1,2}
75... Bg5
{+18,68/18 1,0}
76. Re6
{+10,10/18 1,2}
76... Bd2
{+12,55/17 1,0}
77. d6
{+10,26/16 1,2}
77... Kg7
{+13,46/19 1,0}
78. h6+
{+11,77/16 1,2}
78... Kg6
{+11,68/19 1,0}
79. d7
{+14,53/16 1,1}
79... Ba5
{+12,00/20 1,0}
80. h7
{+15,08/16 1,1}
80... Kxh7
{+12,16/20 0,5}
81. Rxf6
{+15,52/17 1,1}
81... Bd8
{+12,51/20 1,0}
82. Rf8
{+15,76/16 1,1}
82... Ba5
{+12,59/19 1,0}
83. d8=Q
{+16,78/15 1,1}
83... Bxd8
{+13,17/17 1,0}
84. Rxd8
{+17,04/15 1,1}
84... Kg7
{+327,49/15 1,0}
85. Kf3
{+16,55/12 1,1}
85... Kf7
{+327,53/15 1,0}
86. Rd7+
{+17,24/13 1,1}
86... Kf6
{+327,55/17 1,0}
87. Kf4
{+104,85/9 0,1}
87... Kg6
{+12,12/2 0,1}
88. Bh3
{+104,85/8 0,1}
88... Kf6
{+327,59/16 1,0}
89. g4
{+104,85/6 0,1}
89... Kg6
{+327,61/16 1,0}
90. g5
{+104,85/4 0,1}
90... Kh5
{+12,59/2 0,1}
91. Bf5
{+104,85/3 0,1}
91... Kh4
{+327,65/2 0,1}
92. Rh7#
{+104,85/2 0,1}

{Xboard adjudication: Checkmate} 1-0

[/pgn]
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

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

Re: Mayhem NNUE - New NN engine

Post by JohnWoe »

Mayhem 7.4: https://github.com/SamuraiDangyo/mayhem ... s/tag/v7.4

There was some "potential" problems in 7.3. Such as log(0) which is impossible. But clang didn't seem to have problems w/ it.
Noticed it after working on Havoc...

I updated to a better book and got +88 Elo. Probably much less irl.
Style is now not-so-risky as Mayhem uses 3 rep draw not 2 rep.

Code: Select all

Score of Mayhem 7.4 vs Mayhem 7.3: 329 - 287 - 384  [0.521] 1000
...      Mayhem 7.4 playing White: 156 - 158 - 186  [0.498] 500
...      Mayhem 7.4 playing Black: 173 - 129 - 198  [0.544] 500
...      White vs Black: 285 - 331 - 384  [0.477] 1000
Elo difference: 14.6 +/- 16.9, LOS: 95.5 %, DrawRatio: 38.4 %
Finished match

Score of mayhem-performance vs mayhem-final-book: 15 - 40 - 45  [0.375] 100
...      mayhem-performance playing White: 6 - 29 - 15  [0.270] 50
...      mayhem-performance playing Black: 9 - 11 - 30  [0.480] 50
...      White vs Black: 17 - 38 - 45  [0.395] 100
Elo difference: -88.7 +/- 51.1, LOS: 0.0 %, DrawRatio: 45.0 %
Finished match
Kieren Pearson
Posts: 75
Joined: Tue Dec 31, 2019 2:52 am
Full name: Kieren Pearson

Re: Mayhem NNUE - New NN engine

Post by Kieren Pearson »

Kieren Pearson
Posts: 75
Joined: Tue Dec 31, 2019 2:52 am
Full name: Kieren Pearson

Re: Mayhem NNUE - New NN engine

Post by Kieren Pearson »

Sorry, I got confused and posted this in the wrong place